Skip to end of metadata
Go to start of metadata

ffmpeg can embed subtitles as a part of tracks in a single file.

Encode single subtitle in ffmpeg

ffmpeg -i test_30sec.mov \
	-f srt \
	-i subtitle_en.srt \
	-map 0:0 -map 0:1 -map 1:0 \
	-c:v copy -c:a copy \
	-c:s mov_text \
	-metadata:s:s:0 language=eng \
	output.mp4


Encode two subtitles in ffmpeg

ffmpeg -i test_30sec.mov \
	-f srt \
	-i subtitle_en.srt \
	-i subtitle_fr.srt \
	-map 0:0 -map 0:1 -map 1:0 -map 2:0 \
	-c:v copy -c:a copy \
	-c:s mov_text -c:s mov_text \
	-metadata:s:s:0 language=eng \
	-metadata:s:s:1 language=fra \
	output.mp4


Encode three subtitles in ffmpeg

ffmpeg -i test_30sec.mov \
	-f srt \
	-i subtitle_en.srt \
	-i subtitle_it.srt \
	-i subtitle_fr.srt \
	-map 0:0 -map 0:1 -map 1 -map 2 -map 3 \
	-c:v copy -c:a copy \
	-c:s mov_text \
	-metadata:s:s:0 language=eng \
	-metadata:s:s:1 language=ita \
	-metadata:s:s:2 language=fra \
	output.mp4
  • No labels