[FFmpeg-user] Sync subtitles with HLS VOD
tamir at yokee.tv
Thu Dec 27 14:57:38 EET 2018
i'm trying to sync webVTT subtitles with HLS video.
1. segment the mp4 to 10sec segments
2. repeat step 1 for multiple renditions
* these steps are done by using the script found here:
3. segment the webVTT file and update the master playlist with the
* using this command: ffmpeg -i SOURCE -f segment -segment_time 10
-segment_format webvtt -scodec copy -segment_list PLAYLISTNAME-sub.m3u8
-segment_list_type m3u8 SEGMENTNAME-%d.vtt
problem: subtitles are not synced with video/audio
i noticed that my VOD script changes the video start time and my first
segment of the video gets pkt_pts = 133200 , whereas in the original video
it starts with 0.
i'm not sure if
a.i should force my script to set the initial ts to 0 - was not able to
b. add an offset to my VTT files. - seems really strange that i would have
to ffprobe each segmented video for pkt_pts value and then edit my VTT
what am i missing? is there an easier way to achieve this?
More information about the ffmpeg-user