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

Add support for spherical ("360 degrees") videos #6246

Open
fstirlitz opened this issue Jul 16, 2015 · 5 comments
Open

Add support for spherical ("360 degrees") videos #6246

fstirlitz opened this issue Jul 16, 2015 · 5 comments
Labels

Comments

@fstirlitz
Copy link
Contributor

@fstirlitz fstirlitz commented Jul 16, 2015

Example: https://youtu.be/S3xOB-Bigc8

The video downloads fine, but it's treated like a planar (flat) video; the resulting file doesn't contain any metadata indicating it's a spherical video, and none are made available through the -j option.

There probably isn't that much for youtube-dl to do here: detecting spherical videos, collecting metadata, putting them into info_dict, and perhaps doing some fixups in a post-processor.

Google has a draft specification for spherical video metadata, which may or may not be helpful: https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 16, 2015

Apart from the webpage having the tags 360 or spherical(which I guess can be manually added for every video), I haven't found anywhere where it says it is a spherical video. How do you think youtube-dl can detect them?

@fstirlitz
Copy link
Contributor Author

@fstirlitz fstirlitz commented Jul 22, 2015

Here's a (prettified) fragment of html5player.js which seems responsible for detecting it:

    DH.j = function(a) {
        var b = a.X().A.c.toLowerCase(), c;
        c = a.getVideoData();
        a = a.X().experiments;
        if (a.Fa && hz(c) && 3 != c.ga && 4 != c.ga)
            b = "Anaglyph3D";
        else {
            a: {
                if (c.j)
                    for (var d in c.j.j) {
                        var e = c.j.j[d].info.video;
                        if (e && 2 == e.projectionType) {
                            c = true;
                            break a
                        }
                    }
                c = false
            }
            b = c ? "Spherical" : a.$ && vj && "web" == b ? "NoOp" : a.Ha && vj && "web" == b ? "WhiteNoise" : a.P && vj && "web" == b ? "EdgeEnhance" : null
        }
        return b
    };

There's a yt:projectionType attribute in the DASH manifest, and projection_type key buried in the video metadata. The video is fully viewable in Chromium.

@jaimeMF jaimeMF added the request label Jul 23, 2015
@neuman
Copy link

@neuman neuman commented Mar 5, 2016

Any progress on this issue?

@dstftw dstftw mentioned this issue Jul 3, 2016
5 of 8 tasks complete
@themegabyte
Copy link

@themegabyte themegabyte commented Oct 11, 2017

What is the update on this issue guys

@dj-fiorex
Copy link

@dj-fiorex dj-fiorex commented May 4, 2018

Any updates guys?

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
5 participants
You can’t perform that action at this time.