2

How to merge a segmented webvtt subtitle file and output a single file?, m3u8 looks like this example:

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXTINF:4, no desc
0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-1.webvtt
#EXTINF:4, no desc
0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-2.webvtt
#EXTINF:4, no desc
0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-3.webvtt
#EXTINF:4, no desc
0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-4.webvtt
#EXTINF:4, no desc
0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-5.webvtt
#EXTINF:4, no desc
0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-6.webvtt
#EXT-X-ENDLIST

I noticed that each segment is not synchronized/cued against total playing time, but against the individual ts segments. If ffmpeg could be used to do this, what magic input do i need to give it?

A single correctly cued vtt or srt file is what i want.

I have a great appetite and don't like chunks, lol!

Thanks for any replies you lovely people!


With this i get a merged vtt file, but the cues are all wrong:

ffmpeg -i "https://cmoreseusphlsvod60.akamaized.net/vod/bea44/0ghzi1b2cz5(11792107_ISMUSP).ism/0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000.m3u8" -f segment -segment_time 4 -segment_format webvtt -scodec copy out-%05d.vtt

Each segment is not synchronized/cued against total playing time, but against the individual ts segments. Example output of above command:

WEBVTT

00:00.000 --> 00:03.040
Du har aktier i ett företag
som saknar framtid.

00:00.000 --> 00:03.280
De vill ha aktierna.
Du känner dem inte, Olga.

00:00.000 --> 00:01.720
De som får Kastrups aktier vinner.

Cues all start like this which isn't very helpfull: 00:00.000

Some segments contains no cues, like segment 15 for example: https://cmoreseusphlsvod60.akamaized.net/vod/bea44/0ghzi1b2cz5(11792107_ISMUSP).ism/0ghzi1b2cz5(11792107_ISMUSP)-textstream_swe=2000-15.webvtt

"A WebVTT Segment MAY contain no cues; this indicates that no subtitles are to be displayed during that period."

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Dobbelina
  • 71
  • 1
  • 5
  • Do you know the duration of each segment? – Gyan Jan 24 '19 at 04:36
  • 1
    Yes, 4 seconds. I think it says so above. here's how the m3u8 looks like that has all the elements: [Pastebin](https://pastebin.com/npDzTJMe). Here's the full url to the stream [https://lbs-usp-hls-vod.cmore.se/vod/bea44/0ghzi1b2cz5(11792107_ISMUSP).ism/0ghzi1b2cz5(11792107_ISMUSP).m3u8](https://lbs-usp-hls-vod.cmore.se/vod/bea44/0ghzi1b2cz5(11792107_ISMUSP).ism/0ghzi1b2cz5(11792107_ISMUSP).m3u8) – Dobbelina Jan 24 '19 at 10:31
  • @Dobbelina Did you have any luck with solving this? – cloudcrypt Sep 03 '19 at 00:37
  • Answer is no, but i buried this puppy a long time ago. Seems like a tricky issue to solve. – Dobbelina Sep 03 '19 at 07:23

0 Answers0