Skip to content

Commit 77bb63f

Browse files
committed
Initial commit
0 parents  commit 77bb63f

19 files changed

+195
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode
2+
bin/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Nick Zinovenko
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FFmpeg-Droplets

sound/fix-Sound.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v copy -c:a pcm_s16le -ar 44100
5+
6+
for %%F in (%*) do (
7+
ffmpeg -i %%F %params% -y "%%~nF_remux.mov"
8+
)
9+
pause

sound/to-Wav44.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:a pcm_s16le -ar 44100
5+
6+
for %%F in (%*) do (
7+
ffmpeg -i %%F %params% -y "%%~nF_wav.wav"
8+
)
9+
pause

sound/to-Wav48.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:a pcm_s16le -ar 48000
5+
6+
for %%F in (%*) do (
7+
ffmpeg -i %%F %params% -y "%%~nF_wav.wav"
8+
)
9+
pause

utility/loop-2sec-Hap.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
set PSScript=%~dp0/loop.ps1
3+
4+
set params=-c:v hap -format hap -an
5+
6+
for %%F in (%*) do (
7+
powershell.exe -ExecutionPolicy RemoteSigned -File "%PSScript%" %%F -fade 2
8+
)
9+
pause

utility/loop-2sec-HapA.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
set PSScript=%~dp0/loop.ps1
3+
4+
set params=-c:v hap -format hap_alpha -an
5+
6+
for %%F in (%*) do (
7+
powershell.exe -ExecutionPolicy RemoteSigned -File "%PSScript%" %%F -fade 2
8+
)
9+
pause

utility/loop.ps1

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
param(
2+
[Parameter(Mandatory=$true)]
3+
[string]$Filename,
4+
[float]$fade = 1
5+
)
6+
7+
$bin = Join-Path -path $PSScriptRoot -childpath ../bin/ -resolve
8+
$env:path = "$bin;" + $env:path
9+
10+
$duration = ffprobe -v error -select_streams v:0 -show_entries stream=duration -of csv=p=0 -i $Filename
11+
$length = $duration - $fade *2
12+
$Outname = (Get-Item $Filename).Basename + '_loop.mov'
13+
14+
# -c:v hap -format hap -an
15+
$params = $env:params.split()
16+
$filter =
17+
"[0]split[seg1][seg2];
18+
[seg1]trim=duration=$fade,fade=d=$fade`:alpha=1,setpts=PTS+$length/TB[xfade];
19+
[seg2]trim=$fade,setpts=PTS-STARTPTS[main];
20+
[main][xfade]overlay;"
21+
22+
ffmpeg -i $Filename $params -vf $filter -y $Outname

utility/opticalflow-60fps.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap -an -vf minterpolate=fps=60:mi_mode=mci:mc_mode=aobmc:vsbmc=1
5+
6+
for %%F in (%*) do (
7+
ffmpeg -i %%F %params% -y "%%~nF_flow.mov"
8+
)
9+
pause

utility/reverse-Hap.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap -an -vf reverse
5+
6+
for %%F in (%*) do (
7+
ffmpeg -i %%F %params% -y "%%~nF_reverse.mov"
8+
)
9+
pause

utility/reverse-HapA.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap_alpha -an -vf reverse
5+
6+
for %%F in (%*) do (
7+
ffmpeg -i %%F %params% -y "%%~nF_reverse.mov"
8+
)
9+
pause

video-Hap/to-Hap-noSound.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap -an
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_hap.mov"
10+
)
11+
pause

video-Hap/to-Hap.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap -c:a pcm_s16le -ar 44100
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_hap.mov"
10+
)
11+
pause

video-Hap/to-HapA.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap_alpha -c:a pcm_s16le -ar 44100
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_hap-a.mov"
10+
)
11+
pause

video-Hap/to-HapQ.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v hap -format hap_q -c:a pcm_s16le -ar 44100
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_hap-q.mov"
10+
)
11+
pause

video-Prores/to-422.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v prores -profile:v 2 -c:a pcm_s16le -ar 48000
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_422.mov"
10+
)
11+
pause

video-Prores/to-LT.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v prores -profile:v 1 -c:a pcm_s16le -ar 48000
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_lt.mov"
10+
)
11+
pause

video-Prores/to-PRX.cmd

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
path=%~dp0..\bin\;%path%
3+
4+
set params=-c:v prores -profile:v 0 -c:a pcm_s16le -ar 48000
5+
6+
mkdir !enc
7+
8+
for %%F in (%*) do (
9+
ffmpeg -i %%F %params% -y "!enc/%%~nF_prx.mov"
10+
)
11+
pause

0 commit comments

Comments
 (0)