Page 1 of 1

Youtube Network Stream not working properly

Posted: 10 Apr 2024 04:08
by Elle_Wyvern
Hi everyone, i read many posts about adjusting the quality of the video and i tried a little bit of everything but i just can't make it work.
What i'm trying to do is streaming an animated map on roll20.
It basically works like this:

Upload a video on youtube.
Open VLC -> Media -> Open Network Stream -> Paste the link from my YT channel.
At this time im playing the video from youtube and i just need to get the "Location" in Tools -> Media Information and that's it, i have the code to paste on roll20 to stream a map from my VLC.

The problem is the video i'm watching on VLC has an extremely bad quality compared to the video on youtbe.
On yt i'm watching the video in 4k, while on VLC (According to the options -> Tool -> Preferences -> Show Settings ALL -> Input / Codecs -> Preferred Video Resolution) it seems like i can only play videos in 1080p and the quality is incredibly bad.
Since the website (Roll20) takes the video from vlc instead of YT, the final result is crazy bad.
Any idea on how to fix this?
I tried to read a few posts that eventually lead me to this "Preferred Video Resolution" option but no luck so far. I also tried to use Direct3D11 as video output but again no luck.
Thank you

Re: Youtube Network Stream not working properly

Posted: 10 Apr 2024 12:41
by Lotesdelere

Re: Youtube Network Stream not working properly

Posted: 10 Apr 2024 18:30
by Elle_Wyvern
Hi, thank you for the reply.
I'm reading both posts but it seems a different issue to my understanding. They are talking about VLC not opening entirely a video and that's not my case. I can open the video and i can see it, it just has a bad quality compared to the original video on youtube which is in 4k. So i'm not sure those posts can actually help me.

Re: Youtube Network Stream not working properly

Posted: 11 Apr 2024 03:48
by RĂ©mi Denis-Courmont
You might need to modify the Lua script to select the higher quality video URLs. They may be ignored because they lack audio or are otherwise not recognised properly.

Re: Youtube Network Stream not working properly

Posted: 11 Apr 2024 12:14
by Lotesdelere

Re: Youtube Network Stream not working properly

Posted: 11 Apr 2024 21:43
by mederi
Feb 14, 2023
youtube.lua: &fmt=hd URL parameter to leverage "adaptive" formats
This provides experimental support to play again all available video resolutions, by combining audio and video "adaptive" elementary streams using an input slave. Not in use by default; use at your own risks.

Again, by allowing to select resolutions lower than 360p, this also provides mitigation against the throttling issue.

Re: Youtube Network Stream not working properly

Posted: 11 Apr 2024 22:40
by Elle_Wyvern
I'm gonna give it a try if i can understand how to do it :)
Thank you

Re: Youtube Network Stream not working properly

Posted: 13 Apr 2024 12:21
by Lotesdelere
YT-DLP batch file as a workaround:
https://forum.videolan.org/viewtopic.ph ... 15#p495615

Where of course, you have to replace youtube-dl.exe with yt-dlp.exe and to set the correct path to VLC.exe.