coslyk / moonplayer

Video player that can play online videos from youtube, bilibili etc.
https://coslyk.github.io/moonplayer.html
GNU General Public License v3.0
644 stars 93 forks source link

Can't play youtube video #97

Closed soflare closed 4 years ago

soflare commented 4 years ago

OS: Ubuntu 20.04 App: MoonPlayer-3.3.2-x86_64.AppImage

Error Log:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
WARNING: Cannot find style "fusion" - fallback: "/tmp/.mount_MoonPlKK4zvK/usr/qml/QtQuick/Controls/Styles/Desktop"
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
mesa: for the   --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the   --global-isel-abort option: may only occur zero or one times!
[cplayer] Warning: option --video-aspect was replaced with --video-aspect-override and might be removed in the future.
[ffmpeg] tcp: Port missing in uri
[stream] Failed to open https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1595558499/ei/A_YZX8jcM8bCkgaXobKoDA/ip/0.0.0.0/id/zhY2CH_PyLU.1/itag/91/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D139/sgovp/gir%3Dyes%3Bitag%3D160/hls_chunk_host/r2---sn-n4v7knll.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/5780/mh/5P/mm/44/mn/sn-n4v7knll/ms/lva/mv/m/mvi/2/pl/25/dover/11/keepalive/yes/fexp/23883098/mt/1595536755/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIhAOq9i1U5XpvkWr09vLov_rrol-gXMSVe1OIaFAL0f3WNAiBZ66tGnTiaix7aef7JOQvbbagYhhl_TyFuEgsZbYGVsQ%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRQIgEszQzhnMu_bjcHAVILMxNTKUCdQ7lEWXPUHXTMMDzF8CIQDiK06Gg-TlrVvc0-wn9imhZLBjc_kpn2YemR-qfHGp0A%3D%3D/playlist/index.m3u8.
MPV Error:  loading failed
coslyk commented 4 years ago

what is the original URL?

soflare commented 4 years ago

If I remember correctly, the URL is https://www.youtube.com/watch?v=zhY2CH_PyLU I had tried other youtube video, no luck.

coslyk commented 4 years ago

I played it successfully. Pls check if your youtube-dl is up-to-date (by clicking "update plugins" in the context menu), and your network is ok.

soflare commented 4 years ago

I'm pretty sure I have updated to the latest version of youtube-dl. BTW, I have to use http proxy to access youtube. And I can choose video format and resolution, so the url is parsed successfully. I can play the video with mpv player (installed with apt)

coslyk commented 4 years ago

Can you download the video?

soflare commented 4 years ago

No, "internal problem"

Error log:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
WARNING: Cannot find style "fusion" - fallback: "/tmp/.mount_MoonPlcfidIS/usr/qml/QtQuick/Controls/Styles/Desktop"
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
mesa: for the   --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the   --global-isel-abort option: may only occur zero or one times!
Http status code: 0
Host r2---sn-n4v7sn7y.googlevideo.com not found

QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
soflare commented 4 years ago

I just found that moonplayer works properly with proxychain-ng. So I think the problem is caused by malformed command line generated for ffmpeg while using http proxy.

coslyk commented 4 years ago

The latest version https://github.com/coslyk/moonplayer/releases/tag/v3.4-beta may fix this error.

soflare commented 4 years ago

Not fixed

coslyk commented 4 years ago

What is your proxy settings? The format should be like 127.0.0.1:8087. (And you may try the Flatpak version. The AppImage is not recommended)

soflare commented 4 years ago

Oh, the format is the root cause, I set to http://127.0.0.1:8087 before. It works after remove the http:// scheme prefix. Thank you.

coslyk commented 4 years ago

Thanks for the feedback. I added a stricter proxy format check in https://github.com/coslyk/moonplayer/commit/c6fbcbfd61b0e64a70aae6afbb5e94f088b0e9b7.