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
FlamelightX opened this issue Jun 5, 2018 · 16 comments
Open

VR180 format support? #16647

FlamelightX opened this issue Jun 5, 2018 · 16 comments

Comments

@FlamelightX
Copy link

@FlamelightX FlamelightX commented Jun 5, 2018

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

@guygodin guygodin commented Aug 12, 2018

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

@FlamelightX FlamelightX commented Aug 13, 2018

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

@Cyroxchan Cyroxchan commented Aug 17, 2018

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

@Cyroxchan Cyroxchan commented Aug 21, 2018

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

@remitamine remitamine commented Aug 22, 2018

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

@tiantian20007 tiantian20007 commented Nov 8, 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

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 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 gahbes commented Dec 6, 2018

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

@avagraha
Copy link

@avagraha avagraha commented Mar 24, 2019

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

@FlamelightX FlamelightX commented May 7, 2019

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 bsback commented Oct 2, 2019

any updates on this?

@binarize
Copy link

@binarize binarize commented Dec 13, 2019

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

@Aitolda
Copy link

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

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

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.