AstroSkipper Posted Wednesday at 06:39 PM Author Posted Wednesday at 06:39 PM On 6/19/2026 at 12:36 PM, panda_zzz said: @AstroSkipper I think I'll spend the weekend doing a thorough debugging session on Windows XP because I initially tested the extension on Windows 7. Unfortunately, I can't completely avoid using BAT files, but I'll try to optimize the process. And what’s the situation on the Windows XP front? 1
AstroSkipper Posted Friday at 10:09 PM Author Posted Friday at 10:09 PM (edited) Development progress insights: The youtube.lua script by AstroSkipper I have completely reworked my youtube.lua script. Now, the title of the video stream and an English subtitle is shown in VLC if available and selected by the user. Settings of both are done in the VLC settings which is then read by my script. The complete script has been optimised for best performance under Windows XP on my old, weak P4 machine. And no JavaScript challenges, of course. Here is a short GIF file: On a computer with multi-processor technology and modern RAM, this runs at lightning starting speed, of course, compared to my single-processor computer with SD-RAM from 2000 and a stream starting time of 30 seconds. You probably won’t even see the flashing CMD window anymore or at most one nano-flash. In the process of developing, I’ve managed to reduce the number of flashing CMD windows from four to one.. In any case, VLC and YouTube are working perfectly together again, even on Windows XP. Edited Sunday at 11:59 AM by AstroSkipper 1
panda_zzz Posted Sunday at 06:53 PM Posted Sunday at 06:53 PM (edited) On 6/24/2026 at 9:39 PM, AstroSkipper said: And what’s the situation on the Windows XP front? I rewrote part of the functionality and replaced the automatic recommendations with manual ones that can be activated by clicking a button youtube_search.lua Edited Sunday at 06:54 PM by panda_zzz
AstroSkipper Posted Sunday at 09:58 PM Author Posted Sunday at 09:58 PM (edited) 3 hours ago, panda_zzz said: I rewrote part of the functionality and replaced the automatic recommendations with manual ones that can be activated by clicking a button youtube_search.lua 60.54 kB · 1 download Thanks! But your youtube_search.lua doesn't work under Windows XP. Entering in the subtitle form "en", the script freezes. Leaving it empty, VLC freezes. And the subtitle toggle button is broken. Sorry to say but the script, as a VLC extension, is unusable as is, at least under Windows XP. BTW, my youtube.lua script is controlled by VLC. It reads and respects the VLC settings done by the user. Edited Sunday at 10:10 PM by AstroSkipper 1
VistaLover Posted Sunday at 11:43 PM Posted Sunday at 11:43 PM My own test results under Vista SP2 32-bit, Core2 Duo of 2008 era; VLC-3.0.24b1 (32-bit) "portable"; entering "Adele" as the search term and clicking the "Search" button, a cmd prompt window flickers for a fraction of a sec, then 10 search results finally appear, while at the same time I get a small pop-up window (with a rolling progress bar) informing me that the extension is NOT responsive and asks me whether I want to terminate it now: If I click "Yes" (Ναι), the pop-up disappears and I'm left with just the 10 search results; if I then click the "Load Rec" button, the search GUI hangs (Not Responding) and when trying to close the Search Window, the OS informs me that VLC is not responding and (practically) all I can do is just close it... If I don't click the "Load Rec" button but click any of the 10 search result buttons, again I soon get a GUI hang, which leads to full app hang, too ... In a nutshell, some improvement over the previous iteration of the script, but still not the desired/expected behaviour ...
AstroSkipper Posted 18 hours ago Author Posted 18 hours ago (edited) @panda_zzz Whenever I provide something I’ve programmed myself, I’ve tested it thoroughly. So I don’t understand what you’re doing here. Apart from that, your script – which was already complex – has grown by another 50% and become even more complex. My general advice: less is often more. If you’re wondering what’s so bad about complexity, the answer is quite simple: it makes the code prone to errors. And that, in turn, makes it much harder to fix things quickly and easily. You’re using far too many variables, and the code is no longer easy to follow. That aside, your script ignores the subtitle settings in VLC. The trick is to communicate with VLC and query specific internal VLC variables. Another important thing. You should always test your own toggle buttons to ensure they work properly. And if you still think that a temporary batch file is the only solution, then I’m afraid I’ll have to disappoint you. You can definitely manage without one. Furthermore, your script, if it ever does work, will most likely run into YouTube’s JS wall and have to solve JS challenges. However, I don’t see any integration of an external JavaScript module such as QuickJS inside your script. Personally, I avoid any conflicts with YouTube’s JS wall, as it significantly delays the start of the stream. Anyway! That’s just my assessment, of course. Edited 17 hours ago by AstroSkipper Update of content 1
AstroSkipper Posted 15 hours ago Author Posted 15 hours ago (edited) Development progress insights: The ytsearch.lua script by AstroSkipper One week ago, I have created completely from scratch my own YouTube Search script I named ytsearch.lua. I followed exactly what I stated here: On 6/19/2026 at 1:08 PM, AstroSkipper said: Just an idea. You could also modify the youtube_search.lua script so that it only performs the YouTube search, but when a link is clicked, it passes it on to VLC, which then plays the YouTube link using the perfectly functioning youtube.lua script. That would streamline the script and make use of existing code. In such a case, there would be no need to reinvent the wheel. ... I did what I said. Only searching for YouTube videos and when clicking on it, the rest is up to my already existing youtube.lua script. It runs fine here under Windows XP. @panda_zzz My ytsearch.lua script is very slim, it has only one-sixth the file size of your youtube_search.lua script. And no temporary batch files, and no JS challenges here, of course. Here's a short clip: You just need to focus on the essentials, and then things will work out much better. Brevity is the soul of wit, especially when it comes to coding. Edited 12 hours ago by AstroSkipper Update of content
panda_zzz Posted 3 hours ago Posted 3 hours ago 23 hours ago, AstroSkipper said: Thanks! But your youtube_search.lua doesn't work under Windows XP. Entering in the subtitle form "en", the script freezes. Leaving it empty, VLC freezes. And the subtitle toggle button is broken. Sorry to say but the script, as a VLC extension, is unusable as is, at least under Windows XP. BTW, my youtube.lua script is controlled by VLC. It reads and respects the VLC settings done by the user. It would be helpful to get a detailed log of exactly what's happening in your player. “C:\Program Files\VideoLAN\VLC\vlc.exe” --verbose=3 --file-logging --logfile=“C:\path\to\your\vlc-log.txt” 11 hours ago, AstroSkipper said: I did what I said. Only searching for YouTube videos and when clicking on it, the rest is up to my already existing youtube.lua script. It runs fine here under Windows XP. @panda_zzz My ytsearch.lua script is very slim, it has only one-sixth the file size of your youtube_search.lua script. And no temporary batch files, and no JS challenges here, of course. Here's a short clip: The video is certainly interesting, but the source code is even more interesting for direct comparison and testing.
AstroSkipper Posted 2 hours ago Author Posted 2 hours ago (edited) 2 hours ago, panda_zzz said: The video is certainly interesting, but the source code is even more interesting for direct comparison and testing I understand that perfectly. But you’ve already been given the code for my youtube.lua script. The ytsearch.lua script is still under development (the title of my post was, after all, "Development progress insights"), and I generally don’t make source code available at this stage. And it’s not yet clear whether I’ll be publishing any code at all at the moment. But that’s a different matter and has nothing to do with you. I will comment on this at a later time. Besides, the code wouldn’t be of any use to you anyway, as our two scripts are completely different. You’ve almost managed to populate the link list (unfortunately, the script still freezes when doing so), and passing the link to VLC fails completely. You want to control a lot of things in the script that I don’t consider sensible and which I see as potentially triggering JS challenges, and the VLC settings – for subtitles, for example – are completely ignored in the process. You need to decide what your script is actually supposed to do and work through it bit by bit. Whenever one function is working reliably, implement the next one. Under no circumstances should you try to do everything at once. When I’m back at my computer, I’ll try to generate the log you’ve requested. Edited 1 hour ago by AstroSkipper
AstroSkipper Posted 1 hour ago Author Posted 1 hour ago @panda_zzz Here is a screenshot including the log before freezing: 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now