sslyoutubestreamingvlc

VLC Cli on linux - Youtube videos tls handshake error


As i've understood, this is probably going to be an evergreen problem since youtube regularly update their website, and videolan needs to adapt to them, but since i couldn't find the answer online i'm asking it now.

I'm trying to play a youtube video from the CLI, using vlc.

I'd rather stream it than download and play it, for speed reasons.

On windows, it works fine

On linux, i had a problem descrambling the url. I updated the Youtube.luac file to the latest one, and now i'm stuck on this:

[00007f1948002050] http stream debug: in DATA (0x00) frame of 6149 bytes, flags 0x00, stream 1
[00007f1948002050] http stream debug: in DATA (0x00) frame of 0 bytes, flags 0x01, stream 1
[00007f1948002050] http stream debug: stream 1 closed by peer
[00007f1948002050] http stream debug: in PING (0x06) frame of 8 bytes, flags 0x00, global
[00007f1948002050] http stream debug: out (priority) PING (0x06) frame of 8 bytes, flags 0x01, global
[00007f1948307fb0] prefetch stream debug: end of stream
[00007f1948307fb0] main stream debug: removing module "prefetch"
[00007f1948002050] main stream debug: removing module "access"
[00007f1948002050] http stream debug: local stream 1 shut down
[00007f1948002050] http stream debug: out RST_STREAM (0x03) frame of 4 bytes, flags 0x00, stream 1
[00007f1948002050] http stream debug: local shutdown
[00007f1948002050] http stream debug: out GOAWAY (0x07) frame of 8 bytes, flags 0x00, global
[00007f1950040970] main tls client error: TLS session handshake timeout
[00007f1950040970] main tls client error: connection error: Resource temporarily unavailable
[00007f1950040970] gnutls tls client debug: TLS handshake: Error in the push function.
[00007f1950040970] gnutls tls client error: TLS handshake error: Error in the push function.
[00007f1950040970] main tls client error: TLS session handshake error
[00007f1950040970] main tls client error: connection error: Network is unreachable
[00007f1950322e10] access stream error: HTTP connection failure
[00007f1950322e10] main stream debug: no access modules matched
[00005651e8c53850] main playlist debug: dead input
[00005651e8c53850] main playlist debug: changing item without a request (current 0/1)
[00005651e8c53850] main playlist debug: nothing to play
[00005651e8d33450] qt interface debug: IM: Deleting the input

Running this command

vlc https://www.youtube.com/watch?v=2BmLFqHSjR0 -vv

There doesn't seem to be a way to ignore the certificate, and it wouldn't really be desirable anyway (right?)

Is there a workaround for this?

Of course, everything has been updated to the latest version

Thanks!


Solution

  • I found a workaround kinda - follow this answer:

    How to solve connection error when trying to stream a video from YouTube?

    Just this part

     sudo update-ca-certificates --fresh --verbose
    
     mkdir -p ~/.local/share/vlc/certs/
    
     cat /usr/share/ca-certificates/mozilla/* | tee ~/.local/share/vlc/certs/ca-certifcates.crt
    

    After a reboot, my vlc videos start as expected.

    However, i'm not quite sure of what i just did, so maybe it's not safe to do this.