Jump to content

Who here has a Youtube-DL compile for WinXP?


j7n

Recommended Posts

10 minutes ago, Reino said:

Thanks, but yt-dlp doesn't work on my non-SSE2 cpu.

Greetings

My main comp also doesn't have SSE2 support (SL-75KAV + AthlonXP 2000+).

Non-SSE2 python3.9+yt-dlp  https://mega.nz/file/KkkgVb6C#c-I23du-LIS37UN83qnvW5_Xp3p53o1-Gg_QQAf2Iu0

MS VC Redist2015 (if no one in You system) - https://mega.nz/file/mgkQDKxa#7EpAQn8K8NM4QqHvIh8LwC5uh20rKzO--C5mf_aA2EU

PS. A thousand thanks to You for Your non-SSE2 builds and Xidel discussions and examples.

Best regards

Link to comment
Share on other sites


9 hours ago, Reino said:

What are "lazy extractors"?

See:

https://github.com/yt-dlp/yt-dlp#related-scripts

Quote

devscripts/make_lazy_extractors.py - Create lazy extractors. Running this before building the binaries (any variant) will improve their startup performance. Set the environment variable YTDLP_NO_LAZY_EXTRACTORS=1 if you wish to forcefully disable lazy extractor loading.

Quote

Thanks, but yt-dlp doesn't work on my non-SSE2 cpu.

 

I know, but I put the link here anyway for others to test. :)

Quote

The question is how long dirkf will keep this up.

Indeed.

I'm amazed he still manages to cope with the hundreds of duplicate issues.:o

Link to comment
Share on other sites

Hello cmalex,

19 hours ago, cmalex said:

My main comp also doesn't have SSE2 support (SL-75KAV + AthlonXP 2000+).

AMD Athlon XP 3200+ on an ASUS A7N8X-E Deluxe here. ;)
Because of a highly optimized WinXP iso, created with nLite (and the reason why I joined this forum years ago), I was able to postpone the purchase of a new pc for a lot of years. This year I do plan to finally buy a new one though. I've always had oldschool tower (computer case) pcs, but this time I will definitely buy an AMD Phoenix APU mini-pc when I can find a good deal.

19 hours ago, cmalex said:

I see Python binaries and libraries (without an installer), but no yt-dlp. Or do I misunderstand?

19 hours ago, cmalex said:

PS. A thousand thanks to You for Your non-SSE2 builds and Xidel discussions and examples.

You're welcome. And nice to see some other Xidel users.

Link to comment
Share on other sites

24 minutes ago, Reino said:

I see Python binaries and libraries (without an installer), but no yt-dlp. Or do I misunderstand?

Yt-dlp (stable, from 2023.03.04...) is in .\Lib\site-packages\yt_dlp. :)

Open CMD in that directory and run:

python __main__.py "URL"

(Python directory must be in your PATH)

But there have already been many changes since that last release.

Link to comment
Share on other sites

3 hours ago, Reino said:

I've always had oldschool tower (computer case) pcs, but this time I will definitely buy an AMD Phoenix APU mini-pc when I can find a good deal.

Does that also mean you will stop providing FFmpeg builds for XP? :o

On the other hand, if that PC is powerful enough, you can run XP in a virtual machine. :)

Link to comment
Share on other sites

4 hours ago, Reino said:

I see Python binaries and libraries (without an installer), but no yt-dlp.

Greetings.

Sorry. Variants: 1,2 - use pip release (some faster init), 3,4 - use local yt-dlp folder.

1. You can use cmd

python -m yt_dlp %*

2. You can reinstall to aquire yt-dlp.exe file in Scripts folder (linked to full python path, so You can place it everywere)

python -m pip install yt-dlp --no-deps -I

3. You can install it from folder (for example - local git repo "d:\git\yt-dlp\" ) with pip as editable. But there some strange with paths. It need python39._pth (as portable) with full path to this dir during install. Then You need to remove this file.

So bat file to install must look like

Quote

cd /d "%~dp0"
echo %cd% >python39._pth
echo .>>python39._pth
echo Lib>>python39._pth
echo Lib/site-packages>>python39._pth
python -m pip install -e D:\git\yt-dlp
del python39._pth

4. You can run setup.py from folder with yt-dlp (for example - local git repo "d:\git\yt-dlp\" ) as develop. But it's a very dirty solution.

python setup.py develop

1 and 2 - update via "python -m pip install yt-dlp --no-deps -U"

3 and 4 - update via updating folder content (git fetch / git pull). After update You need to rebuild lazy extractors "python devscripts\make_lazy_extractors.py"

Best regards.

Link to comment
Share on other sites

On 5/8/2023 at 8:38 PM, nicolaasjan said:

Does that also mean you will stop providing FFmpeg builds for XP? :o

As long as this computer works, I'll probably keep on compiling FFmpeg, or at least I'll try to. No promises though.

On 5/8/2023 at 10:48 PM, cmalex said:

1. You can use cmd

python -m yt_dlp %*

After having added 'C:\Program Files\Essentials\Python39\' and 'C:\Program Files\Essentials\Python39\Scripts' to %PATH%, it works. Thanks.

D:\Storage\Media\Binaries\yt-dlp_git>python -m yt_dlp --version
D:\Storage\Media\Binaries>python "yt-dlp_git\yt_dlp\__main__.py" --version
2023.03.04

 

On 5/8/2023 at 10:48 PM, cmalex said:

2. You can reinstall to aquire yt-dlp.exe file in Scripts folder (linked to full python path, so You can place it everywere)

python -m pip install yt-dlp --no-deps -I

That works too. I don't have much experience with Python, so if I understand correctly this 'yt-dlp.exe' it creates in the Scripts-dir (which is really small in size) is a module binary and is a sort of shortcut method (and hardcoded to that "site-packages\yt-dlp"-dir, which it will always depend on) to be able to quickly run yt-dlp, right?

On 5/8/2023 at 10:48 PM, cmalex said:

3. You can install it from folder (for example - local git repo "d:\git\yt-dlp\" ) with pip as editable. But there some strange with paths. It need python39._pth (as portable) with full path to this dir during install. Then You need to remove this file.

I've tried that. First by removing the already installed package:

python -m pip uninstall yt-dlp

Then by running that bat-file:

D:\Storage\Media\Binaries\yt-dlp_git>cd /d "D:\Storage\Media\Binaries\yt-dlp_git\"
D:\Storage\Media\Binaries\yt-dlp_git>echo D:\Storage\Media\Binaries\yt-dlp_git  1>python39._pth
D:\Storage\Media\Binaries\yt-dlp_git>echo . 1>>python39._pth
D:\Storage\Media\Binaries\yt-dlp_git>echo Lib 1>>python39._pth
D:\Storage\Media\Binaries\yt-dlp_git>echo Lib/site-packages 1>>python39._pth
D:\Storage\Media\Binaries\yt-dlp_git>python -m pip install -e "D:\Storage\Media\Binaries\yt-dlp_git"
Obtaining file:///D:/Storage/Media/Binaries/yt-dlp_git
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  ¦ exit code: 2
  ?-> [1 lines of output]
      C:\Program Files\Essentials\Python39\python.exe: can't open file 'C:\Program Files\Essentials\yt-dlp_py39\Lib\site-packages\pip': [Errno 2] No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
¦ exit code: 2
?-> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

As you can see I've extracted your archive to 'C:\Program Files\Essentials\Python39', but it looks as though "yt-dlp_py39" is hardcoded somewhere.

Link to comment
Share on other sites

Greetings.

3 hours ago, Reino said:

As you can see I've extracted your archive to 'C:\Program Files\Essentials\Python39', but it looks as though "yt-dlp_py39" is hardcoded somewhere.

Look like You had run python before folder renaming. Just remove recursively all *.pyc files and/or __pycache__ folders from Lib folder.

During work python made sort of compiling py scripts to relative path .\__pycache__\ScriptName.pyc. This files contains absolute path to original py to check changes.

You can leave it as is, or set system variables for  force disable bytecode saving "PYTHONDONTWRITEBYTECODE=1" (by cost of noticeable slowdown during script init. On my PC "yt-dlp -V" take 6s with cache and 21s without cache) or set absolute cache path to partition with "cheap" read (or RAM-drive - then only the first launch during this PC boot will be slow) -  "PYTHONPYCACHEPREFIX=%TEMP%\PYCACHE" or "PYTHONPYCACHEPREFIX=AbsolutePathWithDiskToPyCacheFolder"

https://docs.python.org/3.9/using/cmdline.html

I'm sorry, I forgot to mention that the python39._pth should be located near python.exe.  So i wrote bat to run from python folder...

And if error "ModuleNotFoundError: No module named '_distutils_hack'" appeared - please try to upgrade pip and setuptools -

python -m pip install -U pip setuptools

3 hours ago, Reino said:

this 'yt-dlp.exe' it creates in the Scripts-dir (which is really small in size) is a module binary and is a sort of shortcut method (and hardcoded to that "site-packages\yt-dlp"-dir, which it will always depend on) to be able to quickly run yt-dlp, right?

Lib\site-packages is a one of default path (relative to python.exe) to installed modules. https://docs.python.org/3.9/library/site.html

yt-dlp.exe created by pip is a stub that contain hardcoded path to python executable to call and small zipped py script to execute __main__.py from installed yt_dlp module (wherever it lies). "pip -e" add target folder to module search path.

So there is no any difference between   'python "yt-dlp_git\yt_dlp\__main__.py" ' and 'yt-dlp.exe' after 'pip install -e yt-dlp_git '.

Standalone yt-dlp.exe and yuotube-dl.exe is a self-extracting archives with "embedded" python  that every time unpacks required modules to %TEMP% folder and from there it starts.

Offtopic - As for me, the KVM-switch turned out to be very convenient. Just now at home I have two PC units  with one "output" set (keyb, mouse, monitor). Switch by keyboard shortcut (ScrollLock,ScrollLock,1 or 2). Primary -  XP at Athlon2000+  and secondary Win8.1 at i7-4770

Best regards.

Link to comment
Share on other sites

18 hours ago, cmalex said:

Look like You had run python before folder renaming. Just remove recursively all *.pyc files and/or __pycache__ folders from Lib folder.

That's right and that fixes it. Thanks.

18 hours ago, cmalex said:

I'm sorry, I forgot to mention that the python39._pth should be located near python.exe.  So i wrote bat to run from python folder...

And if error "ModuleNotFoundError: No module named '_distutils_hack'" appeared - please try to upgrade pip and setuptools -

python -m pip install -U pip setuptools

I've ran your little batch-file from within 'C:\Program Files\Essentials\Python39\' and 'python39._pth' now looks like:

C:\Program Files\Essentials\Python39
.
Lib
Lib/site-packages

Next...

C:\Program Files\Essentials\Python39>python -m pip install -U pip setuptools
Requirement already satisfied: pip in c:\program files\essentials\python39\lib\site-packages (23.1.2)
Requirement already satisfied: setuptools in c:\program files\essentials\python39\lib\site-packages (67.6.0)
Collecting setuptools
  Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 67.6.0
    Uninstalling setuptools-67.6.0:
      Successfully uninstalled setuptools-67.6.0
Successfully installed setuptools-67.7.2

C:\Program Files\Essentials\Python39>python -m pip install -e "D:\Storage\Media\Binaries\yt-dlp_git"
Obtaining file:///D:/Storage/Media/Binaries/yt-dlp_git
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: mutagen in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (1.46.0)
Requirement already satisfied: pycryptodomex in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (3.17)
Requirement already satisfied: websockets in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (11.0.2)
Requirement already satisfied: certifi in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (2022.12.7)
Requirement already satisfied: brotli in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (1.0.9)
Building wheels for collected packages: yt-dlp
  Building editable for yt-dlp (pyproject.toml) ... done
  Created wheel for yt-dlp: filename=yt_dlp-2023.3.4-0.editable-py2.py3-none-any.whl size=47819 sha256=445d73e5e3b9059666921bff5b0959db44e017eacba8fe029a6ae09d3c57dbf2
  Stored in directory: C:\DOCUME~1\Admin\LOCALS~1\Temp\pip-ephem-wheel-cache-yx6zbvri\wheels\46\b0\a5\bd49c961a5d74be392b5155310a656db3ad66862420fc9ba49
Successfully built yt-dlp
Installing collected packages: yt-dlp
  Attempting uninstall: yt-dlp
    Found existing installation: yt-dlp 2023.3.4
    Uninstalling yt-dlp-2023.3.4:
      Successfully uninstalled yt-dlp-2023.3.4
Successfully installed yt-dlp-2023.3.4

But then...

C:\Program Files\Essentials\Python39>yt-dlp
Traceback (most recent call last):
  File "C:\Program Files\Essentials\Python39\Lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Essentials\Python39\Lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Essentials\Python39\Scripts\yt-dlp.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'yt_dlp'

If '__main__.py' is now hard linked to 'D:\Storage\Media\Binaries\yt-dlp_git\yt_dlp\__main__.py', I don't understand why 'yt-dlp.exe' doesn't work.

22 hours ago, Reino said:

After having added 'C:\Program Files\Essentials\Python39\' and 'C:\Program Files\Essentials\Python39\Scripts' to %PATH%, it works.

Initially I've added these 2 maps at the beginning of %PATH%...

C:\>ECHO %PATH:;= & ECHO.%
C:\Program Files\Essentials\Python39\
C:\Program Files\Essentials\Python39\Scripts
C:\WINDOWS\system32
C:\WINDOWS
[...]
D:\Storage\Media\Binaries\DLLs

...but that caused some issues with Xidel. On WinXP I have to use the OpenSSL variant of Xidel if I want to open urls, in which case it will need 'libcrypto-3.dll' and 'libssl-3.dll' (or 'libcrypto-1_1.dll' and 'libssl-1_1.dll' from the older OpenSSL release) with zlib support(!), somewhere in %PATH% (in my case in 'D:\Storage\Media\Binaries\DLLs').

Your Python39 archive also comes with these OpenSSL dlls, but presumably without zlib support, so I had to prioritize 'D:\Storage\Media\Binaries\DLLs' and move it in front of the Python39 maps.

Did you compile everything in your Python39 archive yourself? If so, do you think you'll be able to help me out with this issue? :rolleyes:

Link to comment
Share on other sites

Greetings

5 hours ago, Reino said:

If '__main__.py' is now hard linked to 'D:\Storage\Media\Binaries\yt-dlp_git\yt_dlp\__main__.py', I don't understand why 'yt-dlp.exe' doesn't work.

On 5/8/2023 at 11:48 PM, cmalex said:

It need python39._pth (as portable) with full path to this dir during install. Then You need to remove this file.

Sorry, i can't break this magick. Pip require forced set of path to build some packages from sources - but that breaks all other modules... So python39._pth must exist only during "pip install" . Please remove python39._pth and try yt-dlp.exe once more.

5 hours ago, Reino said:

Your Python39 archive also comes with these OpenSSL dlls, but presumably without zlib support

Sorry... It turned out that I have different versions of the files in different places... "I Just Get These Headaches"(c).

Just "Kill'Em All" (c). It must work normally with Your's builds of OpenSSL.

And can i ask You to publish at least  one lastest dev files for Your's OpenSSL and FFMpeg shared (includes and lib)?

5 hours ago, Reino said:

If so, do you think you'll be able to help me out with this issue?

Why do You need exactly 3.4.10? Official 3.4.4 work perfectly without SSE2.

Under MSYS i'd just add python folder to PATH variable (in form of "/d/Programs/Python3.4.4").

On 1/1/2023 at 6:56 PM, Reino said:

I don't understand how such a rule is missing from the 'Makefile'.

Can You please give full Makefile, config.log and config.status?

On 1/8/2023 at 1:07 AM, Reino said:

Hardly "official" and rather experimental. Also as far as I can see, no source-files, only a pre-compiled release

Patch for official sources for MSVC 2017 and dev files for python 3.8.13 were always in the  Dev folder. Something like "PythonXP/Dev/Python3.8_dev_ddfdeced29.7z"

Dev files for 3.9.13 is a PythonXP/Python3.9/Python3.9_dev_dirty.7z

https://mega.nz/folder/KxExlAiC#L9rAQ5kTCtlHgZUwaxMpgw

Best regards.

Edited by cmalex
Link to comment
Share on other sites

21 hours ago, cmalex said:

Please remove python39._pth and try yt-dlp.exe once more.

I feel like such an id*** for not respecting the last line of your simple batch-file. That works. Thanks!

21 hours ago, cmalex said:

Sorry... It turned out that I have different versions of the files in different places...

Don't be sorry. It's something you couldn't have known. It's just a warning for other users.

21 hours ago, cmalex said:

And can i ask You to publish at least  one lastest dev files for Your's OpenSSL and FFMpeg shared (includes and lib)?

I hope openssl-3.1.0-win32-dev-xpmod-sse.7z would suffice. And FFmpeg: ffmpeg-6.1-588-4006c71-win32-dev-xpmod-sse.7z.

21 hours ago, cmalex said:

Why do You need exactly 3.4.10? Official 3.4.4 work perfectly without SSE2.

On 1/8/2023 at 12:07 AM, Reino said:

Looking at https://www.python.org/downloads/windows/ you'll see it doesn't mention "Note that Python 3.4.10 cannot be used on Windows XP or earlier.", so I guess it's the latest official Windows XP compatible release.

 

21 hours ago, cmalex said:

Under MSYS i'd just add python folder to PATH variable (in form of "/d/Programs/Python3.4.4").

I'm not using MSYS. I'm using Cygwin Bash, which all started like this.
A win32 Python installation won't work, because it (the 'python.exe') can't open Unix format paths, so I have to compile it from source.

21 hours ago, cmalex said:

Can You please give full Makefile, config.log and config.status?

Python-3.4.10_config-files.7z

Link to comment
Share on other sites

SMPlayer.22.7.0-qt5.6-Port.7z can use yt-dlp.exe by @nicolaasjan.
The subdir \mpv\ contains MPV NT6, you can delete all the contents and copy yt-dlp.exe there.
In the same subdir create yt-dlp.conf:
--no-check-certificates #Suppress HTTPS certificate validation.

MPV 10.2015 in WinXP can use yt-dlp.exe by @nicolaasjan renamed youtube-dl.exe
<https://web.archive.org/web/20160610143950/https:/mpv.srsfckn.biz/>
In the dir of MPV.exe I created a subdir \portable_config\, and in it I placed fonts.conf already in the package, and created mvp.conf:

ytdl-format=720p/best
ytdl-raw-options=no-check-certificates=
------------

youtube-dl.exe (yt-dlp.exe) when launched from MPV does not read its own configuration files (yt-dlp.conf), you can only pass parameters from MPV via ytdl-raw-options=


SMPlayer.exe and MPV.exe can also be started by @roytam1 browsers with "Open With" or "mpv-youtube-dl-binding," as already indicated by others:
-----------
IXOYE - 2023 January 13
I use "mpv-youtube-dl-binding" plug-in on NM28/S52:
<https://web.archive.org/web/20160610143950/https:/mpv.srsfckn.biz/>
<https://repo.hyperbola.info:50000/other/iceweasel-uxp/addons/mpv-youtube-dl-binding/watch_with_mpv-0.1.0-alpha.4-fx.xpi>

nicolaasjan - 2023 Jan 13
In New Moon you can use the "Open With" extension to download videos or audio straight from the browsers right click menu:
<https://ca-archive.us.to/storage/11/11097/open_with-6.8.6-fx+sm+tb.xpi>


In my system VLC is less effective than SMPLayer and MPV for streaming

Greetings
 

Edited by silverni
Link to comment
Share on other sites

Hi @nicolaasjan, I do hope you're well :P - RL issues prevent me from visiting MSFN as often as I used to :( ...

Might I inquire what exact source code is your latest youtube-dl.exe offering (linked in your forum signature) built on? The binary's version states May 21st:

youtube-dl -v => 

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2023.05.21
[debug] Lazy loading extractors enabled
[debug] Python 3.4.4 (CPython 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 1.0.2d 9 Jul 2015, -)
[debug] exe versions: none
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

... whereas yt-dl's master repo is currently at commit d1c6c5c from May 11th :dubbio:... Many thanks for any insight :) ...

Link to comment
Share on other sites

13 hours ago, VistaLover said:

Hi @nicolaasjan, I do hope you're well :P - RL issues prevent me from visiting MSFN as often as I used to :( ...

Might I inquire what exact source code is your latest youtube-dl.exe offering (linked in your forum signature) built on? The binary's version states May 21st:

youtube-dl -v => 

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2023.05.21
[debug] Lazy loading extractors enabled
[debug] Python 3.4.4 (CPython 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 1.0.2d 9 Jul 2015, -)
[debug] exe versions: none
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

... whereas yt-dl's master repo is currently at commit d1c6c5c from May 11th :dubbio:... Many thanks for any insight :) ...

It was indeed compiled from d1c6c5c, but on May 21 (manually edited 'version.py').

Today, I just uploaded version 2023.05.23, built from a19855f, to avoid any further confusion. :lol:

(with an extra fix for Redtube (NSFW) included (PR #29318)) ;)

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ignore-config']
[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2023.05.23 (single file build)
[debug] Lazy loading extractors enabled
[debug] Python 3.4.4 (CPython x86 32bit) - Windows-XP-5.1.2600-SP3 - OpenSSL 1.0.2d 9 Jul 2015
[debug] exe versions: ffmpeg N-110472-g4006c71-Reino, ffprobe N-110472-g4006c71-Reino
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
 
PS
You don't have FFmpeg installed?
[debug] exe versions: none

 

Edited by nicolaasjan
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...