Last active
May 16, 2019 00:36
-
-
Save lextra2/4722bde44949990ae98af192ccd7799d to your computer and use it in GitHub Desktop.
FFMPEG.BAT - Encodes the first video/audio stream of all mkv files in this .bat location into h264 two-pass/flac, than moves them to the ENCODED folder. Requires all files to be in the same location.
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
mkdir ENCODED | |
for %%a in (*.mkv) do ( | |
ffmpeg -i "%%a" -map_metadata -1 -map_chapters -1 -c:v libx264 -b:v 5M -preset medium -tune animation -pass 1 -vf format=yuv420p10le -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -an "ENCODED\%%~na.mkv" | |
ffmpeg -y -i "%%a" -c:v libx264 -b:v 5M -preset medium -tune animation -pass 2 -vf format=yuv420p10le -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -c:a flac "ENCODED\%%~na.mkv" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment