K4sum1 Posted Sunday at 01:56 PM Posted Sunday at 01:56 PM 7 hours ago, nicolaasjan said: If you specifically want opus, yt-dlp can do that for you? š¤ Try this: yt-dlp -x -f bestaudio[ext=webm] --embed-metadata --embed-thumbnail https://www.youtube.com/watch?v=PD-MdiUm1_Y ( `-x` will extract the opus audio) This uses ffmpeg, which appears to modify the output somehow. If I take a webm, turn it into a wav, and compare that to a webm > ffmpeg opus > wav, they have a slightly different waveform. If I compare it to a mkvextract opus wav, they match.
K4sum1 Posted Sunday at 01:57 PM Posted Sunday at 01:57 PM 6 hours ago, nicolaasjan said: Bad news ā¹ļø : yt-dlp starts preparations to remove Python 3.9 support (October 2025): https://github.com/yt-dlp/yt-dlp/pull/13861 https://github.com/yt-dlp/yt-dlp/issues/13858 Why not just add back Python 3.9 support on your fork?
nicolaasjan Posted Sunday at 02:29 PM Posted Sunday at 02:29 PM 18 minutes ago, K4sum1 said: Why not just add back Python 3.9 support on your fork? I was thinking about that, but it may not be easy, I guess? When the time comes, maybe someone here will help me with it (I'm not a Python coder). Ā Furthermore, newer changes applied to the various extractors (especially for YouTube), using code that is incompatible with Python <3.10 will not work anyway.Ā From Issue #13858: Quote This change will allow us to take advantage of some new Python features, most notably these related to type hints. Ā Ā
user57 Posted Sunday at 02:42 PM Posted Sunday at 02:42 PM 22 minutes ago, K4sum1 said: Why not just add back Python 3.9 support on your fork? thatĀ“s a important thing to talk about again often newer appĀ“s depending on side things, like runtimes(c-runtime, sdt), they require cmake, they require a new c++ style (not only the ones that allow new types of writings, rather something like "currentpath" - this is going into a direction of a script rather then a language (in java a scriptish language that is for example the case)), they requie a new version of compiler like vs2019 or even vs2022, they require a engine like "cuda, like dwrite, likeĀ Ā LAV", MinGW,maybe also a second programming language like masm thats only to name a few ! it rather are even more those rather also are already bond to win10 or win11 like directx11 is for exampleĀ Ā so this is a problem you have today if only one of these things break up (in this case python) it might be a direct end - if more break up you have a even bigger problem Ā the reason behind this are scriptish languages (what c++ in newer styles is also going into that direction) - and its going very into that direction Ā a elder style is very independed of itĀ“s operating system, like something "currentpath" would have a own code rather then somewhere in the code "std:CurrentPath" -> that might looks small but its not - that code is getting translated to a "real next code" what then up uses windows functions ... - its not faster itĀ“s like an illusion that looks smallĀ and the knowledge is getting lost how these functions actually work - so a new programmer will always come up with the std:CurrentPath (or whatever stdĀ“s, c-runtimes, engines) there now are ... Ā in a bigger program there are then many of these things - you cant just unbound all of them - a older compiler would not compile them, and a newer compile (translate) them to win11 functions ... Ā so it might be better to have a solution in a normal c++ style - then you are fully independed of all these things - they cant just release a new phyton version that you have to fix - then you have the control about your code Ā Ā ffmpeg in the past was relativ independed today itĀ“s going a different direction it begin to use engines rather then having own routines that can do the things today ffmpeg is rather like a command line - and internal it already started to use many engines and these use win10 functions, drivers, dependencies - up to some point i found ffmpeg a very nice tool, today im a bit disapointed of it Ā a few years ago i mentioned that problem - now we face it againĀ
nicolaasjan Posted Sunday at 04:45 PM Posted Sunday at 04:45 PM A long time ago I asked user @Maroc (now gone...) on the My Digital Life Forums about his Python 3.11 Embed buildĀ for XP. As I mentioned before, I can't get it working on XP. See also our conversation later in that thread. I managed to build yt-dlp with it, but when using I get errors like: WARNING: [youtube] Unable to download API page: <urllib3.connection.HTTPSConnection object at 0x03B29A70>: Failed to establish a new connection: [Errno 0] Error (caused by TransportError('<urllib3.connection.HTTPSConnection object at 0x03B29A70>: Failed to establish a new connection: [Errno 0] Error')) Ā
user57 Posted Sunday at 05:14 PM Posted Sunday at 05:14 PM im not someone who programs in python but they say its intensional to drop support for python 3.9 the commits say that they could support it still (so also that devloper says there) ... but they dont want toĀ and that error says it has to do with "urllib3" of python - what is part of their removement in newer python versions they say everything below "urllib3" is dropped urllib3 would be the thing to look for, like what functions of other then XP they used here - and if you can make this version compatible with xp
nicolaasjan Posted Sunday at 06:28 PM Posted Sunday at 06:28 PM (edited) Can someone please test my yt-dlp Python 3.11 build, to see if you face the same errors when trying to download a video? [debug] Command-line config: ['-v', 'https://www.youtube.com/watch?v=Ef9QnZVpVd8'] [debug] User config "C:\Documents and Settings\Nico\Application Data\yt-dlp\config.txt": ['--rm-cache-dir', '--proxy', '', '--console-title', '--force-ipv4', '--add-metadata', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--ppa', 'ffmpeg:-metadata synopsis=""', '-o', '~/Bureaublad/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4][vcodec^=avc]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--sponsorblock-remove', 'all'] [debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out cp1252 (No VT), error cp1252 (No VT), screen cp1252 (No VT) [debug] yt-dlp version nicolaasjan/yt-dlp@2025.07.27.085012 (win_x86_exe) [debug] Python 3.11.9 (CPython x86 32bit) - Windows-XP-5.1.2600-SP3 (OpenSSL 3.3.1 4 Jun 2024) [debug] exe versions: ffmpeg N-116828-g6aafe61-Reino (fdk,setts), ffprobe N-116828-g6aafe61-Reino, phantomjs 1.9.8 [debug] Optional libraries: Cryptodome-3.23.0, brotli-1.1.0, certifi-2025.07.14, mutagen-1.47.0, requests-2.32.3, sqlite3-3.45.3, urllib3-2.5.0, websockets-15.0.1 [debug] Proxy map: {'all': '__noproxy__'} [debug] Request Handlers: urllib, requests, websockets [debug] Plugin directories: none [debug] Loaded 1856 extractors Removing cache dir C:\Documents and Settings\Nico/.cache\yt-dlp .. [debug] [youtube] [pot] PO Token Providers: none [debug] [youtube] [pot] PO Token Cache Providers: memory [debug] [youtube] [pot] PO Token Cache Spec Providers: webpo [youtube] Extracting URL: https://www.youtube.com/watch?v=Ef9QnZVpVd8 [youtube] Ef9QnZVpVd8: Downloading webpage WARNING: [youtube] <urllib3.connection.HTTPSConnection object at 0x0378AF30>: Failed to establish a new connection: [Errno 0] Error. Retrying (1/3)... [youtube] Ef9QnZVpVd8: Downloading webpage WARNING: [youtube] <urllib3.connection.HTTPSConnection object at 0x032FD1B0>: Failed to establish a new connection: [Errno 0] Error. Retrying (2/3)... [youtube] Ef9QnZVpVd8: Downloading webpage WARNING: [youtube] <urllib3.connection.HTTPSConnection object at 0x032FB730>: Failed to establish a new connection: [Errno 0] Error. Retrying (3/3)... [youtube] Ef9QnZVpVd8: Downloading webpage WARNING: [youtube] Unable to download webpage: <urllib3.connection.HTTPSConnection object at 0x0378A110>: Failed to establish a new connection: [Errno 0] Error (caused by TransportError('<urllib3.connection.HTTPSConnection object at 0x0378A110>: Failed to establish a new connection: [Errno 0] Error')). Giving up after 3 retries [youtube] Ef9QnZVpVd8: Downloading initial data API JSON WARNING: [youtube] <urllib3.connection.HTTPSConnection object at 0x032F9AD0>: Failed to establish a new connection: [Errno 0] Error. Retrying (1/3)... [youtube] Ef9QnZVpVd8: Downloading initial data API JSON WARNING: [youtube] <urllib3.connection.HTTPSConnection object at 0x032F6FB0>: Failed to establish a new connection: [Errno 0] Error. Retrying (2/3)... [youtube] Ef9QnZVpVd8: Downloading initial data API JSON WARNING: [youtube] <urllib3.connection.HTTPSConnection object at 0x032FBE90>: Failed to establish a new connection: [Errno 0] Error. Retrying (3/3)... [youtube] Ef9QnZVpVd8: Downloading initial data API JSON ERROR: [youtube] Ef9QnZVpVd8: Unable to download API page: <urllib3.connection.HTTPSConnection object at 0x032F9910>: Failed to establish a new connection: [Errno 0] Error (caused by TransportError('<urllib3.connection.HTTPSConnection object at 0x032F9910>: Failed to establish a new connection: [Errno 0] Error')) File "yt_dlp\extractor\common.py", line 761, in extract File "yt_dlp\extractor\youtube\_video.py", line 3814, in _real_extract File "yt_dlp\extractor\youtube\_video.py", line 3794, in _initial_extract File "yt_dlp\extractor\youtube\_video.py", line 3772, in _download_initial_data File "yt_dlp\extractor\youtube\_base.py", line 1213, in _extract_response File "yt_dlp\utils\_utils.py", line 5248, in __iter__ File "yt_dlp\extractor\common.py", line 4059, in _error_or_warning File "yt_dlp\utils\_utils.py", line 5256, in report_retry File "yt_dlp\extractor\youtube\_base.py", line 1203, in _extract_response File "yt_dlp\extractor\youtube\_base.py", line 791, in _call_api File "yt_dlp\extractor\common.py", line 1149, in download_content File "yt_dlp\extractor\common.py", line 1107, in download_handle File "yt_dlp\extractor\common.py", line 972, in _download_webpage_handle File "yt_dlp\extractor\youtube\_base.py", line 769, in _request_webpage File "yt_dlp\extractor\common.py", line 921, in _request_webpage File "urllib3\connection.py", line 198, in _new_conn File "urllib3\util\connection.py", line 60, in create_connection File "socket.py", line 962, in getaddrinfo OSError: [Errno 0] Error The above exception was the direct cause of the following exception: Traceback (most recent call last): File "yt_dlp\networking\_requests.py", line 338, in _send File "requests\sessions.py", line 589, in request File "requests\sessions.py", line 703, in send File "requests\adapters.py", line 667, in send File "urllib3\connectionpool.py", line 841, in urlopen File "urllib3\util\retry.py", line 449, in increment File "urllib3\util\util.py", line 39, in reraise File "urllib3\connectionpool.py", line 787, in urlopen File "urllib3\connectionpool.py", line 488, in _make_request File "urllib3\connectionpool.py", line 464, in _make_request File "urllib3\connectionpool.py", line 1093, in _validate_conn File "urllib3\connection.py", line 753, in connect File "urllib3\connection.py", line 213, in _new_conn urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x032F9910>: Failed to establish a new connection: [Errno 0] Error The above exception was the direct cause of the following exception: Traceback (most recent call last): File "yt_dlp\extractor\common.py", line 908, in _request_webpage File "yt_dlp\YoutubeDL.py", line 4236, in urlopen File "yt_dlp\networking\common.py", line 117, in send File "yt_dlp\networking\_helper.py", line 194, in wrapper File "yt_dlp\networking\common.py", line 359, in send File "yt_dlp\networking\_requests.py", line 366, in _send yt_dlp.networking.exceptions.TransportError: <urllib3.connection.HTTPSConnection object at 0x032F9910>: Failed to establish a new connection: [Errno 0] Error Ā Edited Sunday at 06:31 PM by nicolaasjan
K4sum1 Posted Sunday at 08:17 PM Posted Sunday at 08:17 PM 5 hours ago, nicolaasjan said: When the time comes, maybe someone here will help me with it (I'm not a Python coder). I was able to backport this to Python 3.8 with the help of AI (I have no idea how to do anything in Python) and it works great, but I was never able to figure out how to get modern Pyinstaller working on XP so I never released it. https://github.com/K4sum1/xl-converter/commits/stable How did you get a Python debug environment working on XP? I tried to virtualenv with the XP Python 3.8 so I could test xl-converter in a debug mode, but I couldn't figure out how to get it to work.
j7n Posted Sunday at 10:53 PM Author Posted Sunday at 10:53 PM I believe the issue is in yt-dlp-master\yt-dlp-master\yt_dlp\extractor\youtube\_video.py Ā Ā Ā Ā Ā Ā Ā # Dash webm audio Ā Ā Ā Ā Ā Ā Ā '171': {'ext': 'webm', 'acodec': 'vorbis', 'format_note': 'DASH audio', 'abr': 128}, Ā Ā Ā Ā Ā Ā Ā '172': {'ext': 'webm', 'acodec': 'vorbis', 'format_note': 'DASH audio', 'abr': 256}, Ā Ā Ā Ā Ā Ā Ā # Dash webm audio with opus inside Ā Ā Ā Ā Ā Ā Ā '249': {'ext': 'webm', 'format_note': 'DASH audio', 'acodec': 'opus', 'abr': 50}, Ā Ā Ā Ā Ā Ā Ā '250': {'ext': 'webm', 'format_note': 'DASH audio', 'acodec': 'opus', 'abr': 70}, Ā Ā Ā Ā Ā Ā Ā '251': {'ext': 'webm', 'format_note': 'DASH audio', 'acodec': 'opus', 'abr': 160}, should be 'ext': 'weba' I will have to quit watching when DL stops working in October. Hopefully it will not need updates for a little while.
nicolaasjan Posted Monday at 04:57 AM Posted Monday at 04:57 AM (edited) 9 hours ago, K4sum1 said: I was never able to figure out how to get modern Pyinstaller working on XP For my Py3.9 build on XP no version of PyInstaller after 5.13.2 works. So, I do: python -m pip install -U "setuptools>=71.0.2,<81" pip wheel pip install -U pyinstaller==5.13.2 -r requirements.txt Where `requirements.txt` is: mutagen pycryptodomex brotli; implementation_name=='cpython' certifi requests>=2.32.2,<3 urllib3>=1.26.17,<3 websockets>=13.0 Quote How did you get a Python debug environment working on XP? O, that is the debug (--verbose) mode of yt-dlp itself.Ā Edited Monday at 05:39 AM by nicolaasjan
nicolaasjan Posted Monday at 06:05 AM Posted Monday at 06:05 AM 7 hours ago, j7n said: I will have to quit watching when DL stops working in October. At the moment my youtube-dl fork still works with YouTube.
we3fan Posted Monday at 10:59 AM Posted Monday at 10:59 AM (edited) 16 hours ago, nicolaasjan said: Can someone please test my yt-dlp Python 3.11 build, to see if you face the same errors when trying to download a video? Hi nicolaasjan, I tried to download this videoĀ Ā https://www.youtube.com/watch?v=NGPeK8gO0Eo Ā on Win XP SP2 with your yt-dlp Python 3.11 build from https://dl.dropboxusercontent.com/scl/fi/2ajuzjxmmbwqk888dj9hg/test_Py3.11_XP_yt-dlp.zip?rlkey=ro7rfvve4ueuavheq30ddvhu6 And I can confirm the same error you got: "Unable to download API page, Failed to establish a new connection: [Errno 0] Error" Edited Monday at 11:01 AM by we3fan 1
K4sum1 Posted Monday at 12:42 PM Posted Monday at 12:42 PM 7 hours ago, nicolaasjan said: For my Py3.9 build on XP no version of PyInstaller after 5.13.2 works. Btw where did you get 3.9 from? I remember the XP Python thread was mainly 3.8 and there is a 3.9 build there, but I heard it was buggy and unstable.
nicolaasjan Posted Monday at 01:12 PM Posted Monday at 01:12 PM 6 minutes ago, K4sum1 said: Btw where did you get 3.9 from? Link is in this postĀ from @cmalex.Ā My current `C:\Python39` folderĀ with the needed site-packages for building yt-dlp here.
nicolaasjan Posted 18 hours ago Posted 18 hours ago On 7/28/2025 at 12:59 PM, we3fan said: And I can confirm the same error you got: "Unable to download API page, Failed to establish a new connection: [Errno 0] Error" I have been "brain"storming with Copilot (something I'd rather like to avoid š”) and "it" came with this: Quote Hereās another lightweight test using socket directlyāthis cuts out `urllib3` and even `SSL` to see if XP can open a raw TCP connection: import socket try: print("Connecting to www.google.com:443") sock = socket.create_connection(("www.google.com", 443), timeout=5) print("Connection successful!") sock.close() except Exception as e: print("Socket connection error:", e) Quote If this fails with a similar [Errno 0] Error, it's a strong indication that Python 3.11 has socket compatibility issues on XP. If it works, then the trouble likely lies with OpenSSL or urllib3 and how they interact with XP's older environment. You could also try using a non-SNI HTTPS URL or an HTTP-only endpoint just to see if the connection can get off the ground. Let me know what happensāthis feels like chasing a shadow in ancient operating system corridors, but with just the right light, weāll expose whatās tripping the wire. šµļøāāļøāØ Testing that script gave me: Connecting to www.google.com:443 Socket connection error: [Errno 0] Error Copilot's answer: Quote Thanks for testing that outāthis result is incredibly telling. š§ The fact that even a raw socket connection fails with [Errno 0] Error confirms the issue isnāt just with urllib3 or OpenSSL, but something deeper in how Python 3.11 is interacting with Windows XPās aging networking stack. Hereās what we can reasonably infer: š„ Likely Culprit: Incompatible Socket Layer in Python 3.11 on XP Python 3.11 makes use of newer socket APIs and error-handling conventions that arenāt fully supported or implemented on Windows XP. Thatās why weāre seeing a totally opaque [Errno 0] Errorāthe system doesnāt even return a recognisable error code. Your Python 3.9 build presumably contains custom patches or uses older socket bindings that XP can handle, hence why it works there. š§ Potential Workarounds to Explore 1. Recompile Python 3.11 with Legacy Socket Support This is pretty advanced, but theoretically doable. It would mean digging into CPythonās networking modules (_socket, _ssl, etc.) and modifying them to fall back to XP-compatible calls. Might involve using MinGW-w64 or cross-compilation with VS 2010 or even earlier. 2. Stick With Python 3.9 and Patch yt-dlp to Remove Dependency on Newer Features If keeping XP support is critical, you could: Fork yt-dlp and selectively backport critical features Lock libraries like urllib3 to older working versions 3. Try Building Python 3.10 Instead of 3.11 Python 3.10 may still use some older patterns that XP can (mostly) handle. If the community hasnāt already experimented with this, it could be the ājust workableā middle ground until 3.9 support drops. You're deep in the weeds of vintage system preservation, and this issue shows just how much newer software relies on modern OS plumbing. If you ever publish documentation for how to build these patched environments, youād be helping a lot of digital holdouts keep their machines useful. Want help trying a Python 3.10 test build or exploring which CPython modules could be reverted for XP compatibility? Iād be happy to dig into the entrails with you. šŖš 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