flutter_fbstorage_video_upload icon indicating copy to clipboard operation
flutter_fbstorage_video_upload copied to clipboard

m3u8 file string update issue

Open hyobbb opened this issue 5 years ago • 6 comments
trafficstars

Hi. I'd like to ask you about playlistUrl update.

image

As you can see the file type of 'm3u8' extensions is recognized as stream file not audo_mpegUrl. I am appending 'video%2F$videoName%2F' in front because I save those folders in subfolder of 'video' folder. The updated contents is like below(videoName is different because screenshot is from other trial but it resulted the same)

I/flutter ( 4151): #EXTM3U
I/flutter ( 4151): #EXT-X-VERSION:3
I/flutter ( 4151): #EXT-X-STREAM-INF:BANDWIDTH=683098,RESOLUTION=640x360,CODECS="avc1.42c01e,mp4a.40.2"
I/flutter ( 4151): video%2F1605666932022%2F0_playlistVariant.m3u8?alt=media
I/flutter ( 4151): 
I/flutter ( 4151): #EXT-X-STREAM-INF:BANDWIDTH=2481598,RESOLUTION=1280x720,CODECS="avc1.42c01f,mp4a.40.2"
I/flutter ( 4151): video%2F1605666932022%2F1_playlistVariant.m3u8?alt=media
I/flutter ( 4151): 
I/flutter ( 4151): #EXT-X-STREAM-INF:BANDWIDTH=5781598,RESOLUTION=1920x1080,CODECS="avc1.42c028,mp4a.40.2"
I/flutter ( 4151): video%2F1605666932022%2F2_playlistVariant.m3u8?alt=media

appending logic is like:

if (line.contains('.ts') || line.contains('.m3u8')) {
           updatedLine = '$video%2F$videoName%2F$line?alt=media';
         }

where $video refers 'video'.

Do you have any idea how to fix this issue? Thanks in advance.

hyobbb avatar Nov 18 '20 02:11 hyobbb

another question is that.. if it is relative path then in my case where every files are in same location it should work without additional folder name right? well.. but it doesn't work either.

hyobbb avatar Nov 18 '20 04:11 hyobbb

Hi @hyobbb , Firebase Cloud Storage infers the file type automatically, but if you want to override it you can, as described here: https://firebase.google.com/docs/storage/web/upload-files#add_file_metadata

syonip avatar Nov 18 '20 06:11 syonip

Hi @hyobbb , Firebase Cloud Storage infers the file type automatically, but if you want to override it you can, as described here: https://firebase.google.com/docs/storage/web/upload-files#add_file_metadata

Hi. Well the problem is that I can't play it. Do you see any problem on that file string?

hyobbb avatar Nov 18 '20 06:11 hyobbb

To test the file you can get the download url and put it in one of the online hls players. Search "test hls stream" on google.

syonip avatar Nov 18 '20 09:11 syonip

https://firebasestorage.googleapis.com/v0/b/ssup-proto.appspot.com/o/video%2F1605675388681%2Fmaster.m3u8?alt=media&token=75671128-66f2-4e49-ba1b-ff33e522d7bf

tested with chorme hls extension but it keeps buffering and never play :(

hyobbb avatar Nov 18 '20 09:11 hyobbb

Looking at your file, the links to the variant don't contain the folder prefix. Check this comment: https://github.com/syonip/flutter_fbstorage_video_upload/issues/6#issuecomment-722932519

syonip avatar Nov 19 '20 08:11 syonip