You are not logged in.
Pages: 1
Hi,
I've read mpd could play youtube streams. For example, somebody wrote how to on a blog: http://devbraindom.blogspot.com/2013/11 … n-mpd.html
I've been trying this out before I found the blog and it wasn't working but now it seems like it actually should work and apparently I'm missing something out here. If I try exact same thing written on the blog:
mpc add `youtube-dl -f140 -g http://www.youtube.com/watch?v=HS5fHWmzqIg` (note f=140, 141does not exist any more)
and then try to play it: mpc play
the status returned by mpd is:
ERROR: Failed to decode https://r3---s...
What am I missing? I have all gstreamer codecs installed..
Last edited by cotko (2014-04-24 00:01:18)
Offline

i tried with vlc, mpv, mplayer. none of these can play back the stream that results from that command...
Also mpd does not use gstreamer at all, so having that installed surely won't help 
Last edited by Rasi (2014-04-22 15:49:57)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
firefox $(youtube-dl -f140 -g 'http://www.youtube.com/watch?v=HS5fHWmzqIg') works though. [ youtube-dl-git ]
Use code tags.
Offline
@Rasi vlc works for me:
vlc $(youtube-dl -f140 -g 'http://www.youtube.com/watch?v=HS5fHWmzqIg')that's why it's strange that mpd doesn't..
Offline
I use mpv with
mpv $(youtube-dl -g "<url>")works fine. I don't think mpd could play video considering it's music player daemon. >.>
Offline

Maybe mpd has some problems with the SSL ciphers used by youtube. youtube videos only support RC4-SHA which is disabled in curl by default as far as I know.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
ok I found it.. stupid:)
mpd cant resolve https, so --prefer-insecure flag is needed for youtube-dl
you must also check first all the formats and select the one which is audio only
example:
youtube-dl  -F sTPtBvcYkO8gives:
171         webm      audio only  DASH webm audio , audio@ 48k (worst)
140         m4a       audio only  DASH audio , audio@128k
160         mp4       144p        DASH video , video only
242         webm      240p        DASH webm 
133         mp4       240p        DASH video , video only
243         webm      360p        DASH webm 
134         mp4       360p        DASH video , video only
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     (best)so you can only play 171 and 140 formats:
mpc add $(youtube-dl --prefer-insecure -g -f140 sTPtBvcYkO8)Offline
Hi. Looks like 
a) MPD can play HTTPs streams - currently I am playing something beginning with https 
b) At some videos is available format 141 - audio only with pretty higher bitrate than 140. But always returns https URL
But sometimes (which happens also with 140) it plays few seconds and resumes on next song in playlist...
Offline
@SUK: have you tried playing the one which skips after a few seconds with --prefer-insecure flag? Just curious if it skips too or not..
Offline
Pages: 1