Page 4 of 5

Re: VLC stopped playing youtube!

Posted: 05 Oct 2023 14:19
by Lotesdelere
If you're not stuck to VLC and just want to download a YouTube video for later use, the web is filled with free online tools that can do this. They come and go, but a quick Google search for "download YouTube video" is sure to lead you to one. Just be careful the ads don't lead you to malware...

So don't search, YT-DLP is simply the best without any ads or crapware.

Re: VLC stopped playing youtube!

Posted: 05 Oct 2023 18:38
by ristretto6
Got it. I'm trying the yt-dlp route first.

I'm trying to install it on Windows 11. I've downloaded the exe file and double-clicked it; a dialog box shows up for 1 second and then disappears, but no further instructions appear. I tried inputting the following on the command line and got this error message which leads me to believe it has not been correctly installed:

C:\Users\linds>yt-dlp -v --write-auto-sub "https://www.youtube.com/watch?v=CjWp0QBh6HE"
'yt-dlp' is not recognized as an internal or external command,
operable program or batch file.

Did I miss something here in the installation process?
As I stated in my most recent post, the instructions worked for me. Also, if you can use the Windows command line, yt-dlp is again downloading youtube videos. It will also download the captions / subtitles if there are any. For VLC to work, you have to get the lua file from a version of VLC newer than 3.0.18 (but I strongly advise only using the lua file, don't install a newer version of VLC) and copy that to the VLC directory as has been described. It worked for me, and others have said it works for them. You don't have to be an "expert", but you do have to know how to move around the directories in a Windows system.

If you can't get through that, but you can open a Windows Command window, download yt-dlp.exe (this seems to be a pretty good site for an explanation of how to do this: <https://www.rapidseedbox.com/blog/yt-dlp-complete-guide>, and when it's installed, open a command window and use this command:

yt-dlp -v --write-auto-sub "https://www.youtube.com/watch?v=K6vGs3YnYPY"

of course, replacing the URL with the video of your choice. This will choose the highest resolution available for video and audio.

yt-dlp will also download entire lists of videos if you enter a URL for a play list.

If you want to limit the size of the video that is downloaded, you can do this:

yt-dlp -v --write-auto-sub -f "bv*[height<=1080]+ba/b" -N 4 "https://www.youtube.com/watch?v=K6vGs3YnYPY"

This will limit the size to 1080, or the largest size available that doesn't exceed 1080.

If you have problems playing VP9 video, you can do this:

yt-dlp -v -f "bv*[height<=1080][vcodec^=avc1]+ba*[ext=m4a]" -N 4 ""

But you should will probably want to re-read the various entries here. You really don't have to know a lot about computers to fix the problem.

Re: VLC stopped playing youtube!

Posted: 05 Oct 2023 19:09
by ristretto6
I will try AVC but just to clarify, I was running that from Windows Command (i.e. searched for "Command Prompt" and typed in the command shown above in my reply). Does the error message that displays mean that yt-dlp has not been installed properly?

Re: VLC stopped playing youtube!

Posted: 05 Oct 2023 19:13
by ristretto6
Actually I got a malware alert when trying to download AVC Free (any-video-converter dot com) so I'd like to try to troubleshoot the yt-dlp option if possible.

Re: VLC stopped playing youtube!

Posted: 05 Oct 2023 22:41
by Rémi Denis-Courmont
Just a reminder that links to non-OSS conversion software is strictly prohibited on these fora, and may lead to your account being suspended. This is not debatable.

(YT-DLP is OSS, so that's OK.)

Re: VLC stopped playing youtube!

Posted: 06 Oct 2023 13:05
by Lotesdelere
I've downloaded the exe file and double-clicked it; a dialog box shows up for 1 second and then disappears, but no further instructions appear. I tried inputting the following on the command line and got this error message which leads me to believe it has not been correctly installed:

C:\Users\linds>yt-dlp -v --write-auto-sub "https://www.youtube.com/watch?v=CjWp0QBh6HE"
'yt-dlp' is not recognized as an internal or external command,
operable program or batch file.

Did I miss something here in the installation process?
just to clarify, I was running that from Windows Command (i.e. searched for "Command Prompt" and typed in the command shown above in my reply). Does the error message that displays mean that yt-dlp has not been installed properly?

There is nothing to install, YT-DLP is a command line program which must be run from the command prompt and it has no built-in GUI.
Two solutions:
Open the command prompt in the folder where the executable is located, or navigate to its folder using the 'cd' command.
Or add the path to the executable to the Windows environment variables so you can run it from any place:
https://docs.oracle.com/en/database/ora ... ndows.html
https://superuser.com/questions/949560/ ... windows-10

Re: VLC stopped playing youtube!

Posted: 07 Oct 2023 14:54
by BZLederman
I'm not sure if this should be a separate topic, but it does involve Youtube live streams.

Since I put in the fix, I can play live streams. For example, if I enter this URL

https://www.youtube.com/watch?v=Q9_jZVECcjY

VLC will play it. It also shows up in the Playlist, as expected. I would like to be able to play it again in the future without having to open a text file and copy and paste the URL I saved: so I right-click on the entry in the play list and copy it to "Media Library". It now shows up there as expected. I have done this with between 10 and 15 of these Youtube URLs.

The problem is, if I go back later to the Media Library and click on one of the saved links, they don't work. I get

Your input can't be opened:
VLC is unable to open the MRL 'https://manifest.googlevideo.com/api/ma ... index.m3u8'. Check the log for details.

in the message window. I get this in the Log File:

Your input can't be opened:
VLC is unable to open the MRL 'https://manifest.googlevideo.com/api/ma ... index.m3u8'. Check the log for details.

But if I go back to the original URL I pasted in and do it again, it's still valid. The YouTube URL hasn't changed.

So my first question is: is it possible to save Youtube live stream URLs in the Media Folder?
If it is possible, could someone please explain what I have to do to get the URLs to save properly? Is there something that needs to be edited? It appears that the Media Folder isn't saving the URL, it's saving something that is very much larger than the URL containing all sorts of additional information that is causing a problem.

I also see this if I save the playlist in the default xspf format. Sometimes I can enter a saved playlist and it will work: other times, saving the same list of Youtube URLs produces an xspf format play list that doesn't work.

If the Media Folder can't save playlist entries for Youtube live streams, could someone at lest tell me which playlist format (m3u, m3u8, or xspf) will save URLs that VLC will play so I don't have to keep typing them in?

Thanks.

Re: VLC stopped playing youtube!

Posted: 07 Oct 2023 14:59
by BZLederman
It looks like the text I copied from the message window and the log file was filtered out: perhaps for size. If you need this information to diagnose the problem, please let me know how I can present it here for others to read. I don't see anything that says I can attach a log file or preserve the message window text if I paste it here.

Or perhaps there is a different solution: are there instructions for creating an m3u playlist that contains the original URLs and not the massive block of text VLC creates when saving a playlist? Perhaps there is a guide somewhere for creating playlists externally from VLC?

Re: VLC stopped playing youtube!

Posted: 07 Oct 2023 15:09
by Lotesdelere
I would like to be able to play it again in the future without having to open a text file and copy and paste the URL I saved: so I right-click on the entry in the play list and copy it to "Media Library".

That doesn't work, Youtube links have a time limit expiration, you must use the original URL https://www.youtube.com/watch?v=xxxxxxxxxxx .

Re: VLC stopped playing youtube!

Posted: 07 Oct 2023 17:15
by BZLederman
Thanks, but that just reinforces my questions: why does VLC add all that unnecessary baggage to a playlist or media folder entry, and how do I get rid of it and just have the URL (which does not expire) stored in a play list or in the Media Folder?

Re: VLC stopped playing youtube!

Posted: 08 Oct 2023 01:50
by BZLederman
I thought I posted this earlier today, but apparently something went wrong. It hasn't shown up, and I haven't received any error messages.

I believe I have found a way to put URLs for Youtube live streams into the Media Library and have them remain in the proper format.

I created an M3u file manually with some URLs in it. It looks like this:

#EXTM3U
#EXTINF:-1,,Ashland, VA
https://www.youtube.com/watch?v=Q9_jZVECcjY
#EXTINF:-1,,Belen NM
https://www.youtube.com/watch?v=8bNPqxDdoJQ
#EXTINF:-1,,Bergenfield, NJ
https://www.youtube.com/watch?v=BrDoJBHB9QM
#EXTINF:-1,,Big 10 Curve, Arvada CO
https://www.youtube.com/watch?v=rpT8zknUPTI
#EXTINF:-1,,Boston Green Line
https://www.youtube.com/watch?v=eAjqe_0KL6A
#EXTINF:-1,,Chester MA Railway Station
https://www.youtube.com/watch?v=c9NT_QAQAwE
#EXTINF:-1,,Chicago & North Western 1
https://www.youtube.com/watch?v=5TfxEck_Q7Q
#EXTINF:-1,,Chicago & North Western 2
https://www.youtube.com/watch?v=eWEF2fCyUbs
...

and so on. The name of the playlist can also be included, but I am trying to keep things as simple as possible so I gave the file a name that describes what it contains. It's plain text with an extension of M3U. There are supposed to be editors for M3U files, including an open source one on Github, but I just used Wordpad.

I then opened up VLC and used View to display the play list. I started with a clear page that has the prompt to drop a file there, and dropped my created M3U file. This makes the name of the file show up as the title.

It is important to NOT click on this file or expand it. What has to be done is to select that file and use a right click to drag it onto "Media Library". That should make the play list show up in Media Library with it's name. NOW the entry can be expanded to show the list of streams. When I click on one, it 'opens' and apparently checks the URL and retrieves the Youtube name of the stream. Clicking on that causes the stream to play.

I've tested it for several hours, and it usually works. I have been able to go back and forth between links and have them continue to work. I've also shut down and re-started VLC and the entries appear to remain in Media Library.

This worked for several hours. Unfortunately, just now when I re-did this posting I found a couple of the entries are corrupted. It might have happened because of a system reboot, that's the only thing I did differently. I tried looking at the ml.xspf file which is supposed to contain the bookmarks, but it's difficult to tell just what is in there and which entries are correct.

At least this is getting much closer to how the Media Library should handle URLS without adding additional information that doesn't appear to do anything useful, and is, indeed, very harmful because it stops the URLs from working. I would be very interested to hear if this works for anyone else, and if anyone can figure out why VLC will preserve some URLs but corrupt others. I have no idea why this worked correctly for several hours, and then partially stopped working.

Re: VLC stopped playing youtube!

Posted: 08 Oct 2023 10:32
by Rémi Denis-Courmont
When people save a playlist, they typically expect it to save as much meta-data as possible so that it is restored the next time, as per the playlist format. That's all there is to it.

It would be distinctly strange (and infuriating to many) for VLC to deliberately NOT save data into playlists that the playlist format can handle.

Re: VLC stopped playing youtube!

Posted: 08 Oct 2023 11:12
by BZLederman
I'm sorry, but I strongly disagree with both of your statements.

What people expect FIRST is that the playlist will work. If you change the URL so it doesn't work anymore, THAT is what will upset people.

The meta-data is not only not needed to view the stream: in this case, it is actively preventing the playlist from working.

You say: "It would be distinctly strange (and infuriating to many) for VLC to deliberately NOT save data into playlists that the playlist format can handle.".
If you look carefully and actually USE the playlist, you would clearly see that you are putting the data in a format that the playlist can NOT (repeat, NOT) handle. It's changing the data into a format that actively PREVENTS the playlist from working. Why can't you recognize that you are creating a problem, not fixing one.

How many people do you think actually look at the metadata? It's not really being presented in a way that is useful or easy to read.

Have ANY of your users asked for this pile of metadata? Compare this with how many people have asked for Youtube streams to work.

Once again: first and foremost, the play list must WORK!. It does absolutely no good to anyone to save metadata if it causes the playlist to fail.

You really, really, really need to re-evaluate your priorities. You also need to improve your communication with the vast numbers of people who use VLC to find out what they really want.

Re: VLC stopped playing youtube!

Posted: 08 Oct 2023 12:21
by BZLederman
Let me try explaining the problem to you in another way.

It doesn't matter how shiny the paint is on your car, or if you have heated leather seats if the engine doesn't start or the brakes don't work.

Does this explain why you need to make the playlist of URLs work properly first, and worry about loading every conceivable scrap of meta data second; and that you should not load metadata that will stop the URL from working?

Re: VLC stopped playing youtube!

Posted: 08 Oct 2023 12:54
by Rémi Denis-Courmont
A wall of text is not going to change anything. VLC is not going to get a less complete implementation of M3U just for you, or even as a workaround for the YouTube Lua plugin ill design.

If you don't like it, you're free to fork your own VLC version,or use one of several other Youtube plugins that don't leak the temporary video URLs into the playlist.

Re: VLC stopped playing youtube!

Posted: 20 Oct 2023 01:51
by ristretto6
I'm not as concerned with the playlist issue, but upon reading that you had a fix for this, I just updated to the latest version of VLC and gave it another try. While it does now import the video and play it in VLC, it is not smooth at all--very stuttery and laggy, like it's buffering but not. Same thing happens when I take the final step of Tools-->Codec Information and try to paste the URL into the browser to save.

This is the video URL I'm trying to save/download: https://www.youtube.com/watch?v=CjWp0QBh6HE

Am I missing something here? Feels like I'm getting closer but this still isn't a usable video.

Thank you!
- Lindsey
I'm not sure if this should be a separate topic, but it does involve Youtube live streams.

Since I put in the fix, I can play live streams. For example, if I enter this URL

https://www.youtube.com/watch?v=Q9_jZVECcjY

VLC will play it. It also shows up in the Playlist, as expected. I would like to be able to play it again in the future without having to open a text file and copy and paste the URL I saved: so I right-click on the entry in the play list and copy it to "Media Library". It now shows up there as expected. I have done this with between 10 and 15 of these Youtube URLs.

The problem is, if I go back later to the Media Library and click on one of the saved links, they don't work. I get

Your input can't be opened:
VLC is unable to open the MRL 'https://manifest.googlevideo.com/api/ma ... index.m3u8'. Check the log for details.

in the message window. I get this in the Log File:

Your input can't be opened:
VLC is unable to open the MRL 'https://manifest.googlevideo.com/api/ma ... index.m3u8'. Check the log for details.

But if I go back to the original URL I pasted in and do it again, it's still valid. The YouTube URL hasn't changed.

So my first question is: is it possible to save Youtube live stream URLs in the Media Folder?
If it is possible, could someone please explain what I have to do to get the URLs to save properly? Is there something that needs to be edited? It appears that the Media Folder isn't saving the URL, it's saving something that is very much larger than the URL containing all sorts of additional information that is causing a problem.

I also see this if I save the playlist in the default xspf format. Sometimes I can enter a saved playlist and it will work: other times, saving the same list of Youtube URLs produces an xspf format play list that doesn't work.

If the Media Folder can't save playlist entries for Youtube live streams, could someone at lest tell me which playlist format (m3u, m3u8, or xspf) will save URLs that VLC will play so I don't have to keep typing them in?

Thanks.

Re: VLC stopped playing youtube!

Posted: 20 Oct 2023 07:45
by Rémi Denis-Courmont
This is a known counter-measure of YouTube. It slows down the download to subnominal rate if it detects a downloader or ad blocker.

Re: VLC stopped playing youtube!

Posted: 08 Nov 2023 06:32
by ristretto6
Any ideas about this error message I'm getting? The extent of what I know about yt-dlp I'm learning from this forum, so any help getting this set up would be much appreciated.

Thank you!
Got it. I'm trying the yt-dlp route first.

I'm trying to install it on Windows 11. I've downloaded the exe file and double-clicked it; a dialog box shows up for 1 second and then disappears, but no further instructions appear. I tried inputting the following on the command line and got this error message which leads me to believe it has not been correctly installed:

C:\Users\linds>yt-dlp -v --write-auto-sub "https://www.youtube.com/watch?v=CjWp0QBh6HE"
'yt-dlp' is not recognized as an internal or external command,
operable program or batch file.

Did I miss something here in the installation process?
As I stated in my most recent post, the instructions worked for me. Also, if you can use the Windows command line, yt-dlp is again downloading youtube videos. It will also download the captions / subtitles if there are any. For VLC to work, you have to get the lua file from a version of VLC newer than 3.0.18 (but I strongly advise only using the lua file, don't install a newer version of VLC) and copy that to the VLC directory as has been described. It worked for me, and others have said it works for them. You don't have to be an "expert", but you do have to know how to move around the directories in a Windows system.

If you can't get through that, but you can open a Windows Command window, download yt-dlp.exe (this seems to be a pretty good site for an explanation of how to do this: <https://www.rapidseedbox.com/blog/yt-dlp-complete-guide>, and when it's installed, open a command window and use this command:

yt-dlp -v --write-auto-sub "https://www.youtube.com/watch?v=K6vGs3YnYPY"

of course, replacing the URL with the video of your choice. This will choose the highest resolution available for video and audio.

yt-dlp will also download entire lists of videos if you enter a URL for a play list.

If you want to limit the size of the video that is downloaded, you can do this:

yt-dlp -v --write-auto-sub -f "bv*[height<=1080]+ba/b" -N 4 "https://www.youtube.com/watch?v=K6vGs3YnYPY"

This will limit the size to 1080, or the largest size available that doesn't exceed 1080.

If you have problems playing VP9 video, you can do this:

yt-dlp -v -f "bv*[height<=1080][vcodec^=avc1]+ba*[ext=m4a]" -N 4 ""

But you should will probably want to re-read the various entries here. You really don't have to know a lot about computers to fix the problem.

Re: VLC stopped playing youtube!

Posted: 08 Nov 2023 11:49
by Lotesdelere
Any ideas about this error message I'm getting? The extent of what I know about yt-dlp I'm learning from this forum, so any help getting this set up would be much appreciated.
'yt-dlp' is not recognized as an internal or external command, operable program or batch file.

Did I miss something here in the installation process?

I already answered you here:
https://forum.videolan.org/viewtopic.ph ... 92#p539992

Re: VLC stopped playing youtube!

Posted: 24 Nov 2023 22:32
by BZLederman
There appears to be a new problem with Youtube.
Today I loaded my M3U playlist into VLC, and it would not play any of the videos from Youtube.
I can load the same M3U playlist into MPC-HC and PotPlayer: many links are "broken", but several still play normally.
I have even tried going to Youtube directly and copying the URL to be certain it's correct and loading it directly into VLC, and it won't play.

The most recent part of the log file says this:

http error: local stream 1 error: Cancellation (0x8)
adaptive: Changing stream format Unknown -> WebVTT
adaptive: Ending demuxer stream. [needrestart]
adaptive: Changing stream format Unknown -> TS
mpeg4audio: AAC channels: 2 samplerate: 48000
direct3d9 error: SetThumbNailClip failed: 0x800706f4
direct3d9 error: SetThumbNailClip failed: 0x800706f4
avcodec: Using DXVA2 (Intel(R) HD Graphics 4600, vendor Intel(8086), device 412, revision 6) for hardware decoding
adaptive: Ending demuxer stream. [needrestart]
mpeg4audio: AAC channels: 2 samplerate: 48000
direct3d9 error: SetThumbNailClip failed: 0x800706f4
direct3d9 error: SetThumbNailClip failed: 0x800706f4
avcodec: Using DXVA2 (Intel(R) HD Graphics 4600, vendor Intel(8086), device 412, revision 6) for hardware decoding
http error: local stream 1 error: Cancellation (0x8)
http error: local stream 1 error: Stream closed (0x5)
adaptive: Changing stream format Unknown -> WebVTT
adaptive: Ending demuxer stream. [discontinuity][needrestart]
adaptive: Changing stream format Unknown -> TS
mpeg4audio: AAC channels: 2 samplerate: 48000
direct3d9 error: SetThumbNailClip failed: 0x800706f4
direct3d9 error: SetThumbNailClip failed: 0x800706f4
avcodec: Using DXVA2 (Intel(R) HD Graphics 4600, vendor Intel(8086), device 412, revision 6) for hardware decoding
adaptive: Ending demuxer stream. [discontinuity][needrestart]
main error: Timestamp conversion failed for 535142667: no reference clock
main error: Could not convert timestamp 0 for FFmpeg
mpeg4audio: AAC channels: 2 samplerate: 48000
direct3d9 error: SetThumbNailClip failed: 0x800706f4
direct3d9 error: SetThumbNailClip failed: 0x800706f4
avcodec: Using DXVA2 (Intel(R) HD Graphics 4600, vendor Intel(8086), device 412, revision 6) for hardware decoding
main error: buffer deadlock prevented
adaptive: Ending demuxer stream. [discontinuity]
http error: local stream 1 error: Cancellation (0x8)
direct3d9 error: SetThumbNailClip failed: 0x800706f4
-- logger module stopped --
-- logger module started --
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt error: Unable to load extensions module
main: playlist is empty
http error: local stream 1 error: Cancellation (0x8)
-- logger module stopped --
-- logger module started --
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt error: Unable to load extensions module
main: playlist is empty
http error: local stream 1 error: Cancellation (0x8)
http error: local stream 1 error: Cancellation (0x8)
main: Status file authenticated
main: Status file authenticated
http error: local stream 1 error: Cancellation (0x8)
main: Status file authenticated
-- logger module stopped --
-- logger module started --
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt error: Unable to load extensions module
main: playlist is empty
http error: local stream 1 error: Cancellation (0x8)
-- logger module stopped --
-- logger module started --
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt error: Unable to load extensions module
main: playlist is empty
http error: local stream 1 error: Cancellation (0x8)
-- logger module stopped --

Any ideas on what went wrong?

Re: VLC stopped playing youtube!

Posted: 24 Nov 2023 23:14
by BZLederman
A follow-up.

I de-installed VLC 3.0.20
I installed VLC 3.0.18, reset all preferences, and made sure the correct LUA file was present. (I did an in-place upgrade so I never downloaded 3.0.19.)
It now plays most of the entries on my playlist. The ones that don't play have probably had their URL changed by Youtube, I think they force live channels to do this regularly.

Either I somehow messed up my preferences (which I think is unlikely as I hadn't changed any recently except to disable "one instance only", but is not impossible) or else there is something wrong with 3.0.20.

It would be helpful to know what other people are seeing.

Re: VLC stopped playing youtube!

Posted: 16 Dec 2023 14:01
by Lucas Zxc
hi guys
so, at the end of 2023 and now in version 3.0.20 of VLC, any news about VLC being able to play YouTube videos again or has a new method emerged that I don't know about yet?

Re: VLC stopped playing youtube!

Posted: 16 Dec 2023 17:32
by Lucas Zxc

and made sure the correct LUA file was present
What do you mean by correct LUA?

Re: VLC stopped playing youtube!

Posted: 21 Jan 2024 19:45
by FiLinX
Yes, the new youtube.lua allows you to play simple yutubins (streams and the previous lua plays).
But-with this, lua stops automatically switching to the best quality video format!
Example - https://www.youtube.com/watch?v=6n_xCI-peq0 - reproduces, but still remains in the 18 format (640x360).
Everything is fine with YouTube streams - it switches the formats automatically.

In general, everything remains the same - you can only work adequately through yt-dlp (+ffmpeg)!

ps: it turns out that the script is in the 3.0.19 and 3.0.20 builds, even newer in date than the script on the developers ' site..

Re: VLC stopped playing youtube!

Posted: 06 Apr 2024 12:28
by Lucas Zxc
Yes, the new youtube.lua allows you to play simple yutubins (streams and the previous lua plays).
But-with this, lua stops automatically switching to the best quality video format!
Example - https://www.youtube.com/watch?v=6n_xCI-peq0 - reproduces, but still remains in the 18 format (640x360).
Everything is fine with YouTube streams - it switches the formats automatically.

In general, everything remains the same - you can only work adequately through yt-dlp (+ffmpeg)!

ps: it turns out that the script is in the 3.0.19 and 3.0.20 builds, even newer in date than the script on the developers ' site..
I tested this one and the same problem occurs
lua error: Couldn't descramble YouTube throttling URL parameter: data transfer will get throttled

How do I solve this specific part?