Burning webvtt subtitles to mp4 video

ffmpeg

I'm looking for a way that burning subtitles to mp4 videos with ffmpeg.

I used the following command to convert and burn subtitle but its not worked !

ffmpeg -i subtitle.vtt subtitle.srt
ffmpeg -i video.mp4 -i subtitle.vtt -c copy -c:s mov_text out.mp4
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:0 -> #0:2 (webvtt -> mov_text)
Press [q] to stop, [?] for help
[mp4 @ 0x80aee0] Encoder did not produce proper pts, making some up.
frame= 2692 fps=1139 q=-1.0 Lsize=    2416kB time=00:01:29.83 bitrate= 220.3kbits/s
video:1264kB audio:1053kB subtitle:2 global headers:0kB muxing overhead 4.178210%

Best Answer

Your command is muxing the subtitles (putting into the video file, so client can turn them on and off); not burning them to the video.

Since you want to burn them into the video, you should first convert your .vtt to .ass (note: your ffmpeg must have been built with libass):

ffmpeg -i subtitle.vtt subtitle.ass

Then burn the subtitles to the video:

ffmpeg -i video.mp4 -vf ass=subtitle.ass out.mp4

Now out.mp4 will have burned subtitles.

Related Question