User Tools

Site Tools


ffmpeg:subtitles:add_subtitles_to_mp4_vs_mkv

This is an old revision of the document!


ffmpeg - Subtitles - Add subtitles to MP4 vs MKV

Different syntax is used for MP4 and MKV.

In both cases you must specify video and audio codec, or just copy stream if you just want to add subtitle.


MP4

ffmpeg -i input.mp4 -f srt -i input.srt \
-map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy \
-c:s mov_text output.mp4

MKV

ffmpeg -i input.mp4 -f srt -i input.srt \
-map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy \
-c:s srt output.mkv

References

ffmpeg/subtitles/add_subtitles_to_mp4_vs_mkv.1735596875.txt.gz · Last modified: 2024/12/30 22:14 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki