Skip to content

Instantly share code, notes, and snippets.

@modjke
Created October 23, 2017 08:18
Show Gist options
  • Save modjke/66da8432a53505e95b83ca9e8be2ee29 to your computer and use it in GitHub Desktop.
Save modjke/66da8432a53505e95b83ca9e8be2ee29 to your computer and use it in GitHub Desktop.
.BAT to convert 10 bit MKV with subtitles to 8 bit MP4 keeping subtitles
::save as .bat, drag and drop video
::converts 10 bit MKV (or whatever ffmpeg supports) to 8 bit MP4
::before converting anything take a closer look at MAP param
::maybe you dont need to map anything at all (leave as 'set MAP=')
::subtitles copied as mov_text too
set IN=%1
set OUT="%~dp1e_%~nx1"
set MAP=-map 0:0 -map 0:2 -map 0:4
ffmpeg.exe -i %IN% %MAP% -c:v h264_nvenc -preset default -pix_fmt yuv420p -crf 23 -c:a copy -scodec mov_text -c:s copy -copy_unknown -c:v h264_nvenc -y %OUT%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment