yt-dlp: [YouTube] "HTTP Error 403: Forbidden" for `ios` m3u8 formats
EDIT:
Update yt-dlp!
yt-dlp -U
Checklist
- I’m reporting that yt-dlp is broken on a supported site
- I’ve verified that I have updated yt-dlp to nightly or master (update instructions)
- I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched known issues, the FAQ, and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
Texas, United States
Provide a description that is worded well enough to be understood
yt-dlp attempts to download Premium formats no matter what, even if cookies aren’t passed. This results in 403 Forbidden being spammed to the console for every fragment. Other videos which don’t have this work fine and downloading the same video without using a Premium format (by using -f) will work fine. For the sake of not making the verbose output insanely long, I’ve set the retry count to 1.
Provide verbose output that clearly demonstrates the problem
- Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>) - If using API, add
'verbose': TruetoYoutubeDLparams instead - Copy the WHOLE output (starting with
[debug] Command-line config) and insert it below
Complete Verbose Output
[debug] Command-line config: ['-vU', '--fragment-retries', '1', 'xnudvJbAgI0']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2025.06.12.233004 from yt-dlp/yt-dlp-nightly-builds [1722c5540] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.26100-SP0 (OpenSSL 1.1.1t 7 Feb 2023)
[debug] exe versions: ffmpeg 2025-06-02-git-688f3944ce-full_build-www.gyan.dev (setts), ffprobe 2025-06-02-git-688f3944ce-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.1.0, certifi-2025.04.26, curl_cffi-0.10.0, mutagen-1.47.0, requests-2.32.4, sqlite3-3.40.1, urllib3-2.4.0, websockets-15.0.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Plugin directories: none
[debug] Loaded 1859 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2025.06.12.233004 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2025.06.12.233004 from yt-dlp/yt-dlp-nightly-builds)
[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: xnudvJbAgI0
[youtube] xnudvJbAgI0: Downloading webpage
[youtube] xnudvJbAgI0: Downloading tv client config
[debug] Loading youtube-sts.9fe2e06e-main from cache
[youtube] xnudvJbAgI0: Downloading tv player API JSON
[youtube] xnudvJbAgI0: Downloading ios player API JSON
[debug] Loading youtube-nsig.9fe2e06e-main from cache
[debug] [youtube] Decrypted nsig 2YYsLp9v88iEH097g => bsr_qIEaSrDoTQ
[debug] [youtube] Decrypted nsig hN88iTHSIN_5XiwUg => 7oPUB6DFMkUjxg
[debug] [youtube] xnudvJbAgI0: ios client https formats require a GVS PO Token which was not provided. They will be skipped as they may yield HTTP Error 403. You can manually pass a GVS PO Token for this client with --extractor-args "youtube:po_token=ios.gvs+XXX". For more information, refer to https://github.com/yt-dlp/yt-dlp/wiki/PO-Token-Guide . To enable these broken formats anyway, pass --extractor-args "youtube:formats=missing_pot"
[youtube] xnudvJbAgI0: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xnudvJbAgI0: Downloading 1 format(s): 616+251
[debug] Invoking hlsnative downloader on "https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1750475206/ei/Zs1VaMcc3u3b-A_RioXIAg/ip/98.97.84.78/id/c67b9dbc96c0808d/itag/616/source/youtube/requiressl/yes/ratebypass/yes/pfa/1/wft/1/sgovp/clen%3D342656212%3Bdur%3D976.600%3Bgir%3Dyes%3Bitag%3D356%3Blmt%3D1708733715387213/rqh/1/hls_chunk_host/rr1---sn-q4flrn7k.googlevideo.com/xpc/EgVo2aDSNQ%3D%3D/met/1750453606,/mh/RG/mm/31,26/mn/sn-q4flrn7k,sn-a5mekndz/ms/au,onr/mv/m/mvi/1/pl/21/rms/au,au/initcwndbps/2872500/bui/AY1jyLMW3wQ3BFQfznczFHJRG5JESlR13Lu_Q8p4NF-TFIXzW-LgQxBpno_HUee8WGH8nnYxvgEqYXcR/spc/l3OVKWAjQYwHtArIjtj5wAwnethBcCwvkjTnekioV-Xk30wpi-2cBOy3FVM2FA/vprv/1/playlist_type/DVR/dover/13/txp/4532434/mt/1750453285/fvip/2/short_key/1/keepalive/yes/fexp/51466643,51466697/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,pfa,wft,sgovp,rqh,xpc,bui,spc,vprv,playlist_type/sig/AJfQdSswRQIgGj25-NZF-ea9PZGFmQ2aITLHH6W8bgk_tMGksYXQk94CIQDvPgIBr4rDhi5pTmE-8JFndKZ-tZ8A0kzqJKzNMOavEg%3D%3D/lsparams/hls_chunk_host,met,mh,mm,mn,ms,mv,mvi,pl,rms,initcwndbps/lsig/APaTxxMwRgIhAOLXrFDIas-RD6bJyRbe38dynWflQ2iphKy3l2X1D3F4AiEA0WlqZsvRe5tEOuj5BUiqSNhHpQu1sSrhXNQnEDfMWKI%3D/playlist/index.m3u8"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 180
[download] Destination: Windows1 (1985) PC XT Hercules [xnudvJbAgI0].f616.mp4
[debug] File locking is not supported. Proceeding without locking
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 1 (1/1)...
[download] fragment not found; Skipping fragment 1 ...
...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 181 (1/1)...
[download] fragment not found; Skipping fragment 181 ...
ERROR: The downloaded file is empty
File "yt_dlp\__main__.py", line 17, in <module>
File "yt_dlp\__init__.py", line 1100, in main
File "yt_dlp\__init__.py", line 1091, in _real_main
File "yt_dlp\YoutubeDL.py", line 3643, in download
File "yt_dlp\YoutubeDL.py", line 3616, in wrapper
File "yt_dlp\YoutubeDL.py", line 1651, in extract_info
File "yt_dlp\YoutubeDL.py", line 1662, in wrapper
File "yt_dlp\YoutubeDL.py", line 1818, in __extract_info
File "yt_dlp\YoutubeDL.py", line 1877, in process_ie_result
File "yt_dlp\YoutubeDL.py", line 3049, in process_video_result
File "yt_dlp\YoutubeDL.py", line 185, in wrapper
File "yt_dlp\YoutubeDL.py", line 3499, in process_info
File "yt_dlp\YoutubeDL.py", line 3237, in dl
File "yt_dlp\downloader\common.py", line 468, in download
File "yt_dlp\downloader\hls.py", line 402, in real_download
File "yt_dlp\downloader\fragment.py", line 526, in download_and_append_fragments
File "yt_dlp\downloader\fragment.py", line 300, in _finish_frag_download
File "yt_dlp\YoutubeDL.py", line 1120, in report_error
File "yt_dlp\YoutubeDL.py", line 1048, in trouble
[debug] Invoking http downloader on "https://rr1---sn-q4flrn7k.googlevideo.com/videoplayback?expire=1750475205&ei=Zc1VaKGFNKyw2_gP98e7kQw&ip=98.97.84.78&id=o-AEANQMqOqCr1L1PIOo8rdz8KBe9H_Xgr-CJJrbiEjGyr&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1750453605%2C&mh=RG&mm=31%2C26&mn=sn-q4flrn7k%2Csn-a5mekndz&ms=au%2Conr&mv=m&mvi=1&pl=21&rms=au%2Cau&initcwndbps=3057500&bui=AY1jyLMrPXYXMDP5_LR4-8tYC6arQPpZk1IWMmUQe85_ysCNa07k6X7v4ZI8qyU2l6DzQIC66TKRVwuv&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=-O7ie9Ubpb93epbNua0hPPIQ&rqh=1&gir=yes&clen=17275278&dur=976.681&lmt=1708730998455172&mt=1750453037&fvip=2&keepalive=yes&lmw=1&fexp=51466643%2C51466697&c=TVHTML5&sefc=1&txp=4532434&n=7oPUB6DFMkUjxg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIgZoT4gVFmPE-3bDbTKNaWT6OaXR5kpi8ak6QPkEGeWxUCIQDTBAdQ0BrtX1M3qdz1E68amSbvFBXAMT9gUQof5N89wA%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=APaTxxMwRgIhAMn2WvUvwY43Ox2PLnoAeVvesXvHs7noSQJfS4anj4ArAiEAs65APMj_KMT9uJVHKxV54jpAF2G3_GXVFt49idhwtC0%3D"
[download] Destination: Windows1 (1985) PC XT Hercules [xnudvJbAgI0].f251.webm
[download] 100% of 16.47MiB in 00:00:03 at 4.67MiB/s
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 25 (10 by maintainers)
Commits related to this issue
- [ie/youtube] Check any `ios` m3u8 formats prior to download (#13524) Closes #13511 Authored by: bashonly — committed to THIS-IS-NOT-A-BACKUP/yt-dlp by bashonly a year ago
Yep, it seems that youtube is rolling something out that causes the
iosHLS segment requests to yield 403 errors.This means that the
iosclient is no longer viable at all, and that the “enhanced bitrate” 1080p video format616will soon no longer be available via yt-dlp. (Though its http equivalent format356should still be available if you actually have Youtube Premium and pass your logged-in cookies to yt-dlp).The workaround for users is to add this to your yt-dlp command/config:
Or else you can use
--check-formatsif you want to still try to get the IOS formats when they aren’t broken.The developer solution is to remove
iosas a default client (EDIT: eventually. First, we will force--check-formatsfor all IOS HLS formats. Then remove once they don’t work at all anymore.)@dirkf It does not. It also doesn’t affect any non-
iosclient’s HLS formats (thoughweb_safariHLS formats were giving 403s for a different reason, which had a different solution: ff6f94041aeee19c5559e1c1cd693960a1c1dd14).Here’s the log. It’s so long I had to paste it in as an attachment otherwise GitHub would refuse to post the comment.
yt-dlp.log