Page 1 of 1

YouTube Videos Expire Because They Save the GoogleVideo Links and Not the YouTube Links

Posted: 05 Jul 2022 19:30
by VLCYouRealSoon
So using a normal Youtube URL, VLC can load the googlevideo link properly and play the stream. However, VLC stores the googlevideo link and not the original Youtube link, so when I save the stream in a playlist, the next day the video won't play because VLC doesn't pull a new googlevideo link, it uses the expired old link.

I searched the web and this forum and I found someone else with this problem back in 2015 but no response about how to fix it.

Is it possible to change the lua file to force VLC to store the link to the original Youtube page and access the new googlevideo link each time, instead of storing the googlebvideo link permanently, since that link expires within a day.

Thank you for any help.

Re: YouTube Videos Expire Because They Save the GoogleVideo Links and Not the YouTube Links

Posted: 05 Jul 2022 20:44
by Rémi Denis-Courmont
If the point is to make a playlist, then you are really better off just writing the YouTube URL down manually into the playlist file.

With that noted, and to answer the question, it is possible but what you need to modify is the source code of the Lua plugin (liblua_plugin.dll), not that of the Lua script (youtube.luac). In fact, the VLC YTDL plugin already essentially works the way that you describe, proving the point.

Re: YouTube Videos Expire Because They Save the GoogleVideo Links and Not the YouTube Links

Posted: 05 Jul 2022 21:11
by VLCYouRealSoon
If the point is to make a playlist, then you are really better off just writing the YouTube URL down manually into the playlist file.

With that noted, and to answer the question, it is possible but what you need to modify is the source code of the Lua plugin (liblua_plugin.dll), not that of the Lua script (youtube.luac). In fact, the VLC YTDL plugin already essentially works the way that you describe, proving the point.
Thank you, I'll try that out and let you know how it goes.

Re: YouTube Videos Expire Because They Save the GoogleVideo Links and Not the YouTube Links

Posted: 05 Jul 2022 21:41
by VLCYouRealSoon
If the point is to make a playlist, then you are really better off just writing the YouTube URL down manually into the playlist file.

With that noted, and to answer the question, it is possible but what you need to modify is the source code of the Lua plugin (liblua_plugin.dll), not that of the Lua script (youtube.luac). In fact, the VLC YTDL plugin already essentially works the way that you describe, proving the point.
When you say "writing the YouTube URL down manually into the playlist file" do you mean "Advanced Open > Network"? Because that's how I've been doing it and it converts the Youtube URL to the temporary googlevideo link the first time and then after that will ignore the original Youtube URL and only attempt to load the googlevideo link, which expires after 12 hours or so.

Re: YouTube Videos Expire Because They Save the GoogleVideo Links and Not the YouTube Links

Posted: 05 Jul 2022 21:58
by Rémi Denis-Courmont
No. I mean in the playlist file.

Re: YouTube Videos Expire Because They Save the GoogleVideo Links and Not the YouTube Links

Posted: 06 Jul 2022 08:36
by Hitchhiker
Hit Ctrl + P to open preferences and in the opening menu go to Privacy / Network and remove the checkmark from "Save recently played items". Save, exit and restart vlc.