I have some caption files that are separate from their respective videos, and I would like to put them together using the code below:
ffmpeg -i videoSemLegenda.mp4 -i legenda.vtt -c copy -c:s mov_text videoComLegenda.mp4
When outputting to videoComLegenda using ffmpeg -i videoComLegenda.mp4
The output of ffmpeg shows that the caption is along with the video, however when trying to play the video in the <video>
tag the caption is not shown. How do I force the caption to be written inside the video?
This is the output ffmpeg for a file whose captions were put through the above code:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x960 [SAR 1:1 DAR 4:3], 1459 kb/s, 29.97 fps, 29.97 tbr, 16k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(por): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 256 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(und): Subtitle: mov_text (tx3g / 0x67337874) (default)
Metadata:
handler_name : SubtitleHandler