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

Specific urls of can not play on Windows platform #121

Closed luckykeeper closed 11 months ago

luckykeeper commented 1 year ago

First, thanks to your amazing package and hardwork I'm new to flutter, when using this package,I found some specific urls of can not play on Windows platform

my code can be seen at https://github.com/luckykeeper/OAPlayer

I tried some links on the public server, it works well, so I believe the program works well, but when I switch to the urls on my server , It just can't play. the urls on my server looks like this :

https://wdv2.luckykeeper.site:44443/api/v3/file/get/19722/%E3%80%90%E3%83%8F%E3%83%9F%E3%83%80%E3%82%B7%E3%82%AF%E3%83%AA%E3%82%A8%E3%82%A4%E3%83%86%E3%82%A3%E3%83%96%E5%87%B8%20%E5%A6%83%E6%84%9BED%E3%80%91Heart%20Creation%E3%80%90%E5%85%AC%E5%BC%8F%E3%83%BBFULL%E3%80%91-HS1h-bOPSKI.mkv?sign=v1Uc5PvAGkDXMozwByEZCtY6loUlLDCgrf-S467l0B4%3D%3A0

but this video can play on my Android Phone with same code, and also tried other types video (mp4\mkv\webm, all works well on Android),so I think this problem may relate to windows platform

the error messages on Windows platform:

{"timestamp":"2023-06-17T19:32:26.308532Z","level":"error","prefix":"libmpv_render/dxva2-egl","message":"Failed to create EGL surface"} [log] {"timestamp":"2023-06-17T19:32:26.489416Z","level":"error","prefix":"stream","message":"Failed to open https://wdv2.luckykeeper.site:44443/api/v3/file/get/19722/%E3%80%90%E3%83%8F%E3%83%9F%E3%83%80%E3%82%B7%E3%82%AF%E3%83%AA%E3%82%A8%E3%82%A4%E3%83%86%E3%82%A3%E3%83%96%E5%87%B8%20%E5%A6%83%E6%84%9BED%E3%80%91Heart%20Creation%E3%80%90%E5%85%AC%E5%BC%8F%E3%83%BBFULL%E3%80%91-HS1h-bOPSKI.mkv?sign=v1Uc5PvAGkDXMozwByEZCtY6loUlLDCgrf-S467l0B4%3D%3A0."} [log] {"timestamp":"2023-06-17T19:32:26.490421Z","level":"error","prefix":"ytdl_hook","message":""} [log] {"timestamp":"2023-06-17T19:32:26.491416Z","level":"error","prefix":"ytdl_hook","message":"youtube-dl failed: not found or not enough permissions"}

from error messages, It looks like your package use youtube-dl on Windows platform to download video from Internet, but youtube-dl can't download from this url, maybe this url too lang or too complex?or I do something wrong in my code?

abdelaziz-mahdy commented 1 year ago

These logs are media_kit logs,

I recommend you test it on media_kit example and if it doesn't work it's media_kit problem. So publishing the issue there may help you and them figure out the problem

My package uses media_kit for playing on windows, I only wrap media_kit and video_player in same interface for ease of usage and making controls

abdelaziz-mahdy commented 1 year ago

Also opening the url provided gives me this

{"code":40071,"msg":"invalid sign"}

I am sorry I used the ones in the logs, which GitHub added } to it

luckykeeper commented 1 year ago

These logs are media_kit logs,

I recommend you test it on media_kit example and if it doesn't work it's media_kit problem. So publishing the issue there may help you and them figure out the problem

My package uses media_kit for playing on windows, I only wrap media_kit and video_player in same interface for ease of usage and making controls

Thanks a lot , I will try later to find out whether media_kit problem cause this

abdelaziz-mahdy commented 1 year ago

i just tested on macos and it works correctly (macos uses media_kit) which is weird,

i will try to open an issue on media_kit

abdelaziz-mahdy commented 1 year ago

i opened an issue on media_kit, hope they help us figuring out the problem and its fix

luckykeeper commented 1 year ago

okay, thank you, looks like media_kit's problem, should I close this issue and track fix progress there(media_kit) or keep this issue open for further discussion & reference

abdelaziz-mahdy commented 1 year ago

okay, thank you, looks like media_kit's problem, should I close this issue and track fix progress there(media_kit) or keep this issue open for further discussion & reference

Let's leave it to write the fix, Incase this happened in the future