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]
Could not find a audio/x-unknown decoder to handle media.
INFO 2015-08-09 17:07:57,009 [2738:MainThread]
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]
There is no codec present that can handle the stream’s type.
DEBUG 2015-08-09 17:07:57,012 [2738:MainThread]
gsturidecodebin.c(874): unknown_type_cb (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0
ERROR 2015-08-09 17:07:57,014 [2738:MainThread]
Your GStreamer installation is missing a plug-in.

I installed every gstreamer package:
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 "" | python2 -c 'import pafy,sys;print("".join(sys.stdin)).getbestaudio().url)')

However, that one works well:

gst-launch-0.10 playbin2 uri=$(echo "" | python2 -c 'import pafy,sys;print("".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 "" | python2 -c 'import pafy,sys;print("".join(sys.stdin)).getbestaudio().url)'

echo "" | python2 -c 'import pafy,sys;print("".join(sys.stdin)).getbestaudio().url)'

Yes, they both work for me too.

~ > echo "" | python2 -c 'import pafy,sys;print("".join(sys.stdin)).getbestaudio().url)',9408710,9409069,9409249,9415365,9415436,9415485,9416023,9416126,9416309,9416557,9416729,9416911,9417011,9417224,9417503,9417707,9418144,9418153,9419313&upn=VAbvzCGOrno&sver=3&ip=,ipbits,expire,id,itag,source,requiressl,mv,nh,ms,mm,pl,gcr,mn,ratebypass,mime,gir,clen,lmt,dur
~ > echo "" | python2 -c 'import pafy,sys;print("".join(sys.stdin)).getbestaudio().url)',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=,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: 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.