YouTube TLS handshake

This forum is about all development around libVLC.
nevare
Blank Cone
Blank Cone
Posts: 17
Joined: 16 Sep 2016 13:39

YouTube TLS handshake

Postby nevare » 09 May 2017 13:26

Hello, I'm trying to play a youtube video by link by instantiating a new media player and calling set_mrl() on it. Sometimes it works, but it seems that it has trouble on this step:
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
This message appears multiple times, and leads to:
[0347fd4c] core tls session error: TLS client session handshake timeout
[0347fd4c] core tls session error: TLS client session handshake error
[034f5abc] http access error: cannot establish HTTP/TLS session
Which results in the vlc giving up.
The weird thing is that sometimes it succeeds after the +- first 2 tries:
[034afd4c] gnutls tls session debug: TLS handshake: Success.
What is causing this issue? And what can I do to fix/work around the issue? I try to use http instead of https but the server just redirects to https.
Any help is appreaciated.

Failed connection:
[03447b64] core libvlc debug: VLC media player - 2.2.4 Weatherwax
[03447b64] core libvlc debug: Copyright � 1996-2016 the VideoLAN team
[03447b64] core libvlc debug: revision 2.2.4-0-g888b7e89
[03447b64] core libvlc debug: configured with ../extras/package/win32/../../../configure '--enable-update-check' '--enable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '--enable-quicktime' '--enable-avcodec' '--enable-merge-ffmpeg' '--enable-dca' '--enable-mpc' '--enable-libass' '--enable-x264' '--enable-schroedinger' '--enable-realrtsp' '--enable-live555' '--enable-dvdread' '--enable-shout' '--enable-goom' '--enable-caca' '--disable-sdl' '--enable-qt' '--enable-skins2' '--enable-sse' '--enable-mmx' '--enable-libcddb' '--enable-zvbi' '--disable-telx' '--enable-nls' '--host=i686-w64-mingw32' 'host_alias=i686-w64-mingw32'
[03447b64] core libvlc debug: using multimedia timers as clock source
[03447b64] core libvlc debug: min period: 1 ms, max period: 1000000 ms
[03447b64] core libvlc debug: searching plug-in modules
[03447b64] core libvlc debug: loading plugins cache file C:\Program Files (x86)\VideoLAN\VLC\plugins\plugins.dat
[03447b64] core libvlc debug: recursively browsing `C:\Program Files (x86)\VideoLAN\VLC\plugins'
[03447b64] core libvlc debug: saving plugins cache C:\Program Files (x86)\VideoLAN\VLC\plugins\plugins.dat
[03447b64] core libvlc debug: plug-ins loaded: 419 modules
[03447b64] core libvlc debug: translation test: code is "C"
[03447b64] core libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU
[03469fd4] core playlist debug: creating audio output
[034e1634] core audio output debug: looking for audio output module matching "any": 6 candidates
[034e1634] directsound audio output debug: found 3 devices
[034e1634] core audio output debug: using audio output module "directsound"
[03469fd4] core playlist debug: keeping audio output
[03469fd4] core playlist debug: adding item `vlc' ( file:///C:/Users/sevkorf/Dropbox/Jan/PythonPi/src/vlc )
[03493604] core input debug: Creating an input for 'vlc'
[03469fd4] core playlist debug: meta ok for (null), need to fetch art
[03493604] core art finder debug: looking for meta fetcher module matching "any": 1 candidates
[034f5dec] core generic debug: creating audio output
[0350c2b4] core audio output debug: looking for audio output module matching "any": 6 candidates
[0350c2b4] directsound audio output debug: found 3 devices
[0350c2b4] core audio output debug: [03493604] using audio output module "directsound"
lua art finder debug: Trying Lua scripts in C:\Users\sevkorf\AppData\Roaming\vlc\lua\meta\fetcher
[03493604] lua art finder debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
[034f5dec] core generic debug: keeping audio output
[03493604] lua art finder debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
[0349376c] core input debug: Creating an input for 'http://www.youtube.com/watch?v=JiDx4h_F1Aw'
[03493604] lua art finder debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
[03493604] core art finder debug: no meta fetcher modules matched
[03469fd4] core playlist debug: searching art for vlc
[03493604] core art finder debug: looking for art finder module matching "any": 2 candidates
[0349376c] core input debug: using timeshift granularity of 50 MiB, in path 'C:\Users\sevkorf\AppData\Local\Temp'
[03493604] lua art finder debug: Trying Lua scripts in C:\Users\sevkorf\AppData\Roaming\vlc\lua\meta\art
[03493604] lua art finder debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
[03493604] lua art finder debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
[03493604] lua art finder debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
[03493604] lua art finder debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
[0349376c] core input debug: `http://www.youtube.com/watch?v=JiDx4h_F1Aw' gives access `http' demux `' path `www.youtube.com/watch?v=JiDx4h_F1Aw'
[0349376c] core input debug: specified demux `any'
[0349376c] core input debug: creating demux: access='http' demux='any' location='www.youtube.com/watch?v=JiDx4h_F1Aw' file='\\www.youtube.com\watch?v=JiDx4h_F1Aw'
[034d3a7c] core demux debug: looking for access_demux module matching "http": 12 candidates
[034d3a7c] core demux debug: no access_demux modules matched
[0349376c] core input debug: creating access 'http' location='www.youtube.com/watch?v=JiDx4h_F1Aw', path='\\www.youtube.com\watch?v=JiDx4h_F1Aw'
[034f5abc] core access debug: looking for access module matching "http": 21 candidates
[03493604] lua art finder debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
[03493604] lua art finder debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
[034f5abc] http access debug: querying proxy for http://www.youtube.com/watch?v=JiDx4h_F1Aw
[034f5abc] http access debug: no proxy
[034f5abc] http access debug: http: server='www.youtube.com' port=80 file='/watch?v=JiDx4h_F1Aw'
[034f5abc] [03493604] core access debug: lua art finder debug: net: connecting to http://www.youtube.com port 80
skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
[03493604] lua art finder debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
[03493604] lua art finder debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
[03493604] core art finder debug: no art finder modules matched
[03469fd4] core playlist debug: art not found for vlc
[034f5abc] core access debug: connection succeeded (socket = 1120)
[034f5abc] http access debug: protocol 'HTTP' answer code 301
[034f5abc] http access debug: Content-Type: text/html; charset=utf-8
[034f5abc] http access debug: this frame size=0
[034f5abc] http access debug: Server: YouTubeFrontEnd
[034f5abc] http access debug: Accepting Cookie: YSC=yzH6u9LB9nE; path=/; domain=.youtube.com; httponly
[034f5abc] http access debug: Accepting Cookie: VISITOR_INFO1_LIVE=Nb5TMQlymdc; path=/; domain=.youtube.com; expires=Sun, 07-Jan-2018 22:52:19 GMT; httponly
[034f5abc] http access debug: Connection: close
[034f5abc] http access debug: redirection to https://www.youtube.com/watch?v=JiDx4h_F1Aw
[0509e464] core tls client debug: looking for tls client module matching "any": 1 candidates
[0509e464] gnutls tls client debug: using GnuTLS version 3.2.21
[0509e464] gnutls tls client debug: loaded 88 trusted CAs
[0509e464] core tls client debug: using tls client module "gnutls"
[034f5abc] http access debug: querying proxy for https://www.youtube.com/watch?v=JiDx4h_F1Aw
[034f5abc] http access debug: no proxy
[034f5abc] http access debug: http: server='www.youtube.com' port=443 file='/watch?v=JiDx4h_F1Aw'
[034f5abc] core access debug: net: connecting to http://www.youtube.com port 443
[034f5abc] core access debug: connection succeeded (socket = 1120)
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] core tls session error: TLS client session handshake timeout
[0347fd4c] core tls session error: TLS client session handshake error
[034f5abc] http access error: cannot establish HTTP/TLS session
[034f5abc] core access debug: net: connecting to http://www.youtube.com port 80
[034f5abc] core access debug: connection succeeded (socket = 1160)
[034f5abc] access_mms access debug: HTTP reply 'HTTP/1.0 301 Moved Permanently'
[034f5abc] access_mms access debug: content-length = 0
[034f5abc] access_mms access debug: redirection to https://www.youtube.com/watch?v=JiDx4h_F1Aw
[034f5abc] access_mms access debug: redirection to https://www.youtube.com/watch?v=JiDx4h_F1Aw
[034f5abc] core access debug: using access module "access_mms"
[034b0094] core stream debug: Using stream method for AStream*
[034b0094] core stream debug: starting pre-buffering
[034b0094] core stream error: cannot pre fill buffer
[034f5abc] core access debug: removing module "access_mms"
[034f5abc] access_mms access debug: closing stream
[0349376c] core input warning: cannot create a stream_t from access
[0349376c] core input debug: Creating an input for 'https://www.youtube.com/watch?v=JiDx4h_F1Aw'
[0349376c] core input debug: using timeshift granularity of 50 MiB, in path 'C:\Users\sevkorf\AppData\Local\Temp'
[0349376c] core input debug: `https://www.youtube.com/watch?v=JiDx4h_F1Aw' gives access `https' demux `' path `www.youtube.com/watch?v=JiDx4h_F1Aw'
[0349376c] core input debug: specified demux `any'
[0349376c] core input debug: creating demux: access='https' demux='any' location='www.youtube.com/watch?v=JiDx4h_F1Aw' file='\\www.youtube.com\watch?v=JiDx4h_F1Aw'
[034d3b24] core demux debug: looking for access_demux module matching "https": 12 candidates
[034d3b24] core demux debug: no access_demux modules matched
[0349376c] core input debug: creating access 'https' location='www.youtube.com/watch?v=JiDx4h_F1Aw', path='\\www.youtube.com\watch?v=JiDx4h_F1Aw'
[069e0e5c] core access debug: looking for access module matching "https": 21 candidates
[0509fbc4] core tls client debug: looking for tls client module matching "any": 1 candidates
[0509fbc4] gnutls tls client debug: using GnuTLS version 3.2.21
[0509fbc4] gnutls tls client debug: loaded 88 trusted CAs
[0509fbc4] core tls client debug: using tls client module "gnutls"
[069e0e5c] http access debug: querying proxy for https://www.youtube.com/watch?v=JiDx4h_F1Aw
[069e0e5c] http access debug: no proxy
[069e0e5c] http access debug: http: server='www.youtube.com' port=443 file='/watch?v=JiDx4h_F1Aw'
[069e0e5c] core access debug: net: connecting to http://www.youtube.com port 443
[069e0e5c] core access debug: connection succeeded (socket = 1116)
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] gnutls tls session debug: TLS handshake: Resource temporarily unavailable, try again.
[0347fd4c] core tls session error: TLS client session handshake timeout
[0347fd4c] core tls session error: TLS client session handshake error
[069e0e5c] http access error: cannot establish HTTP/TLS session
[069e0e5c] core access debug: no access modules matched
[0349376c] core input error: open of `https://www.youtube.com/watch?v=JiDx4h_F1Aw' failed
[0349376c] core input error: Your input can't be opened
[0349376c] core input error: VLC is unable to open the MRL 'https://www.youtube.com/watch?v=JiDx4h_F1Aw'. Check the log for details.

nevare
Blank Cone
Blank Cone
Posts: 17
Joined: 16 Sep 2016 13:39

Re: YouTube TLS handshake

Postby nevare » 15 May 2017 14:56

Anyone?

I get this behavior on 2 different networks, so I don't think that's the problem..

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: YouTube TLS handshake

Postby Jean-Baptiste Kempf » 15 May 2017 18:24

Did you try 3.0, by any chance?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

nevare
Blank Cone
Blank Cone
Posts: 17
Joined: 16 Sep 2016 13:39

Re: YouTube TLS handshake

Postby nevare » 16 May 2017 08:55

I did try 3.0, and it seems to be fixed there, however I'm bound to 2.4 at the moment because I run it at a Raspberry Pi with hardware acceleration.

Any chance you got an idea to get it working on 2.4?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: YouTube TLS handshake

Postby Jean-Baptiste Kempf » 11 Jun 2017 16:28

Probably never, sorry.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests