Last active
February 17, 2016 17:50
-
-
Save Snugglepantz/8a09bafcda80de6abd37 to your computer and use it in GitHub Desktop.
x265 ffmpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=*" %%G IN ('dir /b *.mp4') DO ffmpeg -i "%%G" -c:v libx265 -preset medium -x265-params crf=28 -c:a aac -strict -2 -b:a 128k "%%~nG.mkv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM keep a counter for files converted | |
set /A nfile=0 | |
REM do not copy empty folders or any files | |
@echo Copying directory structure from %0 to %1 ... | |
xcopy /T %1 %2 | |
REM walk directory structure and convert each file in quiet mode | |
for /R %1 %%v in (*.mp4, *.mov, *.flv, *.wmv) do ( | |
echo converting "%%~nxv" ... | |
ffmpeg -i "%%v" -c:v libx265 -preset medium -x265-params crf=28 -c:a aac -strict -2 -b:a 128k "%%~dpnv.mkv" | |
set /A nfile+=1 | |
) | |
echo Done! Converted %nfile% file(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment