[PLUGIN] YouTube for Volumio

Are you by any chance using the official Youtube plugin?

Hello,

I have posted version 0.21.16 of MPD in this thread, which should solve the YouTube 2/3 playback problem. Not sure if it will break other things, though. Purely experimental!

I am trying another (lighter) approach to solving the 2/3 problem but it could take a while (not much time recently).

Best regards,
Patrick

Awesomeness!! Thnx a lot Patrick!!

I used the update command, worked fine!

(only not sure why it didn’t come back to a normal command-line thing *sorry for being vague, had to restart volumio from the user interface since typing in ‘volumio vrestart’ didn’t do anything after the ‘Status :Succesfully updated plugin’)

Happy 2020! Hope Volumio will continue to be awesome! :wink:

volumio 2.692
Raspberry Pi3
How do I get the plugging to provide a code number?
code.jpg

Awesome!! Thank you very much, great work Patrick!!

Hello
Have the same problem youtube without code
Used volume 2,692
Have youtube uninstalled
Wanted to execute

$ volumio plugin update
$ volumio vrestart
$ volumio youtube plugin install
$ volumio vrestart

but no package found
come no farther

Did you actually download the attachment and unzip it before running ‘volumio plugin install’?

  1. Download latest unofficial plugin here: https://forum.volumio.org/youtube-for-volumio-t6608-230.html#p70392
  2. Follow Instructions to to use it: https://forum.volumio.org/youtube-for-volumio-t6608-160.html#p68753

The Youtube plugin is the worst. It seems to me easier to completely abandon it. As you don’t try to configure it, you will still face a lot of problems. Where else can you listen for free to quality music without problems? Spotify, Tidal?

2020-01-13_142214.jpg
2020-01-13_142252.jpg
2020-01-13_121958.jpg

The official plugin (your second screenshot) is not working. The unofficial one which I put up here (your first screenshot) allows you to play YouTube streams provided you create your own Google API credentials. In hindsight, I should have removed the “Use Default” API keys option since I now really doubt Volumio will reinstate its original keys. If you do not want to create your API keys, then you would have to wait until Volumio releases a new official version of their YouTube plugin.

Due to API quota limits, I will not be incorporating my own keys into the unofficial plugin.

Thank you. I think its very difficulty for me. I am stuck at step 7. Or maybe there are everything wrong. It would be cool to create an example with screenshots.

In fact, for me, Volumio became a stupid and not functional solution. I would put simple mpd on a clean operating system. Or even used an Internet browser to play music without all these crooked troubles.

Perhaps you could tell me how you got stuck at step 7?

It seems to me that the Volumio team has lost momentum in the development of the software. Perhaps they are just busy with other things in life, but things would be much better if they could show up on the forums more frequently to address issues raised by the members. This is particularly so when some of the members are on a paid subscription or have bought their products.

I downloaded the unofficial youtube plugin and followed the instructions to create an own API-Key and Client. Finaly I got a code for granting an access to my YouTube account. So I did, but the access is still not working! How can I see, if the access of Volumio to my YouTube account is working?
youtube_plugin.jpg

You have not completely completed the setup. Go to google.com/device and paste the code you have just below (LGK-KWD-GFX).

You’ll get this message:

Capture d’écran 2020-01-15 à 23.04.13.png

EDIT: And don’t forget this in the patrickkfkan’s step-by-step

DipterePow, thanks for helping qrumba! I would like to add that the code given could be different each time you enter the plugin settings, so be sure to get the newest code for authentication on www.google.com/device.

qrumba, don’t reveal this code like you did in your post as it is tied to your API credentials.

Thank You for your help! I did all steps as told and finally came to the screen where Ggl tells that my device is connected. But the YouTube plugin in Volumio still gets the errors as described earlier.
Following the link to see all apps connected with my account, Volumio does not show up. Maybe this is the wrong link, but I remember to see Volumio mentioned somewhere in my Ggl account, when the Volumio YouTube plugin was working correctly.

That is odd
after connecting to your Google through www.google.com/device, do you still see a code in the plugin settings? Because if connected, it should not show a code but instead a message telling you that access to YouTube has been granted.

Could you perhaps try to uninstall the YouTube plugin first, then reinstall it? Also, in Google Developer Console, could you verify that the API keys have been setup with “youtube.readonly”?

Even if you don’t go through the authentication process, as long as you have provided the correct API credentials you should still be able to see results and do searches in YouTube. What is the exact error you see when you go to YouTube?

Thank you again, now the plugin is working and has access to my YouTube data.
I deinstalled the plugin and reinstalled it (using WinSCP, putting the youtube plugin folder to volumio /data/plugins/music_service). Then filled in same data as shown above, got message as dedscribed, and the plugin was working.
My Ggl account shows volumio-youtube-qrumba at myaccount.google.com/permissions having access to my YouTube data, so everything is OK!

There is still one little problem: the selected youtube video does not start to play ! :neutral_face:

Does it happen with every YouTube video? Is there an error shown on the screen?

Could you access the logs and see if it dumps any errors when you click a video?

hi Patrickkfkan,

I have been using your last plugin update and MPD patches since days after you posted them last month.
After I applied the MPD update patch the I can search youtube for anything and never get an error anymore when
selecting an item to play
 GREAT! after the MPD update youtube 2/3 playback issue appears to be resolved :slight_smile:
However after the MPD update I am experiencing the same issue as the last poster. I can select any youtube item
for playback without error. However I am only having about a 50% success rate on what will now playback. The item
goes into my queue and shows everything correct in the playback center circle as far as title and time but it never starts
playing. when I pause and restart playback it will not play. If I select further along in track it still will not play.

Your patches are still a big success in my opinion because anything that does playback always completes 100% of the track.
THANK YOU

I saw an earlier post in the thread last month that stated the youtube plugin was under in development for a complete rewrite
and anxiously await the outcome of that effort.

You asked the previous poster for a log entry so I took a snap of mine to show you what a failed playback looks like. log messages
indicate invalid youtube video error but that can’t be valid because you can select the same video in any browser and it plays back just fine.

Hope this will help satisfy your curiosity, and thanks again for all your time and effort put in on everyone’s behalf and enjoyment.

Log:
Jan 17 21:41:58 wlss sudo[1941]: volumio : TTY=pts/0 ; PWD=/home/volumio ; USER=root ; COMMAND=/bin/journalctl -f
Jan 17 21:41:58 wlss sudo[1941]: pam_unix(sudo:session): session opened for user root by volumio(uid=0)
Jan 17 21:42:19 wlss volumio[1017]: Searching plugin music_service/youtube
Jan 17 21:42:19 wlss volumio[1017]: info: CoreCommandRouter::executeOnPlugin: youtube , search
Jan 17 21:42:19 wlss volumio[1017]: YoutubeCache.get(): value with key 350bf84fe6aeb33dde6e3a79178d201e not found
Jan 17 21:42:20 wlss volumio[1017]: YoutubeCache.put(): added entry with key 350bf84fe6aeb33dde6e3a79178d201e
Jan 17 21:42:20 wlss volumio[1017]: info: All search sources collected, pushing search results
Jan 17 21:42:22 wlss volumio[1017]: Searching plugin music_service/youtube
Jan 17 21:42:22 wlss volumio[1017]: info: CoreCommandRouter::executeOnPlugin: youtube , search
Jan 17 21:42:22 wlss volumio[1017]: YoutubeCache.get(): value with key 4916031172af95dce29808ea59268b70 not found
Jan 17 21:42:22 wlss volumio[1017]: YoutubeCache.put(): added entry with key 4916031172af95dce29808ea59268b70
Jan 17 21:42:22 wlss volumio[1017]: info: All search sources collected, pushing search results
Jan 17 21:42:35 wlss volumio[1017]: info: CoreCommandRouter::volumioReplaceandPlayItems
Jan 17 21:42:35 wlss volumio[1017]: info: CoreStateMachine::ClearQueue
Jan 17 21:42:35 wlss volumio[1017]: info: CoreStateMachine::stop
Jan 17 21:42:35 wlss volumio[1017]: info: CoreStateMachine::setConsumeUpdateService undefined
Jan 17 21:42:35 wlss volumio[1017]: UNSET VOLATILE
Jan 17 21:42:35 wlss volumio[1017]: info: CorePlayQueue::clearPlayQueue
Jan 17 21:42:35 wlss volumio[1017]: info: CorePlayQueue::saveQueue
Jan 17 21:42:35 wlss volumio[1017]: info: CoreStateMachine::pushEmptyState
Jan 17 21:42:35 wlss volumio[1017]: info: CoreCommandRouter::volumioPushState
Jan 17 21:42:35 wlss volumio[1017]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Jan 17 21:42:35 wlss volumio[1017]: info: CoreCommandRouter::volumioPushQueue
Jan 17 21:42:35 wlss volumio[1017]: info: CoreStateMachine::addQueueItems
Jan 17 21:42:35 wlss volumio[1017]: info: CorePlayQueue::addQueueItems
Jan 17 21:42:35 wlss volumio[1017]: info: Adding Item to queue: 7UjOKifn88o
Jan 17 21:42:35 wlss volumio[1017]: info: Exploding uri 7UjOKifn88o in service youtube
Jan 17 21:42:35 wlss volumio[1017]: info: Youtube::explodeUri youtube.com/oembed?format=json&url=7UjOKifn88o
Jan 17 21:42:35 wlss sudo[2024]: volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/ifconfig wlan0
Jan 17 21:42:35 wlss sudo[2024]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 17 21:42:35 wlss sudo[2024]: pam_unix(sudo:session): session closed for user root
Jan 17 21:42:36 wlss volumio[1017]: info: Youtube -> {“kind”:“youtube#video”,“etag”:"“OOFf3Zw2jDbxxHsjJ3l8u1U8dz4/Fb259r7xp-j3ja6LZMcSSmjEE3g”",“id”:“7UjOKifn88o”,“snippet”:{“publishedAt”:“2016-04-26T19:18:43.000Z”,“channelId”:“UCmKoOUpsn4H0mUcIGAqFtCQ”,“title”:“Guy Clark live at Kerrville Folk Festival (1996)”,“description”:“Guy Clark (1941-2016) live at Kerrville Folk Festival with Travis Clark.\nRecorded by AMN in 1996\nAR.2001.007.000244”,“thumbnails”:{“default”:{“url”:“https://i.ytimg.com/vi/7UjOKifn88o/default.jpg",“width”:120,“height”:90},“medium”:{“url”:“https://i.ytimg.com/vi/7UjOKifn88o/mqdefault.jpg”,“width”:320,“height”:180},“high”:{“url”:“https://i.ytimg.com/vi/7UjOKifn88o/hqdefault.jpg”,“width”:480,“height”:360},“standard”:{“url”:“https://i.ytimg.com/vi/7UjOKifn88o/sddefault.jpg”,“width”:640,“height”:480}},“channelTitle”:"Austin History Center”,“tags”:[“Guy Clark”,“Kerrville Folk Festival”,“AMN”,“Austin Music Network”,“Austin”,“Texas”],“categoryId”:“10”,“liveBroadcastContent”:“none”,“localized”:{“title”:“Guy Clark live at Kerrville Folk Festival (1996)”,“description”:“Guy Clark (1941-2016) live at Kerrville Folk Festival with Travis Clark.\nRecorded by AMN in 1996\nAR.2001.007.000244”}},“contentDetails”:{“duration”:“PT51M46S”,“dimension”:“2d”,“definition”:“sd”,“caption”:“false”,“licensedContent”:false,“projection”:“rectangular”}}
Jan 17 21:42:36 wlss volumio[1017]: info: CorePlayQueue::saveQueue
Jan 17 21:42:36 wlss volumio[1017]: info: CoreCommandRouter::volumioPushQueue
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::updateTrackBlock
Jan 17 21:42:36 wlss volumio[1017]: info: CorePlayQueue::getTrackBlock
Jan 17 21:42:36 wlss volumio[1017]: info: CoreCommandRouter::volumioPlay
Jan 17 21:42:36 wlss volumio[1017]: UNSET VOLATILE
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::play index 0
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::setConsumeUpdateService undefined
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::stop
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::setConsumeUpdateService undefined
Jan 17 21:42:36 wlss volumio[1017]: UNSET VOLATILE
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::play index undefined
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::setConsumeUpdateService undefined
Jan 17 21:42:36 wlss volumio[1017]: info: CorePlayQueue::getTrack 0
Jan 17 21:42:36 wlss volumio[1017]: info: CoreStateMachine::startPlaybackTimer
Jan 17 21:42:36 wlss volumio[1017]: info: CorePlayQueue::getTrack 0
Jan 17 21:42:36 wlss volumio[1017]: info: [1579297356037] Youtube::clearAddPlayTrack
Jan 17 21:42:37 wlss volumio[1017]: Error opening Youtube stream, video is probably not valid.