[PLUGIN] YouTube Cast Receiver

Hi all,

The YouTube Cast Receiver plugin is available for testing. It allows you to cast videos to Volumio from the YouTube mobile app or website for audio playback.

You can get the plugin here:

Follow the instructions there to install it (and also go through the rest of the Readme so you have an idea of what to expect). For Volumio 2.x you would still need to update your MPD unless you are fine with playback cut-offs and don’t mind seeking not working.

You can raise issues here as you find them, and feedback is of course welcome.

Regards,
Patrick

5 Likes

Sounds awesome. I need to learn that SSH command system… :sweat_smile:

So excited for this. It basically completes my Volumio setup.
Just updated my MPD and testing it now on my RPi 4.

My experience so far:

  • Playback works, no stutters or hanging.
  • Queue and autoplay do not seem to be working. It just stops after the current song, and I have to manually select and play the next one.
  • Fast forwarding to different point in the video works, but with some delay (1 to 5 seconds)

Hi,
I was waiting for a long time for that, and you did it ! 1000 thanks ! :slight_smile:
My experience is similar to @lizard_dude (testing with raspberry pi 2 B with last volumio version, without installing your mpd)

  • Playback works
  • Queue and autoplay doesn’t work, it stops after current song.
  • Fast Forwarding to different point is good there, the delays is approximatively the same than in youtube app
  • Previous and Next button are working

Thank you !

@lizard_dude , @spamaro , thanks for testing this.

For the queue and autoplay issues, are you casting from the YouTube mobile app? If so, what is the version of the app?

@lizard_dude , a 1-2 second delay would be normal depending on the quality of your network connection, although 5 seconds might be a bit too much. Could you try seeking directly in Volumio and observe if the delay is approximately the same as seeking in the YouTube app or website (it should be)?

there was even a browser plugin but that died with the old youtube plugin…

Casting from the Android YouTube app. Version 16.02.35.
I figured the delay might be because I am still running a snapcast server. Whoops!
I will get back to you regarding this,

Hi, yes i use the Youtube mobile app, the version is the 16.14.34

I install ytcr on volumio 3.066_X86 It does not work app needs to be updated for volumio 3.

Checking that the plugin is suitable for this version of Volumio The plu gin has no node version dependency information. The plugin has no Volumio versio n dependency information. The plugin may not work on this version of Volumio

I’ll update the Volumio 3.x version on my side and test it. Will get back to you on this.

@spamaro , @lizard_dude ,

I don’t know if I’m mistaken, when you say queue and autoplay don’t work, does it mean when you have a list of songs and you play the first one, the next song isn’t loaded after playback of the first one ends? Or is it the case that the Up Next video fails to appear in the list even when the Autoplay switch is enabled?

The next song is present in the youtube list, but not loaded after playback of the one ends.
if i click on next button in volumio, it is loaded

I installed youtube2 plugin from youre site, it works perfectly. Maybe that helps for ytcr?

OK, give me some time.

  1. Volumio 3.x dependency version
  2. Not advancing to next song in queue (will possibly need more info because doesn’t happen on my side - will let you know)

@Tecko, could you please try reinstalling ytcr?

You need to start afresh:

  1. First uninstall the ytcr plugin in Plugins → Installed Plugins
  2. ssh into your Volumio
  3. If you originally followed the Github instructions to install the plugin, then do the following:
volumio:~$ cd ~/ytcr-plugin
volumio:~/ytcr-plugin$ rm -rf volumio-ytcr
volumio:~/ytcr-plugin$ git clone https://github.com/patrickkfkan/volumio-ytcr.git
volumio:~/ytcr-plugin$ cd volumio-ytcr
volumio:~/ytcr-plugin/volumio-ytcr$ volumio plugin install

(You will also get those ‘dependency version missing’ warnings, but you can ignore them).

Then reboot your device.

Let me know if it works this time.

yes the app is working but after 10 seconds the youtube streams stops playing.

@lizard_dude , @spamaro ,

OK…really need more info here. I haven’t been able to reproduce the queue issue on my end.

Could you update the plugin following the instructions on the Github link? It has been updated to add a log when playback of the current song finishes.

Then

  1. Go to the plugin settings and enable ‘Verbose Logging’.
  2. Go to <your_volumio_address>/dev and enable ‘live log’.
  3. Cast a video from the YouTube app.
  4. Wait for it to end (apparently, don’t play a video that’s like 2 hours long- something that’s a few minutes will do).
  5. When it ends, leave it hanging for a while.
  6. Copy the Live Log and save it to a text file. Then send the text file to me through PM.

I’d have to see the log to see what’s going on.

Also, are there other plugins running? If so, could you disable all of them temporarily and see if it makes a difference.

@Tecko, when the streams stop playing, did you get disconnected too? Do all the streams play only for 10 seconds? If you select another video in the YouTube app, does it play (that is, for 10 seconds)?

I’ve tested this on a fresh 3.066_x86 install, and the streams play normally. In fact, it seems everyone else is experiencing a problem of some kind with this plugin, except me :frowning:

I am testing now because when I play a clip 3.36 minute there is no problem. With the other video there was not a disconnection.

Also check if your phone has some sort of battery management in place that interferes with the network connection when you turn the screen off (sometimes it just terminates the app completely).

Best way to test is to have the YouTube app running in the foreground and the screen turned on for the duration of the video.