syonip / flutter_fbstorage_video_upload

MIT License
34 stars 31 forks source link

m3u8 wrong encoding #6

Closed dvird closed 3 years ago

dvird commented 3 years ago

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

syonip commented 3 years ago

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: https://github.com/syonip/flutter_fbstorage_video_upload/blob/a21fee1ba29e8961f376f759f5ab3c5c14f685b7/lib/main.dart#L112

dvird commented 3 years ago

k il check it

hyobbb commented 3 years ago

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

jenniestrongbow commented 2 years ago

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

syonip commented 2 years ago

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