I would like to burn subtitles into a video file using a console program. Previously I used ffmpeg
to do that:
ffmpeg -i input.mkv -vf subtitles=sub.srt -strict -2 out.mp4
However, I am having problems when my subtitles are delayed with regard to the movie. I looked into -ioffset
option and setpts
filter, but they allow me move the video, but I'd like the video timing to stay unchanged and only burn in the subtitles in a delayed manner.
Is there a way to do it in ffmpeg
(I suppose no, as burning subtitles is a filter and I don't see a way to "change" a behavior of filters, but I haven't looked at all of them)? If not, is there an easy-to-use console program which would delay the subtitles before burning them in?
答案1
You can first move the subtitles using ffmpeg as discussed in “What is difference between -ss and -itsoffset in ffmpeg?” and then burn the modified subtitles into your video:
ffmpeg -ss 01:23:45 -i sub.srt sub_moved.srt
ffmpeg -i input.mkv -vf subtitles=sub_moved.srt -strict -2 out.mp4