1

I was looking for issue where if we cut video using -ss flag, video conversion doesn't start. The answer I found suggests to use -ss flag before -i flag to seek video before conversion.

ffmpeg  -ss 01:06:29 -i "input.mp4" -t 00:00:35 -vf "subtitles=sub.srt:force_style='FontSize=32,PrimaryColour=&Hfcc545',scale=462:-1" "output.mp4"

But when I use this approach, subtitles don't get burned to output.

1 Answer 1

1

The subtitles filter only starts when the timecode of the first subtitle is encountered. If you use -ss before -i and the remaining duration is less than the timecode of the first subtitle, then it won't be activated.

Either modify the subtitle so that the first subtitle is one that is set to show after the cutpoint and reduce all timecode references by that amount

--or--

Use -ss after -i, like you were doing before. Note that the conversion does start. What's happening is that FFmpeg decodes all packets and discards them until seek point is reached. The encoding statistics don't start rolling till encoding commences. That only happens when the seek point is reached, which will take some time, depending on how deep your seek point is.

3
  • Ya I was trying to save conversion time. Now I converted subtitle file first using output seeking(-ss after -i) then did video encoding using input seeking(-ss before -i), takes two passes but saves the time. Thanks.
    – Zorro Here
    Commented Aug 29, 2016 at 12:50
  • Why two passes? You can burn and encode in one go.
    – Gyan
    Commented Aug 29, 2016 at 13:20
  • 1
    Yes sorry for confusion, it burns and encodes in single pass just I have to cut subtitles first using ffmpeg -ss 01:06:30.80 -i "sub.srt" -t 00:00:35 "out.srt". If you mean I can cut subtitles, burn and encode in single pass please post how I can do that.
    – Zorro Here
    Commented Aug 29, 2016 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .