MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.18k stars 352 forks source link

MPD wont play https stream from youtube #1071

Closed AndriiZ closed 3 years ago

AndriiZ commented 3 years ago

Bug report

Describe the bug

I am trying to play youtube audio

Expected Behavior

Track are playing correctly

Actual Behavior

Got an exception CURL failed: server certificate verification failed. CAfile: none CRLfile: none

Version

LibreELEC:/tmp # /bin/bash -c 'LD_LIBRARY_PATH=/opt/mpd/lib/:/opt/mpd/lib/arm-linux-gnueabihf/:/opt/mpd/usr/lib/arm-linux-gnueabihf/pulseaudio/ exec /opt/mpd/mpd -V' Music Player Daemon 0.22.4 (0.22.4) Copyright 2003-2007 Warren Dukes warren.dukes@gmail.com Copyright 2008-2018 Max Kellermann max.kellermann@gmail.com This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins: simple proxy upnp

Storage plugins: local udisks nfs curl

Neighbor plugins: upnp udisks

Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2 [audiofile] wav au aiff aif [dsdiff] dff [dsf] dsf [hybrid_dsd] m4a [faad] aac [mpcdec] mpc [wavpack] wv [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm [sidplay] sid mus str prg P00 [wildmidi] mid [fluidsynth] mid [adplug] amd d00 hsc laa rad raw sa2 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps:// [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz [pcm] Filters: libsamplerate soxr

Tag plugins: id3tag

Output plugins: shout null fifo sndio pipe alsa ao openal pulse jack httpd recorder

Encoder plugins: null vorbis opus lame twolame wave flac shine

Archive plugins: [bz2] bz2 [zzip] zip [iso] iso

Input plugins: file archive alsa tidal qobuz curl ffmpeg nfs mms cdio_paranoia

Playlist plugins: extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols: file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmps:// rtmpt:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp:// tidal://

Other features: avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

Log

Feb 02 18:58 : exception: Failed to decode https://r2---sn-a5oxu-px8s.googlevideo.com/videoplayback?expire=1612306480&ei=0IMZYNKDJJrF1wLVlDg&ip=176.38.240.19&id=o-AOs5Dw8KgYbG4T-haMm9XldxvbyZq7AwzofQ6du_7d68&itag=140&source=youtube&requiressl=yes&mh=Fr&mm=31%2C29&mn=sn-a5oxu-px8s%2Csn-3c27sn7d&ms=au%2Crdu&mv=m&mvi=2&pl=17&initcwndbps=1223750&vprv=1&mime=audio%2Fmp4&ns=tiMrPWM2ZB65jW7rB8UqWtAF&gir=yes&clen=3079237&dur=190.217&lmt=1580700028337232&mt=1612283323&fvip=16&keepalive=yes&c=WEB&txp=5531432&n=qQieFZQxUx1D4YP-d&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAKymIimy98zQRSUgyxrQWPBMjEwRAez3Szj8VFxyFz6xAiAmx8NX90cGVCgeLQv5ASN3Ao_zAMhclfzRzTHc7ABPQw%3D%3D&sig=AOq0QJ8wRAIgKHMu42NLNwRj42a1ncDMg3l8N2T6d_ayN52Xk0B5hckCIF9kaWFUdg5rVU2BG_kL8_HKEaYIWJ5tdAFcgpQtEm_r&ratebypass=yes; CURL failed: server certificate verification failed. CAfile: none CRLfile: none

MaxKellermann commented 3 years ago

That problem has nothing to do with MPD. Your CURL build (or the TLS library used by CURL) fails to verify the server certificate. You can disable verification if all else fails: https://www.musicpd.org/doc/html/plugins.html#id6