[PLUGIN] YouTube Cast Receiver

Hey mate, yeah I ended up installing 0.1.2 from the phone plugins, not sure why but perhaps another link from the thread. either way the same.

Cheers

Itā€™s 1.0.2, not 0.1.2 ā€¦

v1.0.2 is in the beta channel. Perhaps that is why you missed it?

Thatā€™s it. Tried both anyway and doesnā€™t make a difference. Cheers

Ok then, you only sent me the logs for v0.1.3 right? I need the logs for v1.0.2 since that is the version that supports YouTube Music.

Could you enable Verbose Logging in the plugin settings and then PM them to me (donā€™t put link) here. Thanks.

1 Like

Ah ok mate, I didnā€™t see the beta ones in plug-in store under ā€˜detailsā€™, so it was installing 1.0.3. I have installed 1.0.2 (beta).

Blockquote This plugin is failing to start, please install latest version or contact the devā€¦

So I installed the default plugin 1.0.2 (not in the beta) and it installs 0.1.3.

Bit confusing all the betas and stables, not sure why so many different onesā€¦

Did you reboot after installing the beta?

Ok - Just tried a reboot before enabling the plugin and itā€™s working. Wasnā€™t allowing me to enable straight away ;).

I donā€™t really bother with youtube music all that often due to the low bitrates, but itā€™s nice to have it working and some ā€˜channelsā€™ are pretty good.

You have to reboot every time you update a plugin. Itā€™s a Volumio thing not related to the plugin itself.

I get that but it doesnā€™t allow to apply the plug in immediately (the options are CLOSE or ACTIVATE PLUGIN) so makes you wonder why they have a button for it. I think some other plugins work without a reboot but all good now thanks very much!

PS. Itā€™s not really casting if the music stops when I turn off the PC. Guess thatā€™s a windows problem running it from Chrome browser tab not an app.

Works well from phone.

Am I right in the belief that I can stream the audio to volumio but I can not watch the video matching the streamed audio ??

My video just pauses so I can either listen in high quality on my speaker, or watch it with bad computer speaker audio, but I dont get both ??

Iā€™ll see if I can add an option to keep playing when client disconnects.

1 Like

Yes. Youā€™d be better off with using bluetooth for that. Even with official Chromecast the video gets played on the screen connected to the Chromecast.

2 Likes

Yeah Bluetooth still ok sometimes, Iā€™ve still got a Yamaha yamaha yba-11 Bluetooth adaptor plugged into the DAC via coax. YouTube music has a fair delay with the button presses so could be better. Either option still handy :smiley:.

Thats not trueā€¦ When I cast to my chromecast audio I still have the video screen playing on the PC as normal and the audio out of my audio system and nicely in sync etc.

As to direct bluetooth yeah my PC to bluetooth connection sucks and drops constantlyā€¦ Which is why I put a volumio together to give me a cleaner output pathā€¦ It also lets me stream stuff I want higher sound quality and retain PC for notification noises etc.

Its not a deal breaker but it would be more versatile if it operated as the chromecast does.

I am still learning, I only put it together a day or so ago, I like the idea of a touchscreen DAC output but am experiencing some flakey behavior on stop start resume type action and with sync that I dont get with a simple chromecast audio. Not yet sure I want to buy a screen and case etc but thats for more testing.

EDIT :: Looking at the cast icons now its seeing the volumio device as a video cast device rather than an smart speaker as CC-Audio (and I think an amazon echo but I dont have that in this house) appear.

Right, I suppose thereā€™s a difference between CC-Audio and CC with Google TV (which is what I have). I donā€™t know if it is possible to tweak the plugin so that it plays audio while preserving video playback on the client (and to keep them in sync). Would have to play around a bitā€¦ Right now the plugin is emulating as close as possible the behaviour of YouTube TV, without the video part. It will never be the same because it takes too much effort to fully reverse engineer YT TVā€¦

1 Like

I get it. I fully appreciate theres many limits in what level of APIs and documentation people have.

I also think volumio itself not the plug in is acting as a ā€˜videoā€™ cast device (at least in windows chrome, casting, it shows up as one, while smart speakers show up as a speaker) but I am guessing way above my pay grade there.

I am totally new to volumio, just tinkering about so farā€¦ Still waiting for my DAC in the mail also.

I still have a CC Audio plugged into my DAC, donā€™t really use it anymore but did the job for years. No gapless playback was the main downfall and reason for replacing it with a RPi4, I think the sound quality is a bit better too.

I will have to test it again but donā€™t recall the video is ever preserved when casting the audio (this was never allowed anyway unless casting a tab from Chrome. Likewise I canā€™t cast YouTube video to a Google speaker (like the nest audio). I am sure there would be sync issues anyway if trying to run on both devices.

So the YouTube and YouTube music volumio plugins are still very handy, but this new cast plugin makes this much more convenient.

Agree that Bluetooth isnā€™t ideal these days (phone sounds and notifications as mentioned, and playback stops when the device is shut down) and prefer multi tasking by streaming over wifi (ie use PC speakers for over tasks etc). I got a better wifi 6 ax card and it has BT as well, one antenna for each so thatā€™s always an option for better signal. Also some DACs have 2-way BT 5 and the quality is good, High res apparently.

Updated v1.0.3.

Added option to not automatically stop current playback when all clients disconnect, unless the connections were ended explicitly.

To explicitly end a connection, you need to tap the ā€˜Stop Castingā€™ button in the client app or website. Moving your phone out of range of your Volumio deviceā€™s network or closing the web browser will not end playback (@G-rig)

@Sefton , unfortunately I have been unable to emulate the plugin as a Cast-enabled speaker. I suspect audio casting is done through a higher version of the Cast protocol (V2 or higher), which is something the plugin isnā€™t compatible with (and will probably never be).

v1.0.3 is currently in beta channel. To install from beta channel (all steps are mandatory):

  • Uninstall current version.
  • Enable Plugins Test Mode in http://<volumio address>/dev
  • Find the YouTube Cast Receiver plugin in the plugin store. Click the Details button under it and choose latest beta version to install.
  • Restart Volumio.
2 Likes

Thanks Patrick for your efforts, will install today :slightly_smiling_face:.

Updated v1.0.4:

  • Added prefetching. When enabled in plugin settings (default is enabled), the next song or video is prefetched when current playback is about to end. This reduces the delay you might encounter when going to the next song.
  • When prefetching is enabled, you also get an option to ā€˜Prefer gapless Opus streamsā€™. This must be enabled for gapless playback of YT streams on Volumio. Technical reasons according to my limited knowledge of the subject:
    • The other common YT stream format is m4a. However, m4a is not inherently gapless like Opus. It requires special handling which FFmpeg (the decoder library) fails to carry out for YT streams, since they are also of dash type. Simply put, FFmpeg can provide gapless playback of regular m4a, but not dash m4a.
  • The tradeoff, however, is that YT Opus streams are limited to 160kbps. This means if you have a YT Premium subscription, you wonā€™t get 256kbps + gapless playback. This sucks, but you would have to decide whether this tradeoff is worth it. For experimenting with the settings, you can check out Pink Floydā€™s ā€œThe Wallā€ album on YT Music. If you disable ā€˜prefer Opusā€™, you should hear a slight click between tracks.

    Uploads in your YT Music Library are always provided as m4a streams.

  • Another minor change: the name of your device shown in the Cast menu will now be the same as the one you configured for Volumio (previous versions used the OS hostname).

v1.0.4 is currently in beta channel. To install from beta channel (all steps are mandatory):

  • Uninstall current version.
  • Enable Plugins Test Mode in http://<volumio address>/dev
  • Find the YouTube Cast Receiver plugin in the plugin store. Click the Details button under it and choose latest beta version to install.
  • Restart Volumio.
3 Likes