axiomatic-systems / Bento4

Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools
http://www.bento4.com
2.04k stars 483 forks source link

Subtitles M3u8 playlist not generated for WebVtt file #311

Open pscplayco opened 6 years ago

pscplayco commented 6 years ago

When trying to package subtitles from a WebVTT file, using mp4dash tool, and in order to get an HLS stream, I'm getting a master playlist which is just pointing to a WebVTT file instead of an m3u8 subtitltes playlist. Therefore, the iOS native player and other HLS test players I've tried are not able to read and show subtitles.

This is the command I'm using: mp4dash --hls --subtitles [+format=webvtt,+language=ar]testfile.vtt *.mp4

And this is what I get into my master m3u8 playlist:

Subtitles

EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="ar",DEFAULT=NO,AUTOSELECT=YES,FORCED=YES,LANGUAGE="ar",URI="subtitles/ar/testfile.vtt"

The only way I've got it to work is:

Do you think this is something that can be added to the code? Otherwise, if I were wrong, how can subtitles be added to the HLS stream, so that the native iOS player is able to fetch them correctly?

Thank you in advance

barbibulle commented 6 years ago

I'm pretty sure this worked some time ago, maybe with older version of iOS or macOS. But it doesn't seem to match what in the most recent RFC, so I think WebVTT files should be referenced by a paylist rather than directly. I'll double check and make the fix if that's the case.

ghost commented 5 years ago
  • creating an m3u8 subtitles playlist, pointing to the webvtt generated file

@pscplayco How do you create the m3u8 subtitle playlist?

pscplayco commented 5 years ago

that was very long ago....but I think it was just manually generating it

ghost commented 5 years ago

@pscplayco I want to add a url for a single vtt file into the master m3u8 and I can't find a proper way. I'm looking for a manual way as well.

night91 commented 4 years ago

We still having this issue.

DrJapan commented 2 years ago

Yep