LibVLCSharp not playing youtube

This forum is about all development around libVLC.
bartek_zgo
New Cone
New Cone
Posts: 2
Joined: 11 Aug 2022 11:05

LibVLCSharp not playing youtube

Postby bartek_zgo » 11 Aug 2022 12:14

I'm trying to start simple application using LibVLCSharp.WinForms.
When I want to play video from local file it is working.
When I want to play video from my streaming server it is working.
When I want to play video from youtube it is NOT working.

I have found many posts about replacing youtube.lua file. Didn't help.

Code: Select all

vlc = new LibVLCSharp.Shared.LibVLC(true); mediaPlayer = new LibVLCSharp.Shared.MediaPlayer(vlc); videoView1.MediaPlayer = mediaPlayer; videoView1.MediaPlayer.Play(new LibVLCSharp.Shared.Media(vlc, new Uri("https://www.youtube.com/watch?v=a-4o0etFnXg")));
I have removed many lines from log to match post limit. I can not find option to upload file.

Code: Select all

main libvlc debug: VLC media player - 3.0.17.4 Vetinari main libvlc debug: searching plug-in modules main libvlc debug: recursively browsing `libvlc\win-x64\plugins' main libvlc debug: plug-ins loaded: 496 modules main logger debug: looking for logger module matching "any": 2 candidates main keystore debug: looking for keystore module matching "memory": 3 candidates main keystore debug: using keystore module "memory" main libvlc debug: plug-ins loaded: 496 modules main logger debug: looking for logger module matching "any": 2 candidates main keystore debug: looking for keystore module matching "memory": 3 candidates main keystore debug: using keystore module "memory" main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU main audio output debug: looking for audio output module matching "any": 6 candidates mmdevice audio output error: cannot initialize COM (error 0x80010106) directsound audio output debug: found 3 devices main input debug: Creating an input for 'watch?v=a-4o0etFnXg' main input debug: `https://www.youtube.com/watch?v=a-4o0etFnXg' gives access `https' demux `any' path `www.youtube.com/watch?v=a-4o0etFnXg' main input source debug: creating demux: access='https' demux='any' location='www.youtube.com/watch?v=a-4o0etFnXg' file='\\www.youtube.com\watch' main demux debug: looking for access_demux module matching "https": 15 candidates main demux debug: no access_demux modules matched main stream debug: creating access: https://www.youtube.com/watch?v=a-4o0etFnXg main stream debug: (path: \\www.youtube.com\watch) main stream debug: looking for access module matching "https": 27 candidates gnutls tls client debug: TLS handshake: Success. .. http stream debug: stream 1 20 headers: http stream debug: :status: "200" .. main stream debug: using access module "access" main stream debug: looking for stream_filter module matching "prefetch,cache_block": 24 candidates .. main stream debug: using stream_filter module "prefetch" main stream debug: looking for stream_filter module matching "any": 24 candidates lua stream debug: Trying Lua scripts in C:\Users\Bartek\AppData\Roaming\vlc\lua\playlist lua stream debug: Trying Lua scripts in libvlc\win-x64\lua\playlist .. lua stream debug: Trying Lua playlist script libvlc\win-x64\lua\playlist\youtube.luac lua stream debug: Lua playlist script libvlc\win-x64\lua\playlist\youtube.luac's probe() function was successful .. main stream debug: no stream_filter modules matched main stream_directory debug: looking for stream_directory module matching "any": 1 candidates main stream_directory debug: no stream_directory modules matched main input source debug: attachment of directory-extractor failed for https://www.youtube.com/watch?v=a-4o0etFnXg main stream debug: looking for stream_filter module matching "record": 24 candidates .. es demux debug: cannot peek es demux debug: cannot peek mod demux debug: MOD validation failed (ext=com\watch) main demux debug: using demux module "directory" main demux meta debug: looking for meta reader module matching "any": 2 candidates lua demux meta debug: Trying Lua scripts in C:\Users\Bartek\AppData\Roaming\vlc\lua\meta\reader lua demux meta debug: Trying Lua playlist script libvlc\win-x64\lua\meta\reader\filename.luac main demux meta debug: no meta reader modules matched main input debug: `https://www.youtube.com/watch?v=a-4o0etFnXg' successfully opened lua stream debug: Detected new YouTube HTML code layout .. lua stream debug: Found new-style parameters for youtube video stream, parsing... main stream debug: looking for access module matching "https": 27 candidates main tls client debug: looking for tls client module matching "any": 1 candidates .. http stream debug: stream 1 closed by peer prefetch stream debug: end of stream h .. http stream debug: setting: Concurrent streams (0x0003): 100 http stream debug: setting: Initial window size (0x0004): 1048576 http stream debug: setting: Header list size (0x0006): 65536 .. http stream debug: stream 1 18 headers: http stream debug: :status: "206" http stream debug: vary: "Accept-Encoding, Origin" http stream debug: accept-ranges: "bytes" .. main stream debug: using access module "access" main stream debug: looking for stream_filter module matching "prefetch,cache_block": 24 candidates .. lua stream debug: Trying Lua playlist script libvlc\win-x64\lua\playlist\youtube.luac main stream debug: no stream_filter modules matched .. http stream debug: stream 1 closed by peer prefetch stream debug: end of stream http stream debug: out (priority) PING (0x06) frame of 8 bytes, flags 0x01, global main stream debug: removing module "prefetch" main stream debug: removing module "access" http stream debug: local stream 1 shut down http stream debug: out RST_STREAM (0x03) frame of 4 bytes, flags 0x00, stream 1 http stream debug: local shutdown

bartek_zgo
New Cone
New Cone
Posts: 2
Joined: 11 Aug 2022 11:05

Re: LibVLCSharp not playing youtube

Postby bartek_zgo » 11 Aug 2022 12:19

VideoLAN.LibVLC.Windows version: 3.0.17.4
LibVLCSharp version 3.6.6
LibVLCSharp.WinForms 3.6.6

mfkl
Developer
Developer
Posts: 746
Joined: 13 Jun 2017 10:41

Re: LibVLCSharp not playing youtube

Postby mfkl » 16 Aug 2022 03:19

Hi,

You're missing a step. See the docs https://code.videolan.org/videolan/LibV ... tube-video
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 20 guests