YouTube recently changed its website (around January 4, 2026) so that programs that worked in the past for downloading YouTube videos, such as StreamFab, no longer work. My wife and I like to archive YouTube videos we find that have useful information we might wish to refer to again in the future, since we've sometimes found that when we try to view them again on YouTube that a channel where they were posted has disappeared along with all its videos. We have a YouTube premium subscription, which allows one to download videos, but they are stored in a blob file where they are not accessible to programs we use to view videos and there is no guarantee they will remain accessible even in YouTube's limited offline viewing method when a channel disappears. So we were very perturbed that YouTube has now made it very difficult to archive videos. StreamFab has been working very well for my wife and is easy to use, but I needed to look for an alternative for her. A couple of sites that still work that allow one to download YouTube videos are listed below, but downloading through those websites is slower and she found that for fairly large videos the downloads would fail.
https://ytdown.to/en2/
https://v6.www-y2mate.com/
Since I had WinPython, a free and open-source version of the Python programming language installed on a Windows laptop and she is using a Windows 11 system at the moment, though she wants to switch to Linux, I decided to try the yt-dlp Python program that allows one to download YouTube videos from a command-line interface (CLI).
Since WinPython was already installed, I installed yt-dlp with the
pip package
manager command pip install yt-dlp.
C:\Users\moonp\Documents\Programming\WinPython>pip install yt-dlp Requirement already satisfied: yt-dlp in c:\users\moonp\documents\programming\winpython\python-3.12.4.amd64\lib\site-packages (2023.7.6) Requirement already satisfied: mutagen in c:\users\moonp\documents\programming\winpython\python-3.12.4.amd64\lib\site-packages (from yt-dlp) (1.47.0) Requirement already satisfied: pycryptodomex in c:\users\moonp\documents\programming\winpython\python-3.12.4.amd64\lib\site-packages (from yt-dlp) (3.20.0) Requirement already satisfied: websockets in c:\users\moonp\documents\programming\winpython\python-3.12.4.amd64\lib\site-packages (from yt-dlp) (12.0) Requirement already satisfied: certifi in c:\users\moonp\documents\programming\winpython\python-3.12.4.amd64\lib\site-packages (from yt-dlp) (2024.6.2) Requirement already satisfied: brotli in c:\users\moonp\documents\programming\winpython\python-3.12.4.amd64\lib\site-packages (from yt-dlp) (1.1.0) [notice] A new release of pip is available: 24.0 -> 26.0.1 [notice] To update, run: python.exe -m pip install --upgrade pip C:\Users\moonp\Documents\Programming\WinPython>
When I tried to download a YouTube video, I saw the following:
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp "https://www.youtube.com/watch?v=p6hUWw8oj1A" [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading ios player API JSON WARNING: [youtube] YouTube said: ERROR - Precondition check failed. WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (1/3)... [youtube] p6hUWw8oj1A: Downloading ios player API JSON WARNING: [youtube] YouTube said: ERROR - Precondition check failed. <text snipped> ERROR: unable to download video data: HTTP Error 403: Forbidden C:\Users\moonp\Documents\Programming\WinPython>
I realized I needed to have yt-dlp use the
HTTP cookies that my
browser had for the YouTube website, so I used the
--cookies-from-browser option, specifying
Firefox as the
browser. But I still was unable to download the video from
YouTube.
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp --cookies-from-browser firefox "https://www.youtube.com/watch?v=p6hUWw8oj1A" [Cookies] Extracting cookies from firefox [Cookies] Extracted 3130 cookies from firefox [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading ios player API JSON WARNING: [youtube] YouTube said: ERROR - Precondition check failed. WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (1/3)... <text snipped> ERROR: unable to download video data: HTTP Error 403: Forbidden C:\Users\moonp\Documents\Programming\WinPython>
I next updated yt-dlp with pip install -U --pre yt-dlp
— I needed to use pip as I installed yt-dlp with the
pip package
manager — to see if an update to the program would help.
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp -U
Available version: stable@2026.02.04, Current version: stable@2023.07.06
ERROR: You installed yt-dlp with pip or using the wheel from PyPi; Use that to update
C:\Users\moonp\Documents\Programming\WinPython>pip install -U --pre yt-dlp
Requirement already satisfied: yt-dlp in .\python-3.12.4.amd64\Lib\site-packages (2023.7.6)
Collecting yt-dlp
Downloading yt_dlp-2026.2.4.233607.dev0-py3-none-any.whl.metadata (182 kB)
Downloading yt_dlp-2026.2.4.233607.dev0-py3-none-any.whl (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 1.5 MB/s 0:00:02
Installing collected packages: yt-dlp
Attempting uninstall: yt-dlp
Found existing installation: yt-dlp 2023.7.6
Uninstalling yt-dlp-2023.7.6:
Successfully uninstalled yt-dlp-2023.7.6
Successfully installed yt-dlp-2026.2.4.233607.dev0
C:\Users\moonp\Documents\Programming\WinPython>But I still had a problem when I attempted to download the video.
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp --cookies-from-browser firefox "https://www.youtube.com/watch?v=p6hUWw8oj1A" Extracting cookies from firefox Extracted 3134 cookies from firefox [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading tv downgraded player API JSON [youtube] p6hUWw8oj1A: Downloading web safari player API JSON WARNING: [youtube] p6hUWw8oj1A: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS WARNING: Only images are available for download. use --list-formats to see them ERROR: [youtube] p6hUWw8oj1A: Requested format is not available. Use --list-formats for a list of available formats C:\Users\moonp\Documents\Programming\WinPython>yt-dlp --cookies-from-browser firefox --list-formats "https://www.youtube.com/watch?v=p6hUWw8oj1A" Extracting cookies from firefox Extracted 3134 cookies from firefox [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading tv downgraded player API JSON [youtube] p6hUWw8oj1A: Downloading web safari player API JSON WARNING: [youtube] p6hUWw8oj1A: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS WARNING: Only images are available for download. use --list-formats to see them [info] Available formats for p6hUWw8oj1A: ID EXT RESOLUTION FPS │ PROTO │ VCODEC MORE INFO ──────────────────────────────────────────────────── sb3 mhtml 48x27 0 │ mhtml │ images storyboard sb2 mhtml 80x45 0 │ mhtml │ images storyboard sb1 mhtml 160x90 0 │ mhtml │ images storyboard sb0 mhtml 320x180 0 │ mhtml │ images storyboard C:\Users\moonp\Documents\Programming\WinPython>
At https://github.com/yt-dlp/yt-dlp/wiki/EJS, I found the following information:
To download from YouTube, yt-dlp needs to solve JavaScript challenges presented by YouTube using an external JavaScript runtime.
This involves running challenge solver scripts maintained at yt-dlp-ejs. Depending on your yt-dlp installation method, you may need to set up and enable these components manually.
...
denoTip
Recommended
So I installed deno using pip.
C:\Users\moonp\Documents\Programming\WinPython>pip install deno Collecting deno Downloading deno-2.6.8-py3-none-win_amd64.whl.metadata (5.5 kB) Downloading deno-2.6.8-py3-none-win_amd64.whl (46.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.1/46.1 MB 2.6 MB/s 0:00:17 Installing collected packages: deno Successfully installed deno-2.6.8 C:\Users\moonp\Documents\Programming\WinPython>
I then saw the following warnings and error message.
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp --cookies-from-browser firefox "https://www.youtube.com/watch?v=p6hUWw8oj1A" Extracting cookies from firefox Extracted 3131 cookies from firefox [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading tv downgraded player API JSON [youtube] p6hUWw8oj1A: Downloading web safari player API JSON [youtube] p6hUWw8oj1A: Downloading player 4e51e895-tv [youtube] [jsc:deno] Solving JS challenges using deno WARNING: [youtube] [jsc] Remote components challenge solver script (deno) and NPM package (deno) were skipped. These may be required to solve JS challenges. You can enable these downloads with --remote-components ejs:github (recommended) or --remote-components ejs:npm , respectively. For more information and alternatives, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS WARNING: [youtube] p6hUWw8oj1A: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS WARNING: Only images are available for download. use --list-formats to see them ERROR: [youtube] p6hUWw8oj1A: Requested format is not available. Use --list-formats for a list of available formats C:\Users\moonp\Documents\Programming\WinPython>
So I then tried adding --remote-components ejs:github.
The program downloaded an MP4 file for the video, but I still received
a warning and when I tried to view the file with several video players,
it opened, but I wasn't able to play it.
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp --cookies-from-browser firefox --remote-components ejs:github "https://www.youtube.com/watch?v=p6hUWw8oj1A" Extracting cookies from firefox Extracted 3131 cookies from firefox [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading tv downgraded player API JSON [youtube] p6hUWw8oj1A: Downloading web safari player API JSON [youtube] p6hUWw8oj1A: Downloading player 4e51e895-tv [youtube] [jsc:deno] Solving JS challenges using deno [youtube] [jsc:deno] Downloading challenge solver lib script from https://github.com/yt-dlp/ejs/releases/download/0.4.0/yt.solver.lib.min.js [youtube] p6hUWw8oj1A: Downloading m3u8 information WARNING: ffmpeg not found. The downloaded format may not be the best available. Installing ffmpeg is strongly recommended: https://github.com/yt-dlp/yt-dlp#dependencies [info] p6hUWw8oj1A: Downloading 1 format(s): 96 [download] Sleeping 4.00 seconds as required by the site... [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 45 [download] Destination: Carry Me Home – The Saddest Irish Rebel Song You'll Ever Hear [p6hUWw8oj1A].mp4 [download] 100% of 11.16MiB in 00:00:14 at 773.24KiB/s WARNING: p6hUWw8oj1A: Possible MPEG-TS in MP4 container or malformed AAC timestamps. Install ffmpeg to fix this automatically C:\Users\moonp\Documents\Programming\WinPython>
So I then installed FFmpeg with pip.
C:\Users\moonp\Documents\Programming\WinPython>pip install ffmpeg Collecting ffmpeg Downloading ffmpeg-1.4.tar.gz (5.1 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: ffmpeg Building wheel for ffmpeg (pyproject.toml) ... done Created wheel for ffmpeg: filename=ffmpeg-1.4-py3-none-any.whl size=6138 sha256=497f213ebd031f08245e7b81c8f1045c45e2dfa148823178e18f5e4c3c708415 Stored in directory: c:\users\moonp\appdata\local\pip\cache\wheels\26\21\0c\c26e09dff860a9071683e279445262346e008a9a1d2142c4ad successfully built ffmpeg Installing collected packages: ffmpeg Successfully installed ffmpeg-1.4 C:\Users\moonp\Documents\Programming\WinPython>
I then tried again, but I received the same warning: "WARNING: p6hUWw8oj1A: Possible MPEG-TS in MP4 container or malformed AAC timestamps. Install ffmpeg to fix this automatically." At the yt-dlp project on github, I found the following helpful information at PIP install FFmpeg usage #5521":
ffmpeg is a misleading package, that only provides an API wrapper.
There is also static-ffmpeg which installs the binaries into your Python environment.But you still have to setup the paths, so yt-dlp will find it.
So I installed static-ffmpeg.
C:\Users\moonp\Documents\Programming\WinPython>pip install static-ffmpeg Collecting static-ffmpeg Downloading static_ffmpeg-3.0-py3-none-any.whl.metadata (6.8 kB) Requirement already satisfied: requests in .\python-3.12.4.amd64\Lib\site-packages (from static-ffmpeg) (2.31.0) Requirement already satisfied: filelock in .\python-3.12.4.amd64\Lib\site-packages (from static-ffmpeg) (3.14.0) Collecting progress (from static-ffmpeg) Downloading progress-1.6.1-py3-none-any.whl.metadata (4.3 kB) Requirement already satisfied: twine>=3.8.0 in .\python-3.12.4.amd64\Lib\site-packages (from static-ffmpeg) (4.0.1) Requirement already satisfied: pkginfo>=1.8.1 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (1.9.6) Requirement already satisfied: readme-renderer>=35.0 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (35.0) Requirement already satisfied: requests-toolbelt!=0.9.0,>=0.8.0 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (1.0.0) Requirement already satisfied: urllib3>=1.26.0 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (2.0.3) Requirement already satisfied: importlib-metadata>=3.6 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (7.1.0) Requirement already satisfied: keyring>=15.1 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (25.2.1) Requirement already satisfied: rfc3986>=1.4.0 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (2.0.0) Requirement already satisfied: rich>=12.0.0 in .\python-3.12.4.amd64\Lib\site-packages (from twine>=3.8.0->static-ffmpeg) (13.7.1) Requirement already satisfied: zipp>=0.5 in .\python-3.12.4.amd64\Lib\site-packages (from importlib-metadata>=3.6->twine>=3.8.0->static-ffmpeg) (3.17.0) Requirement already satisfied: jaraco.classes in .\python-3.12.4.amd64\Lib\site-packages (from keyring>=15.1->twine>=3.8.0->static-ffmpeg) (3.4.0) Requirement already satisfied: jaraco.functools in .\python-3.12.4.amd64\Lib\site-packages (from keyring>=15.1->twine>=3.8.0->static-ffmpeg) (4.0.1) Requirement already satisfied: jaraco.context in .\python-3.12.4.amd64\Lib\site-packages (from keyring>=15.1->twine>=3.8.0->static-ffmpeg) (5.3.0) Requirement already satisfied: pywin32-ctypes>=0.2.0 in .\python-3.12.4.amd64\Lib\site-packages (from keyring>=15.1->twine>=3.8.0->static-ffmpeg) (0.2.2) Requirement already satisfied: bleach>=2.1.0 in .\python-3.12.4.amd64\Lib\site-packages (from readme-renderer>=35.0->twine>=3.8.0->static-ffmpeg) (6.1.0) Requirement already satisfied: docutils>=0.13.1 in .\python-3.12.4.amd64\Lib\site-packages (from readme-renderer>=35.0->twine>=3.8.0->static-ffmpeg) (0.20.1) Requirement already satisfied: Pygments>=2.5.1 in .\python-3.12.4.amd64\Lib\site-packages (from readme-renderer>=35.0->twine>=3.8.0->static-ffmpeg) (2.18.0) Requirement already satisfied: six>=1.9.0 in .\python-3.12.4.amd64\Lib\site-packages (from bleach>=2.1.0->readme-renderer>=35.0->twine>=3.8.0->static-ffmpeg) (1.16.0) Requirement already satisfied: webencodings in .\python-3.12.4.amd64\Lib\site-packages (from bleach>=2.1.0->readme-renderer>=35.0->twine>=3.8.0->static-ffmpeg) (0.5.1) Requirement already satisfied: charset-normalizer<4,>=2 in .\python-3.12.4.amd64\Lib\site-packages (from requests->static-ffmpeg) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in .\python-3.12.4.amd64\Lib\site-packages (from requests->static-ffmpeg) (3.7) Requirement already satisfied: certifi>=2017.4.17 in .\python-3.12.4.amd64\Lib\site-packages (from requests->static-ffmpeg) (2024.6.2) Requirement already satisfied: markdown-it-py>=2.2.0 in .\python-3.12.4.amd64\Lib\site-packages (from rich>=12.0.0->twine>=3.8.0->static-ffmpeg) (2.2.0) Requirement already satisfied: mdurl~=0.1 in .\python-3.12.4.amd64\Lib\site-packages (from markdown-it-py>=2.2.0->rich>=12.0.0->twine>=3.8.0->static-ffmpeg) (0.1.2) Requirement already satisfied: more-itertools in .\python-3.12.4.amd64\Lib\site-packages (from jaraco.classes->keyring>=15.1->twine>=3.8.0->static-ffmpeg) (10.2.0) Downloading static_ffmpeg-3.0-py3-none-any.whl (7.9 kB) Downloading progress-1.6.1-py3-none-any.whl (9.8 kB) Installing collected packages: progress, static-ffmpeg Successfully installed progress-1.6.1 static-ffmpeg-3.0 C:\Users\moonp\Documents\Programming\WinPython>
I then ran static_ffmpeg_paths.exe.
C:\Users\moonp\Documents\Programming\WinPython>static_ffmpeg_paths.exe Downloading https://github.com/zackees/ffmpeg_bins/raw/main/v8.0/win32.zip -> C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32.zip ffmpeg: |################################| 100.0% - 0s Download of https://github.com/zackees/ffmpeg_bins/raw/main/v8.0/win32.zip -> C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32.zip completed. Extracting C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32.zip -> C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin FFMPEG=C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32\ffmpeg.exe FFPROBE=C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32\ffprobe.exe C:\Users\moonp\Documents\Programming\WinPython>
But I still received the same "possible MPEG-TS in MP4 container or
malformed AAC timestamps. Install ffmpeg to fix this automatically" warning
when I downloaded the video with yt-dlp. However, when I ran
static_ffmpeg_paths again, I saw the FFMPEG path listed.
C:\Users\moonp\Documents\Programming\WinPython>static_ffmpeg_paths FFMPEG=C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32\ffmpeg.exe FFPROBE=C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32\ffprobe.exe C:\Users\moonp\Documents\Programming\WinPython>
When I then specified the location of the ffmpeg.exe file on the yt-dlp command line, the program created a WebM file (WebM is an audiovisual media file format) that I was able to successfully view. I did not receive any warning messages this time.
C:\Users\moonp\Documents\Programming\WinPython>yt-dlp --cookies-from-browser firefox --remote-components ejs:github --ffmpeg-location "C:\Users\moonp\Documents\Programming\WinPython\python-3.12.4.amd64\Lib\site-packages\static_ffmpeg\bin\win32\ffmpeg.exe" "https://www.youtube.com/watch?v=p6hUWw8oj1A" Extracting cookies from firefox Extracted 3134 cookies from firefox [youtube] Extracting URL: https://www.youtube.com/watch?v=p6hUWw8oj1A [youtube] p6hUWw8oj1A: Downloading webpage [youtube] p6hUWw8oj1A: Downloading tv downgraded player API JSON [youtube] p6hUWw8oj1A: Downloading web safari player API JSON [youtube] p6hUWw8oj1A: Downloading player 4e51e895-tv [youtube] [jsc:deno] Solving JS challenges using deno [youtube] p6hUWw8oj1A: Downloading m3u8 information [info] p6hUWw8oj1A: Downloading 1 format(s): 399+251 [download] Destination: Carry Me Home – The Saddest Irish Rebel Song You'll Ever Hear [p6hUWw8oj1A].f399.mp4 [download] 100% of 7.09MiB in 00:00:03 at 2.35MiB/s [download] Destination: Carry Me Home – The Saddest Irish Rebel Song You'll Ever Hear [p6hUWw8oj1A].f251.webm [download] 100% of 5.09MiB in 00:00:02 at 2.19MiB/s [Merger] Merging formats into "Carry Me Home – The Saddest Irish Rebel Song You'll Ever Hear [p6hUWw8oj1A].webm" Deleting original file Carry Me Home – The Saddest Irish Rebel Song You'll Ever Hear [p6hUWw8oj1A].f251.webm (pass -k to keep) Deleting original file Carry Me Home – The Saddest Irish Rebel Song You'll Ever Hear [p6hUWw8oj1A].f399.mp4 (pass -k to keep) C:\Users\moonp\Documents\Programming\WinPython>