Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VR180 format support? #16647

Open
5 of 9 tasks
FlamelightX opened this issue Jun 5, 2018 · 27 comments
Open
5 of 9 tasks

VR180 format support? #16647

FlamelightX opened this issue Jun 5, 2018 · 27 comments

Comments

@FlamelightX
Copy link

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.06.04. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.06.04

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Right now youtube has implemented a new VR180 video format, when downloading, you only get a flat cropped version of the video, unless you watch from certain apps like Youtube VR, then you can choose to watch in 180 3D format. Can youtube-dl find these hidden links?

examples:
https://www.youtube.com/watch?v=9r6NI9m_IxM
https://www.youtube.com/watch?v=TH_MMXinRsA

@Cyroxchan
Copy link

Cyroxchan commented Jun 7, 2018

I was just about to post about this issue myself. YouTube in Chrome is showing these VR180 videos as having a max resolution of (from my experience) anywhere between 480p up to 1080p60, only viewable in the flat cropped format in the browser. However, when these same videos are viewed using a YouTube VR app (such as on PS4 in PSVR or Steam), the full VR version is viewable, at much higher resolutions.

For proof, I've taken a photo of the "Stats for Nerds" for a VR180 video being played in PSVR on PS4 Pro below (excuse the quality, as I had to take a picture of my TV screen with a phone). Note the 3840x2160@60 resolution and vp9 (315) video codec stream.

mhhabpa10qm

The video above is found here: https://www.youtube.com/watch?v=mhHABPA10qM -- video ID matches that shown in the image posted above -- mhHABPA10qM -- but is only viewable flat at up to 1080p60 in Chrome.

Youtube-dl (updated to 2018.06.04) only shows available streams for the video up to 1080p60. Stream #315 (3840x2160@60) is not listed, although it definitely exists (along with other hidden streams).

yt-dl

Downloading, e.g. stream #303 above gives only the 1080p flat cropped video as shown in YouTube for Chrome.

@guygodin
Copy link

Hey, just noticed this issue today as well. Have you had any luck figuring out how to download the full stereo version? Thanks!

@FlamelightX
Copy link
Author

https://vr.google.com/vr180/
the video that contained in this page has listed all the video feed in the quality selection. But if you click into the youtube page the vr180 ones are all screened out. So Im wondering if that specific page could be utilized as some agent to download vr180 feed.

@Cyroxchan
Copy link

@guygodin I haven't found a method yet, no. I update youtube-dl every week or so, but nothing as of yet (2018.08.04 latest update).

@FlamelightX You're right! The embedded video on that website does show all the stereoscopic quality stream choices, up to 2880s! I wonder what needs to be passed in the code to show those available streams...

@remitamine
Copy link
Collaborator

remitamine commented Aug 17, 2018

this patch will make it possible to get those formats.

diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 117a57911..6f95407ea 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1584,6 +1584,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                         'eurl': '',
                         'gl': 'US',
                         'hl': 'en',
+                        'c': 'WEB_EMBEDDED_PLAYER',
                     }
                     if el:
                         query['el'] = el
@@ -1600,8 +1601,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                     add_dash_mpd(get_video_info)
                     if view_count is None:
                         view_count = extract_view_count(get_video_info)
-                    if not video_info:
-                        video_info = get_video_info
+                    video_info = get_video_info
                     if 'token' in get_video_info:
                         # Different get_video_info requests may report different results, e.g.
                         # some may report video unavailability, but some may serve it without

@Cyroxchan
Copy link

I just updated to patch 2018.08.22. I don't see any changes to the available video list of a VR180 video compared to prior to the patch. Is there an argument I need to pass on the command line to find the VR180 format streams?

@remitamine
Copy link
Collaborator

I would've closed the issue if it's already fixed, I didn't commit the patch upstream as I don't think it's a proper solution to be integrated, the formats extracted from the webpage and the ones from the embed page should be combined not overridden, I did post the patch here in case that someone wants to use it or create a proper fix based on it.

@tiantian20007
Copy link

this patch will make it possible to get those formats.

diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 117a57911..6f95407ea 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1584,6 +1584,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                         'eurl': '',
                         'gl': 'US',
                         'hl': 'en',
+                        'c': 'WEB_EMBEDDED_PLAYER',
                     }
                     if el:
                         query['el'] = el
@@ -1600,8 +1601,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                     add_dash_mpd(get_video_info)
                     if view_count is None:
                         view_count = extract_view_count(get_video_info)
-                    if not video_info:
-                        video_info = get_video_info
+                    video_info = get_video_info
                     if 'token' in get_video_info:
                         # Different get_video_info requests may report different results, e.g.
                         # some may report video unavailability, but some may serve it without

It seems this patch will break some URL such as:
https://www.youtube.com/watch?v=dcKGN_lTdyM

It returns:
ERROR: Video unavailable

@gahbes
Copy link

gahbes commented Dec 6, 2018

I just applied the patch and ran main.py but it made no difference. Is there something else I need to do or is this incomplete? Anything else I can try? Thanks!

@gahbes
Copy link

gahbes commented Dec 6, 2018

https://www.clipconverter.cc works without problems

@avagraha
Copy link

My little test:

A-
youtube-dl --user-agent "" https://www.youtube.com/watch?v=lcJLZfPiyfc -f 272+171
you go as expected:
2D + Spherical Equirectangular, 8k, 2:1;
4320p, not 4320s

B-
without "useragent" escamotage:
4320s, not 4320p;
NOT 360, the same happens with MediaHuman: not 360.
Ok, as you told above in this 3d.

More interesting because results seem opposite to what you verified in this
3d:

A-
youtube-dl https://www.youtube.com/watch?v=mhHABPA10qM (stream 272):

WITHOUT(!!!) "useragent":
2880s60 i.e. stereo_mode: left_right + stereo3d: side by side
[the wonderful PotPlayer, in this case only, requires that you set
manually Equirectangular; leaving the defaults (Auto) does not work: an
exception in my tests].

B-
WITH(!!!) "useragent":
pure 1080p60, flat cropped only.

Summary: sometimes "useragent" addition is compulsory; sometimes you have to
avoid it.
I dont know the ratio. Since >>ffprobe URL<< or >>ffprobe -i URL<< does not
work here (surely my command is wrong), I firstly verify via youtube-dl " -F
" report (1080p vs. 2880s is enough understable); but if the output is not
clear enough (at least for me: ex gr. the same resolution, with/without the
difference s/p...) I simply download using BOTH modes, then I delete the
wrong one.

@gahbes
Copy link

gahbes commented Apr 28, 2019

Nothing works for VR180 anymore since YouTube made changes to the player. You only get the cropped mono (2D) version using any downloader.

@FlamelightX
Copy link
Author

Nothing works for VR180 anymore since YouTube made changes to the player. You only get the cropped mono (2D) version using any downloader.

Yeah traveling back home sadly found this is the case. But for more than half a year using youtube-dl download vr180 have been no problem, and it seems now 360 videos have not been affected. Any more information?

@bsback
Copy link

bsback commented Oct 2, 2019

any updates on this?

@binarize
Copy link

Seems most VR3D 180 videos download as mono now, even older ones.

@Aitolda
Copy link

Aitolda commented May 8, 2020

Seems most VR3D 180 videos download as mono now, even older ones.

Greetings! I've been doing a lot of digging and I'm experiencing this too. The latest 360 and 180 youtube videos downloading as monophonic video. I'm wondering if there might be a slight redirect to an altered URL happening, but I'm not sure how to find this out. I know that if I load the same video in the official VR player on the Oculus Quest, it will stream in stereo, however any version of youtube-dll I've tried only downloads the video as mono.

This Video for example.

@Arcitec
Copy link

Arcitec commented Feb 6, 2021

As mentioned in this ticket: #15267

YouTube VR videos are encoded in a proprietary format.

They have rotated the eye views, stretched them to give more details to the front 180 degrees rather than the rest of the 360 video, etc.

But yeah I would still love if youtube-dl could find a way to at least download the files, even if they are an unplayable/useless format right now. :-P

@princeadam001
Copy link

As mentioned in this ticket: #15267

YouTube VR videos are encoded in a proprietary format.

They have rotated the eye views, stretched them to give more details to the front 180 degrees rather than the rest of the 360 video, etc.

But yeah I would still love if youtube-dl could find a way to at least download the files, even if they are an unplayable/useless format right now. :-P

The problem you're talking about is for 360 videos, not 180, and it's already solved. You can use --user-agent "" to get the normal equirectangular version instead of equi-angular cubemap, and there are some other downloaders like ClipGrab that automatically download the equirectangular version. Also, some video players like SkyBox can display the EAC format correctly.

The VR180 problem has nothing to do with the format. It's the same stereo side-by-side format that it always was, but downloaders only download a mono version (just the left half / left eye), which is the version that's displayed in browsers.

I've noticed that some VR180 videos like this one are displayed as SBS in the mobile browser version of YouTube though, and can be downloaded as SBS with some browser extensions (like Ant Video downloader and Video DownloadHelper for Firefox).
Some browsers (like Edge) show the mono version even in mobile mode though, but Chrome and Firefox work currently. You can switch to the mobile version on PC with this link: https://m.youtube.com/?persist_app=1&app=m, and back to desktop with this link: https://www.youtube.com/?persist_app=1&app=desktop.

@Arcitec
Copy link

Arcitec commented Feb 7, 2021

@princeadam001 Oh, hmm, thank you very much for teaching me about the user agent trick to get the normal version of VR360 videos! I really appreciate it! Thanks also for explaining the state of VR180 videos.

@ecke101
Copy link

ecke101 commented Feb 26, 2021

The Youtube VR app is removed from Steam.. It seems they don't care about this right now. Let's hope that in the future Youtube fixes this Maybe they are waiting for a standard format to be developed or something like that. Right now it's kind of a jungle.

@Aitolda
Copy link

Aitolda commented Feb 26, 2021

The Youtube VR app is removed from Steam.. It seems they don't care about this right now. Let's hope that in the future Youtube fixes this Maybe they are waiting for a standard format to be developed or something like that. Right now it's kind of a jungle.

Can't say I've ever tried the steam version, Just the Oculus Quest version. Unfortunately it doesn't allow for vertical rotation of the video, so if you want to lay down and watch stereoscopic 180 YouTube vids.

@Arcitec
Copy link

Arcitec commented Mar 10, 2021

Oculus Quest version. Unfortunately it doesn't allow for vertical rotation of the video, so if you want to lay down and watch stereoscopic 180 YouTube vids.

Try using the controller grip buttons. This moves the centerpoint of the YouTube VR viewport. I have never tried placing it above me. But I constantly use it to rotate and move up/down the view in 180/360 YouTube videos.

@Aitolda
Copy link

Aitolda commented Mar 10, 2021

Oculus Quest version. Unfortunately it doesn't allow for vertical rotation of the video, so if you want to lay down and watch stereoscopic 180 YouTube vids.

Try using the controller grip buttons. This moves the centerpoint of the YouTube VR viewport. I have never tried placing it above me. But I constantly use it to rotate and move up/down the view in 180/360 YouTube videos.

Youtube VR's lack of vertical movement on 180/360 videos is what brought me here in the first place. Regular flat panic videos can be moved anywhere, but 180/360 you can only rotate left and right.

@Onurtag
Copy link

Onurtag commented Jun 6, 2021

I was able to find an open source media player that supports youtube's 180 and 360 videos.
You can find sView here: https://github.com/gkv311/sview (also at sview.ru)

I have downloaded one video of each format using youtube-dl with the default settings to confirm that the application works.
To watch youtube's 360 EAC videos; use the following option: View -> Panorama -> Equiangular cubemap
To watch youtube's 180 videos; use the following option: View -> Panorama -> Hemisphere
Also check the View -> Stereo output setting if the video does not look right.

(I have no connection with the developers. I am just here to share a possible solution.)

@ecke101
Copy link

ecke101 commented Jun 19, 2021

I was able to find an open source media player that supports youtube's 180 and 360 videos.
You can find sView here: https://github.com/gkv311/sview (also at sview.ru)

I have downloaded one video of each format using youtube-dl with the default settings to confirm that the application works.
To watch youtube's 360 EAC videos; use the following option: View -> Panorama -> Equiangular cubemap
To watch youtube's 180 videos; use the following option: View -> Panorama -> Hemisphere
Also check the View -> Stereo output setting if the video does not look right.

(I have no connection with the developers. I am just here to share a possible solution.)

I haven't tried it, but i doubt that it works. It's not a player problem. The thing is the downloaded video with youtube-dl is not stereo.

@Aitolda
Copy link

Aitolda commented Jun 19, 2021

I haven't tried it, but i doubt that it works. It's not a player problem. The thing is the downloaded video with youtube-dl is not stereo.

You are correct, the problem is not finding a player, it's downloading the sbs 180 video from youtube.

@github-userx
Copy link

My understanding is that the popular youtube-dl fork „yt-dlp“ has solved this issue already:

yt-dlp/yt-dlp#69

(Solution is to tell yt-dlp to use the Android client. See the linked issue above for further info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests