Skip to content

Instantly share code, notes, and snippets.

@kekyo
Created April 8, 2019 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kekyo/64e6fcdce8d982cc51e982710d02dcf7 to your computer and use it in GitHub Desktop.
Save kekyo/64e6fcdce8d982cc51e982710d02dcf7 to your computer and use it in GitHub Desktop.
Embedding subtitles into mp4 container using ffmpeg
setlocal EnableDelayedExpansion
for %%p in (original\*.mp4) do (
rem echo "%%p" "%%~dp%%~pp%%~np.srt"
..\..\ffmpeg\bin\ffmpeg.exe -i "%%p" -i "%%~dp%%~pp%%~np.en.srt" -map 0:v -map 0:a -map 1:s -metadata:s:s:0 language=eng -c:v copy -c:a copy -c:s mov_text "%%~np.mp4"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment