[FFmpeg-devel] [PATCH] avformat/segment: segment subtitle streams

Aman Gupta ffmpeg at tmm1.net
Wed May 21 09:08:49 CEST 2014


> Unless I'm mistaken the AV_PKT_FLAG_KEY should be set for subtitles
> packets. See in ff_subtitles_queue_insert()

You're right, ff_subtitles_queue_insert() is definitely adding the
flag. But by the time the packet reaches the seg_write_packet(), the
flag is missing. I verified this via the av_dlog in that function,
which reports is_key:0 on all packets.

I'm using the following command to test on master:

  ./ffmpeg -i fate-suite/sub/WebVTT_capability_tester.vtt -c:s srt -f
segment -segment_time 1 /tmp/out%d.srt

Only one output file is generated (instead of 16, one per second).

I'm not familiar with the extra steps between webvttdec.c and
segment.c where the flag might be getting lost. If someone can provide
a pointer I'm happy to investigate further and come up with a better
patch.

  Aman


More information about the ffmpeg-devel mailing list