Sync subtitles with HLS VOD

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sync subtitles with HLS VOD

Tamir Maoz
Hi,
i'm trying to sync webVTT subtitles with HLS video.
my process:
1. segment the mp4 to 10sec segments
2. repeat step 1 for multiple renditions
* these steps are done by using the script found here:
https://gist.github.com/mrbar42/ae111731906f958b396f30906004b3fa
3. segment the webVTT file and update the master playlist with the
subtitles info.
* 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
cause:
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
accomplish that
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
files accordingly.

what am i missing? is there an easier way to achieve this?
Thanks.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Sync subtitles with HLS VOD

Carl Eugen Hoyos-2
2018-12-27 13:57 GMT+01:00, Tamir Maoz <[hidden email]>:

> i'm trying to sync webVTT subtitles with HLS video.
> my process:
> 1. segment the mp4 to 10sec segments
> 2. repeat step 1 for multiple renditions
> * these steps are done by using the script found here:
> https://gist.github.com/mrbar42/ae111731906f958b396f30906004b3fa

> 3. segment the webVTT file and update the master playlist with the
> subtitles info.
> * 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

Please provide the actual command line together with the complete,
uncut console output.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".