Jump to content

Who here has a Youtube-DL compile for WinXP?


Recommended Posts

Posted
2 hours ago, j7n said:

Maybe someone could make a ffmpeg build with the most heavy parts cut out.

That's what I sometimes do on my Linux system, using this guide (even omitting a few codecs).

Resulting binary is only ~30MB.

I have no idea how to do that on Windows. :no:

There exists a very convoluted cross-compiling process for Linux, that involves downloading and compiling the compiler itself (see here). :o

Also, that project hasn't seen much activity lately, so it may fail (see the issues there)...

But maybe @autodidact can give us some useful instructions for building a minimalist FFmpeg for Windows?


Posted (edited)

Yeaaaa! This works - ffmpeg.exe only 17.2 MB :cheerleader:

youtube-dl -f 136+140  https://www.youtube.com/watch?v=e2_YNNtdke8
[youtube] e2_YNNtdke8: Downloading webpage
[youtube] e2_YNNtdke8: Downloading ANDROID_VR API JSON
[dashsegments] Total fragments: 1
[download] Destination: Reverse Parking with Cones _Reverse Park Step by Step-e2_YNNtdke8.f136.mp4
[download] 100% of 985.69KiB in 00:02
[dashsegments] Total fragments: 1
[download] Destination: Reverse Parking with Cones _Reverse Park Step by Step-e2_YNNtdke8.m4a.f140.m4a
[download] 100% of 1.52MiB in 00:08
[ffmpeg] Merging formats into "Reverse Parking with Cones _Reverse Park Step by Step-e2_YNNtdke8.mp4"
Deleting original file Reverse Parking with Cones _Reverse Park Step by Step-e2_YNNtdke8.f136.mp4 (pass -k to keep)
Deleting original file Reverse Parking with Cones _Reverse Park Step by Step-e2_YNNtdke8.m4a.f140.m4a (pass -k to keep)

Configure like this:

./configure \
  --enable-cross-compile \
  --arch=x86_64 \
  --target-os=win32 \
  --cross-prefix=x86_64-w64-mingw32- \
  --enable-gpl \
  --enable-version3 \
  --enable-pthreads \
  --disable-w32threads \
  --disable-d3d11va \
  --disable-dxva2 \
  --disable-avx \
  --disable-avx2 \
  --extra-cflags="-D_WIN32_WINNT=0x0502 -O2" \
  --extra-ldflags="-static" \
  --disable-ffplay \
  --disable-doc \
  --enable-protocol=file,http,https,tcp,crypto
Edited by reboot12
Posted

I was going to post new builds today but maybe we need to discuss a more targeted configuration.

If we can define the core requirements I would be happy to make minimal builds.  I see @reboot12 even removes ffplay

which further removes an SDL2 dependency.  These things do add up in size.

Posted
3 minutes ago, autodidact said:

I see @reboot12 even removes ffplay

Yea, for play on Windows I use VLC - ffmpeg only for combine audio+video downloaded by youtube-dl :rolleyes:

Posted (edited)

This is minimal ffmpeg.exe x64 for WinXP 64-bit - only native functions without external libraries:

ffmpeg
ffmpeg version 3.4.1 by Gelip 2026
  built with gcc 5.3.1 (GCC) 20160211
  configuration: --enable-cross-compile --arch=x86_64 --target-os=win32 --cross-prefix=x86_64-w64-mingw32- --enable-gpl
--enable-version3 --enable-pthreads --disable-w32threads --disable-d3d11va --disable-dxva2 --disable-avx --disable-avx2
--extra-cflags='-D_WIN32_WINNT=0x0502 -O2' --extra-ldflags=-static --disable-ffplay --disable-doc --enable-protocol='file,http,https,tcp,crypto'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

https://www.mediafire.com/file/9h32t0ac8cc17ds/ffmpeg.exe/file - only 17.2 MB

Edited by reboot12
Posted

What is the difference between XP and Vista? The XP build runs on Server 2008 R2, so we can just use that.

There is no need for playback in ffmpeg. It is a converter. The player part used to be MPlayer. Why does ffplay bloat the size of ffmpeg.exe, which is separate? What codecs are removed by not including external libraries?

Posted
On 5/1/2026 at 6:30 AM, reboot12 said:

What are you using the newer version of ffmpeg for e.g.

  I'd like to build an application with XP compatibility, but it bundles ffmpeg. I originally tried downgrading the ffmpeg source, but I hit a bit of a brick wall when compiling and I couldn't figure out how to fix. I think I might have found a working w32pthreads.h patch though.

2 hours ago, reboot12 said:

@j7n @nicolaasjan

I'm just compiling minimalist ffmpeg.exe 64-bit for WinXP :cool:

In a few minutes I will have the .exe binary built and I will test it.

  For yt-dlp, ffprobe.exe is also required I think. I have both ffmpeg.exe and ffprobe.exe in my yt-dlp directory.

Posted
9 minutes ago, j7n said:

There is no need for playback in ffmpeg. It is a converter. The player part used to be MPlayer. Why does ffplay bloat the size of ffmpeg.exe, which is separate? What codecs are removed by not including external libraries?

tbf ffmpeg is an all in one library, some programs may only use ffplay. So it might be a good idea to have a normal build for those applications.

Posted
24 minutes ago, K4sum1 said:

For yt-dlp, ffprobe.exe is also required I think. I have both ffmpeg.exe and ffprobe.exe in my yt-dlp directory.

For combine YT m4a and mp4 work OK:

yt-dlp -f 136+140 https://www.youtube.com/watch?v=x1anlc6GhE4
[youtube] Extracting URL: https://www.youtube.com/watch?v=x1anlc6GhE4
[youtube] x1anlc6GhE4: Downloading webpage
WARNING: [youtube] No supported JavaScript runtime could be found. Only deno is enabled by default; to use another runtime add  --js-runtimes RUNTIME[:PATH]  to your command/config. YouTube extraction without a JS runtime has been deprecated, and some formats may be missing. See  https://github.com/yt-dlp/yt-dlp/wiki/EJS for details on installing one
[youtube] x1anlc6GhE4: Downloading android vr player API JSON
[info] x1anlc6GhE4: Downloading 1 format(s): 136+140
[download] Destination: Sultans of Swing  - Bia Villa-Chan (Dire Straits cover) [x1anlc6GhE4].f136.mp4
[download] 100% of    5.15MiB in 00:00:25 at 209.25KiB/s
[download] Destination: Sultans of Swing  - Bia Villa-Chan (Dire Straits cover) [x1anlc6GhE4].f140.m4a
[download] 100% of  955.00KiB in 00:00:05 at 185.21KiB/s
[Merger] Merging formats into "Sultans of Swing  - Bia Villa-Chan (Dire Straits cover) [x1anlc6GhE4].mp4"
Deleting original file Sultans of Swing  - Bia Villa-Chan (Dire Straits cover) [x1anlc6GhE4].f136.mp4 (pass -k to keep)
Deleting original file Sultans of Swing  - Bia Villa-Chan (Dire Straits cover) [x1anlc6GhE4].f140.m4a (pass -k to keep)

24 minutes ago, K4sum1 said:

ffmpeg is an all in one library, some programs may only use ffplay

This topis is about youtube-dl - tool for download video on WinXP, not for play. For playing you will use e.g. VLC

Posted
11 minutes ago, reboot12 said:

For combine YT m4a and mp4 work OK:

I did some tests, ffprobe appears to be required for some sort of postprocessing pass done when making a mkv. I get an error about it using this command. I like to grab 720p quality with highest quality audio (opus) with metadata for archival. (I would like to improve it so it asks for width <=1280 and height <=1280 so all videos are in 720p and shorts aren't grabbed in 360p, but it works well enough.)

youtube-dlp.exe -t sleep --js-runtimes quickjs -f "(bestvideo[height<=720]+bestaudio/best[height<=720])[vcodec!*=av01]" -o "%%(channel)s [%%(channel_id)s]/%%(upload_date)s - %%(title)s - (%%(duration)ss) [%%(id)s].%%(ext)s" --merge-output mkv --write-info-json --write-description --write-thumbnail --add-metadata --write-sub --all-subs --embed-subs --mtime --retries infinite "https://www.youtube.com/watch?v=7VN6OyGcaL4"
11 minutes ago, reboot12 said:

This topis is about youtube-dl - tool for download video on WinXP, not for play. For playing you will use e.g. VLC

Fair, but have you never wanted to drag a video onto ffplay.exe and watch it play the video without having anything installed? I think it could be useful. I'm not saying it's required to be built, but also maybe keep a full release build if you do build it.

Posted (edited)
20 minutes ago, K4sum1 said:

Fair, but have you never wanted to drag a video onto ffplay.exe and watch it play the video without having anything installed?

No, never. I have always double-click .mp4 and is opened in VLC to watch everything and I don't need anything else. I no need scripts for download - simply check numbers video+audio - I prefer 720p e.g 136+140 so simply download: youtube-dl -f 136+140 link

Edited by reboot12
Posted
On 5/1/2026 at 2:30 PM, reboot12 said:

I have been using the old version of ffmpeg.exe 3.4.1 (2017) for a long time with current versions of youtube-dl, e.g. to download and combine separate audio and video files:

youtube-dl -f 136+140 link

and this work OK.
What are you using the newer version of ffmpeg for

Even when one uses ffmpeg ONLY for mux/remux-ing purposes, there are cases where that very old version won't be up for the task; for just "h264+aac" placed inside the MP4 container, you can be fine (and even use older major FFmpeg versions, if you so wish); but, e.g., the MP4 container has, in recent years, been "enhanced", even without strictly sticking to specs, so that now it's possible to put vp9/hevc (aka h265) /av1 video streams inside the MP4 container; old ffmpeg versions will error out in such scenarios; and these may come up, especially when used with yt-dlp, on a multitude of supported services...

Besides [re]muxing, ffmpeg remains the defacto downloader in yt-dlp when LIVE HLS (.m3u8) streams are being recorded, because the native yt-dlp downloader doesn't support live streams; for reasons not known to me, many such streams are served over HTTPS (some even use TLS v1.3), so ffmpeg has to be compiled with a recent version of a crypto library (OpenSSL, GnuTLS, etc.) - old versions often, and from my testing in the past, may fail to establish secure connections to the stream server...

Also, over the years, streaming protocols like MPEG-DASH and HLS have evolved; e.g. while HLS initially had only MPEG-TS fragments, now it's possible to have fragmented MP4 (fMP4) served over HLS; old FFmpeg builds DON'T support these newer streaming implementations...

If I was to be asked, I'd gladly grab an updated FFmpeg build (compatible with my OS of usage) than just stick to old code...

1 hour ago, reboot12 said:

This topis is about youtube-dl - tool for download video on WinXP, not for play.

This may have indeed been the case initially, but things have evolved over time :P; and even the person who started this thread is now running the server variant of Win7; so, don't "pull" that "WinXP" card; perhaps it's time the admins moved this thread to a more appropriate place encompassing the rest of the "legacy" OSes, but as things stand now: 

1. This thread is no longer exclusive to youtube-dl (which currently shows little, if any, development), as it now includes yt-dlp, too (with frequent, active, development)

2. As a result, this thread is also monitored by members on Vista/Win7, which official yt-dlp no longer supports...

3. The FFmpeg builds discussed/posted here-in may be used by Vista and/or Win7 users, and since this thread has now become (quasi) the only source of updated FFmpeg builds in MSFN, users may and can use those builds outside of a youtube-dl/yt-dlp context...

I'm sorry if you don't like my opinion (and I have no intention to offend), but in (the number of) your recent posts you seem to present things as viewed ONLY from your own side, like "your way" is the only correct one for doing things - I'm happy it works for you as you wish, but other options/opinions do exist...

Posted
2 hours ago, K4sum1 said:

For yt-dlp, ffprobe.exe is also required I think. I have both ffmpeg.exe and ffprobe.exe in my yt-dlp directory.

Yep, that's totally true; ffprobe is often used by the yt-dlp code to "probe" :P elemental (raw) media streams, often before ffmpeg itself is invoked; both are needed; in fact, when posting issues in their tracker, the yt-dlp devs demand ffprobe logs (though I myself send them MediaInfo logs, instead) ; to save disk space, I use "shared" FFmpeg builds...

3 hours ago, K4sum1 said:

some programs may only use ffplay

2 hours ago, K4sum1 said:

have you never wanted to drag a video onto ffplay.exe and watch it play the video without having anything installed? I think it could be useful.

... YES, that's what I often do:

BNs2tlT.png

But it's a shame that audio-only media files can't be played back with FFplay under Vista SP2 (and higher) via drag-n-drop, due to a SDL2 bug

QQNXVJ4.png

There was a related, long-standing, SDL2 bug that one can read about in below links,

https://forum.videohelp.com/threads/388189-ffplay-WASAPI-can-t-initialize-audio-client-error#post2513211

https://trac.ffmpeg.org/ticket/6891

https://stackoverflow.com/questions/46835811/ffplay-wasapi-cant-initialize-audio-client-ffmpeg-3-4-binaries

but while this has apparently been fixed for media files containing both video+audio, the bug has now returned under a similar guise for audio-only media files; the original mitigation, to set the env var "SDL_AUDIODRIVER=directsound" still works; FWIW, this bug is NOT present under WinXP, because that OS does NOT have WASAPI; and is NOT present on FFplay builds compiled with SDL2 <= 2.0.5 (quite old by now) ...

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
×
×
  • Create New...