Mopidy-YouTube "Your GStreamer installation is missing a plug-in."

I’m trying to get Mopidy-YouTube working.
And sometimes it actually works. But some songs just won’t play.
When using mopidy -v, the following shows up:

WARNING 2015-08-09 17:07:57,008 [2738:MainThread] mopidy.audio.actor
Could not find a audio/x-unknown decoder to handle media.
INFO 2015-08-09 17:07:57,009 [2738:MainThread] mopidy.audio.actor
You might be able to fix this by running: gst-installer "gstreamer|0.10|mopidy|audio/x-unknown decoder|decoder-audio/x-unknown, codec-id=(string)A_OPUS"
WARNING 2015-08-09 17:07:57,011 [2738:MainThread] mopidy.audio.gst
There is no codec present that can handle the stream’s type.
DEBUG 2015-08-09 17:07:57,012 [2738:MainThread] mopidy.audio.gst
gsturidecodebin.c(874): unknown_type_cb (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0
ERROR 2015-08-09 17:07:57,014 [2738:MainThread] mopidy.audio.gst
Your GStreamer installation is missing a plug-in.

I installed every gstreamer package:
gstreamer0.10-*
python-gst0.10*
but the error still shows up :frowning:

1 Like

Same problem here, but the problem is not with Mopidy-YouTube. When using GStreamer directly the same exception raises:

gst-launch-0.10 playbin2 uri=$(echo "https://www.youtube.com/watch?v=RuY4MSh1V-I" | python2 -c 'import pafy,sys;print(pafy.new("".join(sys.stdin)).getbestaudio().url)')

However, that one works well:

gst-launch-0.10 playbin2 uri=$(echo "https://www.youtube.com/watch?v=0RvlPt2R98s" | python2 -c 'import pafy,sys;print(pafy.new("".join(sys.stdin)).getbestaudio().url)')

I really don’t know why this is happenning.

EDIT: Using the command above with “gst-launch-1.0 playbin” play both videos.

EDIT: Formatted commands. -jodal

Thanks for your reply!

I don’t have it installed right now and no time to test it, but if i’m understanding you correctly, you are saying that using playbin instead of playbin2 makes it work?

So do you think there could be a way to change the code of mopidy-youtube, so that it uses playbin?

No, you cannot affect whether Mopidy use playbin or playbin2 from the source code of Mopidy-Youtube. You’ll have to change Mopidy core. We’ll soon port from GStreamer 0.10 to 1.x, and in 1.x playbin has been removed and playbin2 has been renamed to playbin. Thus, moving to playbin now would be short sighted.

Both original commands, with playbin2, work on my Ubuntu 15.10 system. I tried passing -t to gst-launch-0.10, and the stream tags indicates that both streams use AAC audio. There’s no obvious difference between them as far as I can see.

1 Like

Thanks for your answer.

As i’m not able to find a solution i will have to use mopidy without youtube, which is ok as well…

Thank you for the reply. And it’s weird because one is shown as audio/x-unknown at my LUbuntu 15.04. I will wait for the next Mopidy version to use YouTube then.

Is it possible that the stream returned by .getbestaudio differs between regions?

I really don’t know. Both links are working for you? Could paste here the url generated by pafy?

echo "https://www.youtube.com/watch?v=RuY4MSh1V-I" | python2 -c 'import pafy,sys;print(pafy.new("".join(sys.stdin)).getbestaudio().url)'

echo "https://www.youtube.com/watch?v=0RvlPt2R98s" | python2 -c 'import pafy,sys;print(pafy.new("".join(sys.stdin)).getbestaudio().url)'

Yes, they both work for me too.

~ > echo "https://www.youtube.com/watch?v=RuY4MSh1V-I" | python2 -c 'import pafy,sys;print(pafy.new("".join(sys.stdin)).getbestaudio().url)'
https://r8---sn-aigllnsl.googlevideo.com/videoplayback?id=46e63831287557e2&itag=141&source=youtube&requiressl=yes&mv=m&nh=IgpwcjAyLmxocjE0KgkxMjcuMC4wLjE&ms=au&mm=31&pl=24&gcr=gb&mn=sn-aigllnsl&ratebypass=yes&mime=audio/mp4&gir=yes&clen=7999652&lmt=1415948286176625&dur=250.891&key=dg_yt0&signature=8DB23D49FE909A3BE8ECED91FB79227A94E4A5F6.0544409C70287436A70472F02BE187F1E286385A&mt=1439572976&fexp=9408513,9408710,9409069,9409249,9415365,9415436,9415485,9416023,9416126,9416309,9416557,9416729,9416911,9417011,9417224,9417503,9417707,9418144,9418153,9419313&upn=VAbvzCGOrno&sver=3&ip=195.99.255.194&ipbits=0&expire=1439594607&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,nh,ms,mm,pl,gcr,mn,ratebypass,mime,gir,clen,lmt,dur
~ > echo "https://www.youtube.com/watch?v=0RvlPt2R98s" | python2 -c 'import pafy,sys;print(pafy.new("".join(sys.stdin)).getbestaudio().url)'
http://r8---sn-aigllne6.googlevideo.com/videoplayback?id=d11be53edd91f7cb&itag=141&source=youtube&ms=au&mv=m&mm=31&mn=sn-aigllne6&nh=IgpwcjAyLmxocjE0KgkxMjcuMC4wLjE&pl=24&ratebypass=yes&mime=audio/mp4&gir=yes&clen=1809950&lmt=1390786392241806&dur=56.749&mt=1439572976&sver=3&signature=951C53F1330DC133CBFF8EDCBF8A925A0B264CE3.8403F5EC06E014B501B06338732057F1F0CC4FD6&fexp=9406819,9406919,9408508,9408710,9409069,9409170,9413139,9415172,9415365,9415435,9415485,9415521,9416023,9416126,9416323,9417707,9418058,9418153,9419242,9419444,9419541&upn=LPiHRSLzbtw&key=dg_yt0&ip=195.99.255.194&ipbits=0&expire=1439594622&sparams=ip,ipbits,expire,id,itag,source,ms,mv,mm,mn,nh,pl,ratebypass,mime,gir,clen,lmt,dur

Well, the Google stream links are different indeed. However I’m unable to play your link beucase of a 403 error. I think there is a region lock.

I got this exact error myself now, when trying to play yt:https://www.youtube.com/watch?v=x1580y_HVNQ. I’m probably on another machine than last time I tested. The solution in my case was to upgrade pafy (from 0.3.62 to 0.3.74):

pip install -U pafy
1 Like

Thank you so much jodal! Worked like a charm.
There was missing some plugins too so I ran sudo apt-get install ubuntu-restricted-extras after update pafy.