Skip to content

Instantly share code, notes, and snippets.

@lg3bass
Created February 22, 2017 17:11
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 lg3bass/4a9db2d39511810df3ca1467008a46e3 to your computer and use it in GitHub Desktop.
Save lg3bass/4a9db2d39511810df3ca1467008a46e3 to your computer and use it in GitHub Desktop.
FFMPEG > embed .srt in .mp4 (for Quicktime only)
//ISSUE: Quicktime sometimes doesn't play .srt files even if they are named the exact same thing in the same folder.
//SOLUTION: Use ffmpeg to add metadata to the .mp4 container and embed the .srt file.
This process is lossless as we use a passthrough encoder.
//note. this process is similar to the .m4v container and embedding .srt files.
//SOURCE: https://discussions.apple.com/thread/2115778?tstart=0
ffmpeg -i video.mp4 -i sub.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng out.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment