Currently, still pictures are extracted from the movie with subtitles, but it seems that subtitles are not displayed in the place they should be.
I am making a still image with the following command.

ffmpeg -ss "00:02:29" -copyts -i input.mkv -filter_complex "[0:0][0:4]overlay" -vframes 1 sample.jpg

I also confirmed 27, 28 and 30 seconds, but subtitles were not included.
However, when specifying 29.5 seconds, subtitles were included.

Also, subtitle data is saved in the movie data as follows.

Stream #0:4(jpn): Subtitle: hdmv_pgs_subtitle (default)

Also, when subtitle data was extracted to sup and parsed to xml and png, the content of xml was as follows.

<Event InTC="00:02:27:02" OutTC="00:02:30:14" Forced="False">
  <Graphic Width="853" Height="132" X="523" Y="891">main_0047.png</Graphic>

Also, when actually playing and checking the video with the player, the content of xml did not seem to be wrong.

What is wrong?

  • Does the subtitle show up at the correct times with this command: ffmpeg -i input.mkv -filter_complex "[0:0][0:4]overlay" -c:a copy -t 02:32 test.mp4
    – Gyan
    May 22, 2018 at 15:06
  • Always thank you, gyan. You have been very helpful. In order to execute this command, "- strict -2" had to be added. The subtitle was displayed correctly for mp4 created by executing this command. So it may be good to convert to mp4 and take a still picture. But It is a weak point that it takes time to convert. May 22, 2018 at 15:47
  • That was just to test something. Try ffmpeg -ss "00:02:20" -i input.mkv -filter_complex "[0:0][0:4]overlay" -ss 9 -vframes 1 sample.jpg
    – Gyan
    May 22, 2018 at 15:49
  • This command successfully displayed subtitles.To be exact, 27 seconds is not displayed, 28, 29, 30 are displayed and match the contents of xml. May 22, 2018 at 16:01

1 Answer 1



ffmpeg -ss "00:02:20" -i input.mkv -filter_complex "[0:0][0:4]overlay" -ss 9 -vframes 1 sample.jpg

where the first ss value indicates a time before the intended subtitle starts.

The second ss is to be chosen so that the first+second ss value equate to the final desired seek point.

Don't know for sure, but this happens because input seeking does not handle subtitles correctly if an entry is ongoing at the seek point.


You must log in to answer this question.

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