syonip/flutter_fbstorage_video_upload

m3u8 wrong encoding

dvird opened this issue · 5 comments

dvird commented

Hi there is problem with your script and im wondering how did it work for you.

your code uploading the following master.m3u8 content
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=2305601,RESOLUTION=1080x1920,CODECS="avc1.42c028,mp4a.40.2"
0_playlistVariant.m3u8?alt=media

#EXT-X-STREAM-INF:BANDWIDTH=507101,RESOLUTION=1080x1920,CODECS="avc1.42c028,mp4a.40.2"
1_playlistVariant.m3u8?alt=media

the problem with that after investigating other m3u8 files around the web, its that the file does not contain full link.
for example:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=2305601,RESOLUTION=1080x1920,CODECS="avc1.42c028,mp4a.40.2"
https://firebasestorage.googleapis.com/v0/b/testapp-a1a1-media/o/1604602377690%2Fvideo9580%2F0_playlistVariant.m3u8?alt=media

#EXT-X-STREAM-INF:BANDWIDTH=507101,RESOLUTION=1080x1920,CODECS="avc1.42c028,mp4a.40.2"
https://firebasestorage.googleapis.com/v0/b/testapp-a1a1-media/o/1604602377690%2Fvideo9580%2F1_playlistVariant.m3u8?alt=media

Hi @dvird ,
I don't think the full link is necessary, but from your links it seems like the files are stored inside folders, so you need to have the relative path in the playlist file.
In my example I'm appending the folder path to the urls in the file, so maybe that's what you're missing:

updatedLine = '$videoName%2F$line?alt=media';

dvird commented

k il check it

@dvird Excuse me. Could you show I did you solve the problem? I have the same issue.

Sorry but could you explain how you manage to produce full https links instead of relative paths. I missed that in your code.

MY file is like that

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=2833600,RESOLUTION=640x1136,CODECS="avc1.42c01f,mp4a.40.2"
media%2FoQFoW8oZovtRxW5vaiMv%2F0_playlistVariant.m3u8?alt=media
#EXT-X-STREAM-INF:BANDWIDTH=1035100,RESOLUTION=640x1136,CODECS="avc1.42c01f,mp4a.40.2"
media%2FoQFoW8oZovtRxW5vaiMv%2F1_playlistVariant.m3u8?alt=media

When it should include full https URLs. How did you do this in your code?

Thanks

Hi @jenniestrongbow
The m3u8 file shouldn't have full https urls, just relative urls for files that are stored in firebase storage.
The full url is created automatically by the video player playing the m3u8 file