abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
132 stars 69 forks source link

[m3u8] network Video play error when drag the progress bar to an unbuffered position #156

Closed huafsud closed 10 months ago

huafsud commented 10 months ago

When I drag the progress bar to an unbuffered position, it will freeze some second and then jump back to the beginning at 0:00.

****flutter_meedu_videoplayer**** I test flutter_meedu_videoplayer on macos and ios , the error will exists but , i test web [https://zezo357.github.io/flutter_meedu_videoplayer_example/#m3u8] , It's OK , It's OK !!!!!

test code is project m3u8_page_example.dart

****flutter_meedu_media_kit**** I test flutter_meedu_media_kit ,and update media_kit version to lastest , the error still exist

test code is project m3u8_page_example.dart

****same macos player app**** i test macos player [IINA.app], same url , same drag to a nunbuffered position, it's not work too....

but [VLC.app] not this error, it's work~

****need help****

i don't know, how to sloved this error, I also don't have any solution ideas at the moment.

@zezo357 need help ~~

Thank you ~

abdelaziz-mahdy commented 10 months ago

I must clarify that I refrain from engaging with NSFW content. However, if the issues are prevalent on macOS and iOS, it's likely related to the media_kit. Have you tested it on iOS without using media_kit? It's also worth noting that the web version uses HLS, which relies on a dedicated JavaScript library.

Please note, I've removed the links related to NSFW content from the repository. My apologies, but I believe it's important to maintain a professional standard.

if you can provide another example in which its not nsfw, i would try to help you

huafsud commented 10 months ago

Sorry, the URL I provided was incorrect. I have now provided the correct link.

https://twitter.com/CHENLEITO/status/1688935503733645312

https://video.twimg.com/amplify_video/1687553528854646784/pl/63-3Engy9Suh_mKY.m3u8?variant_version=1&tag=14&container=fmp4

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=787470,BANDWIDTH=2460802,RESOLUTION=1280x720,CODECS="mp4a.40.2,avc1.640020"
/amplify_video/1687553528854646784/pl/1280x720/VDCNxX576c0Xs7dU.m3u8?container=fmp4
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=297320,BANDWIDTH=933944,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d001f"
/amplify_video/1687553528854646784/pl/640x360/_xRBv1fckeY4cLBi.m3u8?container=fmp4
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=107647,BANDWIDTH=322434,RESOLUTION=480x270,CODECS="mp4a.40.2,avc1.4d001e"
/amplify_video/1687553528854646784/pl/480x270/80nPrpcso5b-Ywxx.m3u8?container=fmp4

https://video.twimg.com/amplify_video/1687553528854646784/pl/1280x720/VDCNxX576c0Xs7dU.m3u8?container=fmp4

Q: Have you tested it on iOS without using media_kit A: Yes , macos 13 and [ios Simulator] will error when drag the progress bar to an unbuffered position

abdelaziz-mahdy commented 10 months ago

thank you for providing a url which is safe for work

will try and let you know (most probably at weekend)

also can you show the logs

abdelaziz-mahdy commented 10 months ago

Also I think it may be the logic of separating the m3u8 to qualities is the one causing the problem

But further testing will make me sure

huafsud commented 10 months ago
[log] {"timestamp":"2023-08-15T09:43:38.181611Z","level":"error","prefix":"ffmpeg","message":"NULL: missing picture in access unit with size 552"}
[log] {"timestamp":"2023-08-15T09:43:38.181839Z","level":"error","prefix":"ffmpeg","message":"NULL: Invalid NAL unit size (-759071604 > 2512)."}
[log] {"timestamp":"2023-08-15T09:43:38.182093Z","level":"error","prefix":"ffmpeg","message":"NULL: missing picture in access unit with size 2516"}

[flutter_meedu_videoplayer] in macos , will print some this Warning log. I don't know if these are helpful ,

abdelaziz-mahdy commented 10 months ago

I can add an option to disable logs

But from what I see from these that ffpmeg can't access the position of which you need 😢

Anyway I will need sometesting to make it work, can you try media_kit and see if it happens and if it does open an issuer on their repo ?