[FFmpeg-user] Troubles segmenting WebVTT

Stefano Sabatini stefasab at gmail.com
Thu Feb 12 14:48:40 CET 2015


On date Tuesday 2015-02-10 20:43:31 -0700, Deron wrote:
> On 2/10/15 3:20 AM, Stefano Sabatini wrote:
> >On date Saturday 2015-02-07 22:15:58 -0700, Deron wrote:
> >>I'm trying to capture ATSC with a tuner card and stream it out via
> >>HLS. I've got it more or less working, and now I would like to try
> >>my hand and streaming out closed captioning in WebVTT utilizing the
> >>eia 608 demuxer.
> >>
> >>First, I captured 10 minutes of video to my HD. Then I used:
> >>
> >>ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s WPEC.vtt
> >>
> >>which generated a good .vtt file and then
> >>
> >>ffmpeg -i WPEC.vtt -f segment -segment_time 10 -segment_format
> >>webvtt -scodec copy WPEC-%05d.vtt
> >>
> >>to generate segments 00000 to 00038 and it works just fine.
> >>
> >>However,
> >>
> >>ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f segment
> >>-segment_time 10 -segment_format webvtt WPEC-%05d.vtt
> >>
> >>fails to generate segments. What it generates is just one segment
> >>named WPEC-00000.vtt.
> >>
> >>What am I doing wrong?
> >>
> >>Deron
> >>
> >>Complete uncut output:
> >>
> >># ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f segment
> >>-segment_time 10 -segment_format webvtt WPEC-%05d.vtt
> >Use -loglevel debug, segment will generate log messages showing the
> >input PTSs. Also, are you sure you have many key-frames in your input
> >file?
> >
> 

> I can't imagine how PTS or i-frames can be defined in a .vtt ? But
> I'm certainly looking for understanding! In a private email, Anshul
> Maheshwari suggested that it was incomplete in his WebVTT
> implementation and he hopes to get it resolved some day. I've
> started trying to just trace along to figure out what it is doing
> but it is a large amount of stuff to absorb at once. I wanted to
> learn more about HLS, so I'm not apposed to trying to solve the
> problem if it needs to be.

For example to check for key-frames:
ffprobe INPUT -show_entries packet=pts,flags -of compact

you check the packet flags to see if it is a key-frame (in that case
it will be marked with a "K").

Alternatively:
ffprobe INPUT -skip_frames nokey -show_frames -of compact

> Thanks for your input,


More information about the ffmpeg-user mailing list