Jump to content

YouTube under Windows XP - Downloaders, players and browser support


AstroSkipper

Recommended Posts

YouTube under Windows XP - Downloaders, players and browser support

This thread is meant to collect and provide all necessary information about YouTube using in Windows XP. As far as I can see, most information here in MSFN spread over various threads, in many cases rather unstructured and not easy to find. I would like to put an end to that. :)
For months, I have been intensively studying YouTube and its still existing functionality in terms of Windows XP. And I can already say that YouTube is still fully functional under Windows XP. But first, thanks to two members of MSFN who are partly responsible for this, @nicolaasjan and @Reino. What did they do for us? @nicolaasjan provides XP-compatible forks of the most recent youtube-dl and yt-dlp releases which are recommended replacements for the old, depreciated ones or the new ones which are no longer working under Windows XP. On the other hand, @Reino provides XP-compatible (and SSE-compatible!) forks of the well-known tool ffmpeg whose more recent versions actually do not work anymore under Windows XP for years. With these programs, yt-dlp and ffmpeg, it is possible to stream or download YouTube videos, convert them, include subtitles (or lyrics) and so on, all in Windows XP. This is no longer possible with the old, official XP-compatible versions of youtube-dl and yt-dlp, and the new releases of ffmpeg. Last but not least, @cmalex deserves recognition and credit for compiling flavours of CPython 3.8.x/3.9.x and much other things that made the development of new releases such as yt-dlp possible at all. Thanks all for your contributions! :thumbup More about all that in later posts. Feel free to post here software recommendations, tips, experiences, opinions and so on regarding the topic of this thread! In any case, all about YouTube under Windows XP can be considered on-topic here in this thread. :yes:

Greetings from Germany, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites


1 hour ago, AstroSkipper said:

This is no longer possible with the old, official XP-compatible versions of youtube-dl

This is just a technicality, but youtube-dl NEVER "officially" dropped Windows XP SP3 support; the python script itself, to this day, remains compatible even with such an old CPython version as py2.6 and py3.2 (!), though, for best results under XP, CPython 2.7.18 (EoS for that OS) and CPython 3.4.10 (EoS for that OS) should be used... The provided, standalone, Windows executable youtube-dl.exe, has been historically compiled with the py2exe Python module and comes bundled with CPython 3.4.4 32-bit (WinXP SP3, SSE+ compatible).

In the case of yt-dl, "official" is open for interpretation, because the team of devs behind

https://github.com/ytdl-org/youtube-dl

and the last "stable" release

https://github.com/ytdl-org/youtube-dl/releases/tag/2021.12.17

retired (read: abandoned :( the project) a few years ago, but that same repo is under new management currently (ownership transfer) by, sadly, only ONE maintainer, @dirkf, who vowed to keep support for older python versions (and, by association, older WinOSes like XP/Vista :thumbup).

The new maintainer doesn't believe in a "stable" releases scheme and has instead opted to adopt a "nightly" releases scheme, to be found under:

https://github.com/ytdl-org/ytdl-nightly/tags

The binaries there are compiled from source code of the original repo, thus I do still consider these releases as "official", i.e. they're NOT FORKS ;) ...

In closing, if you'd allow me to be somewhat pedantic :P, the XP-compatible builds of yt-dlp.exe most kindly released by nicolaasjan to this community wouldn't be a thing if it weren't for cmalex, who compiled himself flavours of CPython 3.8.x/3.9.x that will launch under XP - so, IMHO, he, too, deserves some credit! :worship: ...

Link to comment
Share on other sites

4 minutes ago, VistaLover said:

In closing, if you'd allow me to be somewhat pedantic :P, the XP-compatible builds of yt-dlp.exe most kindly released by nicolaasjan to this community wouldn't be a thing if it weren't for cmalex, who compiled himself flavours of CPython 3.8.x/3.9.x that will launch under XP - so, IMHO, he, too, deserves some credit! :worship: ...

You are absolutely right. In any case, @cmalex deserves recognition and credit for compiling flavours of CPython 3.8.x/3.9.x and much other things. :thumbup :yes:

Link to comment
Share on other sites

will be great to have "play in VLC" option in browser context menu as I've seen some time ago; https://delightlylinux.wordpress.com/2016/04/28/how-to-play-youtube-videos-in-vlc/

sorry if the solution provided here in msfn it's newer / better or more compatible... 

based on youtube.lua

https://github.com/videolan/vlc/blob/master/share/lua/playlist/youtube.lua

vlc-context-menu.png

https://addons.mozilla.org/es/firefox/addon/open-in-vlc/

 

just seen you mentioned something alike, @AstroSkipper

and here is a compilation of frontend alternatives:

https://github.com/mendel5/alternative-front-ends?tab=readme-ov-file#youtube

Edited by sonyu
Link to comment
Share on other sites

Not exactly the best solution, but when I wanna download something from YouTube I use JDownloader2 which is running using Java and it's cross platform. It's still updated regularly and it still runs on the latest XP supported version of Java just fine. This is not an accident, but rather a nice coincidence given that JDownloader2 is cross platform and therefore supports all OS capable of running Java, including a wide variety of Linux distro which are running a very old version of Java, which is why it still works perfectly fine on XP at every update. As for the FFMpeg libraries it uses, I'm of course using Reino's fork that he regularly publishes on Doom9 and that have been already mentioned in this thread.

As for things I wanna watch on my PC without downloading them, with M108 (the chromium fork), all videos work, including VP9 ones and AV1 ones as they're royalty free codecs whose decoders are included/embedded in chromium however they all run via software decoding due to the nature of the XP compatible versions of chromium. Nonetheless, for anything up to 1920x1080 60p software decoding on a quad core is fine. I don't of course expect it to be playing 4K or 8K footages via software decoding on a puny 4 cores CPU, but realistically most of us probably have a FULL HD 60Hz display anyway, so we're gonna be more than fine for the time being. :) 

Edited by FranceBB
Link to comment
Share on other sites

With my ±20 year old pc (AMD Athlon XP 3200+ and ATI Radeon HD 3850 (AGP)) watching Youtube videos in-browser is next to impossible, because of the 100% cpu-utilization. It's just too slow. The videocard however does support hardware video-decoding of H.264 up to 1080p.

To watch and/or download Youtube videos I always use (my own) simple Youtube-extractor + the latest still working MPC-HC on WinXP to watch, or - of course - my own WinXP compatible FFmpeg builds to download.

My Youtube-extractor is part of an XQuery function module, Xivid, for the command-line tool Xidel (an XML/HTML/JSON parser). It's a simple extractor, in the sense that it doesn't support age-gated-videos. You'd still need youtube-dl / yt-dlp for that. But for "normal" videos, the vast majority I come across, it works absolutely fine and because it doesn't depend on Python it's multitudes faster (on my old system). The extractor uses the Android API call, which means there's no bandwidth-throttling or a need to decrypt signatures.

Extracting

  • Xidel 0.9.9.8787 or newer. For WinXP download the "openssl.win32"-variant! Besides 'xidel.exe', don't forget to extract 'cacert.pem' as well.
    Alternatively you could download one from my host, which are much smaller because I removed the "debug symbols".
  • OpenSSL 3.2.0 dll-files to be able to open and process virtually any https-url nowadays. Put them in the same map as 'xidel.exe', in 'C:\Windows\system32', or somewhere in %PATH%.
  • 'xivid.xqm'. My XQuery function module with the xivid:youtube() function declaration.

Watching

From 'MPC-HC.1.7.11.24.x86.7z' extract everything except the "LAVFilters"-map.
From 'LAVFiltersXP-0.70.2-beta2-x86.zip' extract - at least - the manifest-file, all dll-files and ax-files to 'MPC-HC.1.7.11.24.x86\LAVFilters'.
From 'standalone_filters-mpc-be.1.4.6.x86.7z' extract 'MPCVideoDec.ax' anywhere you want basically.

Then finally in MPC-HC: Options --> External Filters --> Add Filter... --> Browse... --> select 'MPCVideoDec.ax' --> tick the "Prefer"-box.
This way you can watch most* https progressive-, DASH- and HLS-videostreams with your gpu doing the video-decoding.

Downloading

My FFmpeg builds obviously. Nothing more to say. :rolleyes: Discussion on Doom9 Forum.

Command-lines

The most basic Xidel-call for a Youtube-video would be...

xidel.exe -s --module=xivid.xqm -e "xivid:youtube('https://www.youtube.com/watch?v=dQw4w9WgXcQ')"
xidel.exe -s --module=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')"

...which returns a JSON with all the different audio- and video formats.

The following command I use all the time to watch the 720p (itag 22) progressive video:

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/(formats)()[starts-with(id,'pg')][last()]/url"
') DO @"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe" "%A" /close

When this video doesn't work/play (rare case), I select the DASH variants. Itag 136 (H.264 720p) and itag 140 (AAC) in this case:

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/formats/`\"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe\" {.()[format='mp4[h264]' and substring-before(resolution,'x') le 1280][last()]/url} /dub {.()[format='mp4[aac]'][last()]/url} /close`"
') DO @%A

The Youtube video- and/or audio-urls don't necessarily need to be quoted, but if you want to do it absolutely right (including the regrettably necessary escape-characters):

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/formats/`\"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe\" \"{.^(^)[format^='mp4[h264]' and substring-before^(resolution^,'x'^) le 1280][last^(^)]/url}\" /dub \"{.^(^)[format^='mp4[aac]'][last^(^)]/url}\" /close`"
') DO @%A

Then while you're at it, you might as well make the command a bit more readable by prettifying the query:

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "
    xivid:youtube^('dQw4w9WgXcQ'^)/formats/`
      \"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe\"
      \"{.()[format='mp4[h264]' and substring-before(resolution,'x') le 1280][last()]/url}\"
      /dub \"{.()[format='mp4[aac]'][last()]/url}\"
      /close
    `
  "
') DO @%A

And because of the crazy escape-character-rules of cmd/Batch, nothing between the ( \ )-escaped double-quotes (\"...\") needs to be ( ^ )-escaped.

While the for-loop for the itag 22 video, with only 1 video-url, just feeds the video-url to MPC-HC, the for-loop for the itag 136+140 executes the string generated by Xidel. With more than 1 generated url this is a much better approach than messing with temporary variables and such.

For downloading it's as easy as:

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/(formats)()[starts-with(id,'pg')][last()]/url"
') DO @ffmpeg.exe -hide_banner -i "%A" -c copy "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"

Or with separate audio- and video-urls:

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/formats/`ffmpeg.exe -hide_banner -i \"{.^(^)[format^='mp4[h264]' and substring-before^(resolution^,'x'^) le 1280][last^(^)]/url}\" -i \"{.^(^)[format^='mp4[aac]'][last^(^)]/url}\" -c copy \"Rick Astley - Never Gonna Give You Up ^(Official Music Video^).mp4\"`"
') DO @%A

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "
    xivid:youtube^('dQw4w9WgXcQ'^)/formats/`
      ffmpeg.exe -hide_banner
      -i \"{.()[format='mp4[h264]' and substring-before(resolution,'x') le 1280][last()]/url}\"
      -i \"{.()[format='mp4[aac]'][last()]/url}\"
      -c copy \"Rick Astley - Never Gonna Give You Up (Official Music Video).mp4\"
    `
  "
') DO @%A

* LAVFiltersXP 0.70.2 is already pretty old which means that certain videostreams aren't (properly) supported. Youtube livestreams for instance, but also videos from Twitter. Luckily with FFmpeg there's a workaround for that:

FOR /F "delims=" %A IN ('
  xidel -s --module^=xivid.xqm -e "xivid:youtube('###########')/(formats)()[last()]/url"
') DO @ffmpeg.exe -hide_banner -i "%A" -c copy -f nut - | "C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe" - /close
Edited by Reino
Forgot the *, the FFmpeg workaround
Link to comment
Share on other sites

24 minutes ago, Reino said:

the latest still working MPC-HC on WinXP to watch

Why not use this new version instead? It's much better than the last working XP version!

Link to comment
Share on other sites

Thanks. I didn't know about this one. Sadly I can't use either the MPC-HC, or the LAVFilters release, because here it crashes instantly. Guess it's for SSE2 cpus and newer.

Link to comment
Share on other sites

Recently, about a month ago, YouTube incrased the CPU usage on their pages. It is no longer possible to watch without stutterring on a Conroe CPU. To watch the videos, I only need YouTube-DL from this forum and Media Player Classic. I do not need FFmpeg.

Direct watching with new MPC-HC is unrealiable. Seeking is slow. And my computer has a strange problem where the network is lost if certain video applications are active. It almost always happens when trying MPC-HC. Most videos are small enough that they can be downloaded to disk in reasonable time and then watched comfortably, with fast seeking over sponsorships.

Link to comment
Share on other sites

Quote

With my ±20 year old pc (AMD Athlon XP 3200+ and ATI Radeon HD 3850 (AGP)) watching Youtube videos in-browser is next to impossible, because of the 100% cpu-utilization. It's just too slow. The videocard however does support hardware video-decoding of H.264 up to 1080p.

WMP 10 supports DXVA 1.
You can run YouTube videos in Fox browsers in Windows Media Player Firefox Plugin 1.0.0.8 (video above), with NVCUVID hardware decoding.
I was unable to run DXVA 1 decoding on the GF7050 and Radeon HD2400 in WMP, but it is possible.

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...