Open R-S1978 opened 6 months ago
This is a side-effect of #9554. VR180 formats are only available via the Android client(s). It's not possible for yt-dlp to get Android client formats anymore.
It's possible that the VR formats may be served to another client in the future, such as the upcoming client for VisionOS.
This is a side-effect of #9554. VR180 formats are only available via the Android client(s). It's not possible for yt-dlp to get Android client formats anymore.
It's possible that the VR formats may be served to another client in the future, such as the upcoming client for VisionOS.
Thanks for this information. But why can the official youtube app on meta quest get the 8k format? Is it using some other protocol?
Meta's VR gear uses the Android client
(this is not a real fix but I hope this may help in some use cases)
If you pass --extractor-args "youtube:player_client=android"
to yt-dlp, it will extract the VR formats, but the format download links will expire after ~30 seconds and then start to return HTTP Error 403.
i.e. you can successfully download the video in one attempt if download finishes within 30 seconds.
If it cannot finish within 30 seconds, you simply run yt-dlp again to resume download until the whole video is downloaded.
For example, the video mentioned in this post:
>python -m yt_dlp "https://www.youtube.com/watch?v=W51jdIrSsgk" --extractor-args "youtube:player_client=android" -f 571+140 [youtube] Extracting URL: https://www.youtube.com/watch?v=W51jdIrSsgk [youtube] W51jdIrSsgk: Downloading webpage [youtube] W51jdIrSsgk: Downloading android player API JSON [info] W51jdIrSsgk: Downloading 1 format(s): 571+140 [download] Destination: NIS FORTRESS Archaeological site and modern Jazz Museum SERBIA 8K 4K VR180 3D Travel [W51jdIrSsgk].f571.mp4 [download] 64.0% of 532.55MiB at 13.26MiB/s ETA 00:14ERROR: unable to download video data: HTTP Error 403: Forbidden >python -m yt_dlp "https://www.youtube.com/watch?v=W51jdIrSsgk" --extractor-args "youtube:player_client=android" -f 571+140 [youtube] Extracting URL: https://www.youtube.com/watch?v=W51jdIrSsgk [youtube] W51jdIrSsgk: Downloading webpage [youtube] W51jdIrSsgk: Downloading android player API JSON [info] W51jdIrSsgk: Downloading 1 format(s): 571+140 [download] Resuming download at byte 357378580 [download] Destination: NIS FORTRESS Archaeological site and modern Jazz Museum SERBIA 8K 4K VR180 3D Travel [W51jdIrSsgk].f571.mp4 [download] 100% of 532.55MiB in 00:00:17 at 31.31MiB/s [download] Destination: NIS FORTRESS Archaeological site and modern Jazz Museum SERBIA 8K 4K VR180 3D Travel [W51jdIrSsgk].f140.m4a [download] 100% of 2.54MiB in 00:00:00 at 9.66MiB/s [Merger] Merging formats into "NIS FORTRESS Archaeological site and modern Jazz Museum SERBIA 8K 4K VR180 3D Travel [W51jdIrSsgk].mp4" Deleting original file NIS FORTRESS Archaeological site and modern Jazz Museum SERBIA 8K 4K VR180 3D Travel [W51jdIrSsgk].f140.m4a (pass -k to keep) Deleting original file NIS FORTRESS Archaeological site and modern Jazz Museum SERBIA 8K 4K VR180 3D Travel [W51jdIrSsgk].f571.mp4 (pass -k to keep)
You can automate it with a script, e.g. a simple example for Windows:
@echo off set arg=%1 for %%i in (%*) do call :concat %%i set argc=%arg:"=% set resume=0 python -m yt_dlp %arg% :resume if %ERRORLEVEL%==0 (goto :eof) else ( if %resume%==5 (goto :eof) else ( if "%argc:--extractor-args youtube:player_client=%" neq "%argc:"=%" if "%argc:android=%" neq "%argc:"=%" ( python -m yt_dlp %arg% set /a "resume=%resume%+1" ) else goto :eof ) ) goto :resume :concat set arg=%arg% %1 goto :eof
use it as follow:
C:\yt-dlp>ex.bat "https://www.youtube.com/watch?v=W51jdIrSsgk" --extractor-args "youtube:player_client=android" -f 571+140
This script will stop downloading if it resumes more than 5 times. Change the number if needed.
@coletdjnz What do you think about removing the params from code and returning android formats with lower priority
when requested with player-client=android
?
What do you think about removing the params from code and returning
android
formats with lower priority when requested withplayer-client=android
?
Now implemented in https://github.com/yt-dlp/yt-dlp/pull/9553
yt-dlp with default settings only shows 2k quality as best: yt-dlp -F "https://www.youtube.com/watch?v=c_jOI6Wboc4" ... 308 webm 2560x1438 60 │ 342.56MiB 10388k https │ vp9 10388k video only 1440p60, webm_dash
with specified user agent from firefox, its the same: yt-dlp --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0' -F "https://www.youtube.com/watch?v=c_jOI6Wboc4" 308 webm 2560x1438 60 │ 342.56MiB 10388k https │ vp9 10388k video only 1440p60, webm_dash
with user agent and cookies from browser, it shows 4k option: yt-dlp --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0' --cookies-from-browser firefox:path_to_profile -F "https://www.youtube.com/watch?v=c_jOI6Wboc4" ... 315 webm 3840x2160 60 │ 682.67MiB 20703k https │ vp9 20703k video only 2160s60, mesh, webm_dash
specifying both: client as android and cookies from browser shows 8k quality option: yt-dlp --extractor-args "youtube:player_client=android" --cookies-from-browser firefox:path_to_profile -F "https://www.youtube.com/watch?v=c_jOI6Wboc4" 571 mp4 7680x3840 60 │ 795.66MiB 24129k https │ av01.0.17M.08 24129k video only 4320s60, mesh, BROKEN, mp4_dash
this video is age restricted, which makes it require login cookie to show 8k quality: https://www.youtube.com/watch?v=c_jOI6Wboc4
with this video, only specifying client is enough to show 8k quality option: yt-dlp --extractor-args "youtube:player_client=android" -F "https://www.youtube.com/watch?v=Ypu5k5GYGjE"
Interesting, thank you! 👍
Now it would be great when yt-dlp would be able to resume the download when the error message "HTTP Error 403: Forbidden" occurs. I think that would fix the problem? 😀
the player_client=android
option worked for me, thanks @kclauhk !
i didnt even need to retry after 30s. i am using the --cookies-from-browser chrome
which might've helped keep the connection alive.
i didnt even need to retry after 30s. i am using the
--cookies-from-browser chrome
which might've helped keep the connection alive.
DO NOT PASS YOUR COOKIES unless it is really necessary... or you may register a new account for the use of yt-dlp
See https://github.com/yt-dlp/yt-dlp/issues/10128#issuecomment-2155037169
Thank you @kclauhk , this solution works for many videos.
I am having a problem with a video like this, though: https://www.youtube.com/watch?v=HI7mTIxNotQ
The option I get for downloading is -f 313
but that outputs a wonky format: https://i.imgur.com/tQhbIwU.png
All other formats look equivalent, just lower quality. Is there a trick to getting those to post-process into a proper SBS video?
@rook218 That's a top/bottom 3D 360 video, not SBS 180. It looks like that because YouTube used to use the equi-angular cubemap (EAC) format for 360 videos (maybe still does for some) instead of the standard equirectangular format. https://github.com/ytdl-org/youtube-dl/issues/15267
There are some VR video players that support the EAC format (like Skybox), but if you want the equirectangular version you can download it by adding --user-agent ""
.
Example: yt-dlp --user-agent "" "https://www.youtube.com/watch?v=HI7mTIxNotQ" -f 313+338
@rook218 That's a top/bottom 3D 360 video, not SBS 180. It looks like that because YouTube used to use the equi-angular cubemap (EAC) format for 360 videos (maybe still does for some) instead of the standard equirectangular format. ytdl-org/youtube-dl#15267
There are some VR video players that support the EAC format (like Skybox), but if you want the equirectangular version you can download it by adding
--user-agent ""
.Example: yt-dlp --user-agent "" "https://www.youtube.com/watch?v=HI7mTIxNotQ" -f 313+338
Many thanks for the command. but the video downloaded is not stereoscopic but mono. how to download these cube format 360 videos in a 3d format recognized by default players (for e.g deovr, quest tv etc.)
Many thanks for the command. but the video downloaded is not stereoscopic but mono. how to download these cube format 360 videos in a 3d format recognized by default players (for e.g deovr, quest tv etc.)
Which video are you trying to download? The video I used in the example downloads in top/bottom format for me using that command.
Which video are you trying to download? The video I used in the example downloads in top/bottom format for me using that command.
https://www.youtube.com/watch?v=ZgYSKbaM5fg or any 360 video i tried so far. yt-dlp downloads it in weird cube map format which no player recognizes. I just want it in sbs or top-bottom format
Which video are you trying to download? The video I used in the example downloads in top/bottom format for me using that command.
https://www.youtube.com/watch?v=ZgYSKbaM5fg or any 360 video i tried so far. yt-dlp downloads it in weird cube map format which no player recognizes. I just want it in sbs or top-bottom format
That video is 2D 360, so there's no stereoscopic format available. I downloaded the 8K equirectangular (not cubemap) version of it using this command: yt-dlp --user-agent "" "https://www.youtube.com/watch?v=ZgYSKbaM5fg" -f 571+140
As of version 2024.08.01 you can try --extractor-arg "youtube:player_client=android_vr"
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
germany
Provide a description that is worded well enough to be understood
New 8k VR180 SBS videos on YouTube are not longer downloadable, because the 8k format is not seen in the API JSON by yt-dlp as available format. This is since some weeks. The 8k format (2x4k SBS) is working for this video with YouTube App on Meta Quest 3, so it must be definitly there. But yt-dlp sees only the 4k (2x2k SBS) format. The 8k format is hidden somewhere.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output