From 34db3bf060cfb1bbddb172856f17cb86fbbbf062 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 15 Oct 2014 21:28:48 -0700 Subject: [PATCH] lol windows batch files --- .dummy | 1 - enc.bat | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) delete mode 100644 .dummy create mode 100755 enc.bat diff --git a/.dummy b/.dummy deleted file mode 100644 index 945c9b4..0000000 --- a/.dummy +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/enc.bat b/enc.bat new file mode 100755 index 0000000..a64b78d --- /dev/null +++ b/enc.bat @@ -0,0 +1,40 @@ +@ECHO OFF +set input=%1 +set output="%~p1%~n1.fdk.mp4" + +REM any of these can be commented out +set trim=start=0:duration=41 +set scale=640:480 +set aspect=4:3 +set volume=24dB + +REM -b:v 1280k + -vbr 5 ~= 10MiB/s +set video_bitrate=-crf 23 -maxrate 2560k -bufsize 5120k +set x264=-profile:v high -preset slow +set fdk=-profile:a aac_he_v2 -vbr 5 -cutoff 18000 + +set general=-y -sn -dn -metadata = -map_chapters -1 -movflags +faststart + +REM attack|right :release|right:inL/out|./...:knee:g:start:delay +set "limA=compand=0.0050|0.0050:0.0500|0.0500:-14/-14|0/-14:0.01:0:-14:0.0052" +set "limB=compand=0.0010|0.0010:0.0100|0.0100:-13/-13|0/-13:0.01:0:-13:0.0010" +set "limC=compand=0.0005|0.0005:0.0100|0.0100:-12/-12|0/-12:0.01:0:-12:0.0015" +set "limD=compand=0.0000|0.0000:0.0100|0.0100:-12/-12|0/-12" +set "louderizer=volume=0.25,aformat=channel_layouts=stereo,asetrate=705600,%limA%,%limB%,%limC%,asetrate=44100,%limD%,volume=3.98" + +set sanity=lowpass=18000:4,highpass=40:4 + +set vf= +set af= +if NOT "%scale%"=="" set "vf=%vf%,scale=%scale%" +if NOT "%trim%"=="" set "vf=%vf%,trim=%trim%,setpts=PTS-STARTPTS" +if NOT "%trim%"=="" set "af=%af%,atrim=%trim%,asetpts=PTS-STARTPTS" +if NOT "%volume%"=="" set "af=%af%,asetrate=44100,volume=%volume%,%sanity%,%louderizer%" + +if NOT "%vf%"=="" set vf=-vf "%vf:~1%" +if NOT "%af%"=="" set af=-af "%af:~1%" +if NOT "%aspect%"=="" set "aspect=-aspect %aspect%" +set video=%video_bitrate% -c:v libx264 %x264% -threads 0 %aspect% %vf% +set audio=-c:a libfdk_aac %fdk% -ar 44100 -ac 2 %af% + +start /low /wait /b ffmpeg -i %input% %general% %video% %audio% %output%