VLC media player - can't play music from Youtube anymore

I used to listen to Youtube music in VLC media player. I used to:

  1. Open Firefox browser, go to Youtube.com web page. Clicked on music so music was starting to play.
  2. Copy link from browser URL.
  3. Open VLC and from menu selct Media | Open Network Stream
  4. Paste the link and click on Play button.
    EXPECTED: music starts playing in VLC media player
    PROBLEM: music does not starts playing and no error is returned

snap info vlc
installed: 3.0.12.1

I was able to play audio just now with the VLC snap.

Have you made sure the interfaces are all connected?

james@skyfire:~$ sudo snap install vlc 
vlc 3.0.12.1 from VideoLAN✓ installed
james@skyfire:~$ sudo snap connect vlc:
audio-record   avahi-control  camera         dvb            jack1          mount-observe
james@skyfire:~$ sudo snap connect vlc:audio-record 
james@skyfire:~$ sudo snap connect vlc:avahi-control 
james@skyfire:~$ sudo snap connect vlc:camera 
james@skyfire:~$ sudo snap connect vlc:dvb 
james@skyfire:~$ sudo snap connect vlc:jack1 
james@skyfire:~$ sudo snap connect vlc:mount-observe 
1 Like

sudo snap connect vlc:

returns error:

error: invalid value: “vlc:” (want snap:name or snap)

Also tried without “:” character:
sudo snap connect vlc
and error:

error: cannot resolve connection, plug snap name is empty

But

sudo snap connections vlc

displays:

Interface Plug Slot Notes
audio-playback vlc:audio-playback :audio-playback -
audio-record vlc:audio-record - -
avahi-control vlc:avahi-control - -
camera vlc:camera - -
desktop vlc:desktop :desktop -
desktop-legacy vlc:desktop-legacy :desktop-legacy -
dvb vlc:dvb - -
home vlc:home :home -
jack1 vlc:jack1 - -
mount-observe vlc:mount-observe - -
mpris - vlc:mpris -
network vlc:network :network -
network-bind vlc:network-bind :network-bind -
opengl vlc:opengl :opengl -
optical-drive vlc:optical-drive :optical-drive -
pulseaudio vlc:pulseaudio :pulseaudio -
removable-media vlc:removable-media :removable-media -
screen-inhibit-control vlc:screen-inhibit-control :screen-inhibit-control -
unity7 vlc:unity7 :unity7 -
x11 vlc:x11 :x11 -

In Ubuntu Software I see:

Just a note: VLC in my case works without a problem (playing music or movies), just using Youtube URLs does not play any music in VLC.

I don’t think that playing Youtube is related to connected interfaces. I would suggest you start vlc in the console by running snap run vlc and observe any messages that pop up when you try to play a video on youtube.

This may sound silly, but also make sure that those videos are accessible with a browser.

2 Likes

There’s a lot of problems with Youtube in particular that make this hard to diagnose.

Firstly, the YT website intentionally obfuscuates itself to prevent scraping. It is absolutely expected that YouTube in VLC, and any other apps, e.g, youtubedl, newpipe, invidious, etc. will break seemingly at random and for a period of potentially hours to days and require updates to whatever app is using them.

But beyond this for any given video, a video may be protected by a higher level of obfuscuation depending on the channel, E.G, it is harder to scrape video’s registered by Vevo than say a freely licensed lecture from MIT. You might be able to access the majority of content on the service but find specific videos are just unavailable entirely, and they’ll tend to be ones that enjoy the higher levels of obfuscuation.

Add on other factors, such as age restriction, reigional lockout, and in some scenarios, content that only the YouTube Mobile apps can play, and are not accessible from a desktop browser at all, and it becomes basically impossible to cover every single edge case.

Ultimately, this seems like YouTube just being YouTube, they want you to use their official products, and I’d point the finger at Google breaking things intentionally well before assuming it’s anything wrong with the Snap build of VLC itself (though it could be a problem that needs fixing in VLC in general).

1 Like

@solat Do you actually manage to play same youtube links in VLC, installed as a good old .deb ?

If it works with VLC as .deb it should work in VLC as a snap.
A snap should at least work as good as its .deb counterpart.

1 Like

I have solved the problem. Thanks a lot!

Thanks this helped a lot to debug. In VLC when I pressed the Start button to start playing music the following error appeared in the console:
http stream error: local stream 1 error: Cancellation (0x8)

Then I have searched the web with above error and found the following thread on official VLC forum just few days old with suggestion:

Tools -> Preferences -> Show settings: All -> Input/Codecs -> Access modules -> HTTPS -> uncheck Cookies forwarding

Saved the setting and restarted VLC. This solved my problem. Now I can play music from VLC just fine.

My issue is fixed by disabling Cookies Forwarding.