commit ca8cd5bd761b4a768f1d1adf1d0dffc24f7369b7 Author: sigonasr2 Date: Mon Apr 3 13:50:53 2023 -0500 Add ffmpeg video management scripts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adb36c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.exe \ No newline at end of file diff --git a/audiomerge.bat b/audiomerge.bat new file mode 100644 index 0000000..9d31047 --- /dev/null +++ b/audiomerge.bat @@ -0,0 +1,7 @@ +@echo off +IF "%5"=="" GOTO HAVE_0 +ffmpeg -i %1 -i %2 -i %3 -filter_complex "[0]volume=0.2[a];[1]adelay=%4|%4,volume=2[b];[2]adelay=%4|%4,volume=2[c];[a][b][c]amix=3" -c:v copy -ac 2 %5 +GOTO DONE +:HAVE_0 +ffmpeg -i %1 -i %2 -filter_complex "[0]volume=0.2[1]adelay=%3|%3,volume=1[b];[0][b]amix=2" -c:v copy -ac 2 %4 +:DONE \ No newline at end of file diff --git a/audiomerge_direct.bat b/audiomerge_direct.bat new file mode 100644 index 0000000..2246e30 --- /dev/null +++ b/audiomerge_direct.bat @@ -0,0 +1,7 @@ +@echo off +IF "%5"=="" GOTO HAVE_0 +ffmpeg -i %1 -i %2 -i %3 -filter_complex "[0]volume=0[a];[1]adelay=%4|%4,volume=0.2[b];[2]adelay=%4|%4,volume=1[c];[a][b][c]amix=3" -c:v copy -ac 2 %5 +GOTO DONE +:HAVE_0 +ffmpeg -i %1 -i %2 -filter_complex "[0]volume=0.2[1]adelay=%3|%3,volume=1[b];[0][b]amix=2" -c:v copy -ac 2 %4 +:DONE \ No newline at end of file diff --git a/list.txt b/list.txt new file mode 100644 index 0000000..cd4e3dd --- /dev/null +++ b/list.txt @@ -0,0 +1,2 @@ +file 'first file.mp4' +file 'second file.mp4' diff --git a/merge.bat b/merge.bat new file mode 100644 index 0000000..cdb4ca9 --- /dev/null +++ b/merge.bat @@ -0,0 +1 @@ +ffmpeg -f concat -safe 0 -i list.txt -c:v copy %1 \ No newline at end of file diff --git a/precrop.bat b/precrop.bat new file mode 100644 index 0000000..bf62c67 --- /dev/null +++ b/precrop.bat @@ -0,0 +1 @@ +ffmpeg -ss %1 -i %2 -acodec copy %3 \ No newline at end of file