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

[YouTube] [SOLVED] 3D/2D 360° videos - now encoded in a new, proprietary & non-standard format #15267

Closed
4 of 8 tasks
Cyroxchan opened this issue Jan 16, 2018 · 53 comments
Closed
4 of 8 tasks

Comments

@Cyroxchan
Copy link

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

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

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

Description of your issue, suggested solution and other information

It appears that approx. one week ago, YouTube has changed its encoding algorithms for panoramic 360° 2D/3D videos.

As a producer of such videos, I am familiar with the standard format used by most 360° video players to convert the flat video image into a 360° panorama (in either 2D or 3D). The standard video format is in "equirectangular panorama" projection for 2D, and "over/under equirectangular panorama" projection for 3D 360° videos. A 360° video producer would format their video to one of the above projections, and then use YouTube's "Spatial Media Metadata Injector" tool (found here: https://support.google.com/youtube/answer/6178631?hl=en&ref_topic=2888648) to inject the code needed to inform YouTube that the video being uploaded is a 360° panoramic video.

Approx. one week ago, YouTube has changed their internal encoding processes to convert uploaded 360° videos to a custom proprietary format (no longer equirectangular panorama). This format now makes it completely useless to download the desired 360° for viewing in best possible quality & on offline video players, as no viewer outside of YouTube would recognize the proprietary format. YouTube has also been re-encoding previously uploaded videos to their new proprietary format.

For example, here is a screenshot from a video (found on YouTube at: https://www.youtube.com/watch?v=8DqSh_T20WY -- I downloaded it on 2017-11-07):

before

The above image shows the correct over/under equirectangular panorama projection for a 3D 360° video.

However, as of right now, using youtube-dl to download the video ("youtube-dl https://www.youtube.com/watch?v=8DqSh_T20WY -f 315+171 --merge-output-format mkv"), a screenshot of the video at the same timestamp as above looks like this:

after

I can see three possible reasons for encoding their videos in this new proprietary format:

  1. They don't want people downloading these videos for offline viewing -- they want people to view the video on YouTube. This is a pretty obvious reason, however if true, why haven't they encoded all the types of videos available on YouTube into an unviewable mess? Why only 360° videos? Which leads me to reason 2.

  2. This new format may be faster for their players to process into a 360° video. This would be a fair reason if true, but it makes life miserable for those of us who enjoy downloading the clips for offline viewing in the player of their choice. However, reason 3 is the most likely:

  3. The re-encoded video is designed to put as much resolution as possible in the areas of the video that people are most likely to look at. Some research I read shows that 75% of the time, viewers of 360° videos look in the forward 180° or so of the video and don't really look behind them much. In addition, the equirectangular panorama format gives far too much resolution to the top and bottom of the dome projection, and nowhere near enough to the center. YouTube's new encoding format definitely improves on the standard format -- more real estate given to the front half of the video, and the back and bottom are given significantly less. However, it still doesn't help those of us who want to watch it outside YouTube. To be acceptable, it would essentially require the VR/360° industry to accept YouTube's new format as a standard for watching 360° videos and incorporate it into their players & software. For this to happen, of course, YouTube will need to release the specifications for their new encoding format.

Currently, it appears that there's nothing youtube-dl could do to fix this situation. Thus, this "issue" is a request for new functionality: being able to re-encode the 360° videos from YouTube's new proprietary format back into the standard equirectangular panorama projection that most 360° video players recognize.

Thank you for taking the time to review this issue. Hopefully it leads to improvements in youtube-dl in the future!

@yan12125
Copy link
Collaborator

Is there an existing tool for such conversion? I guess --exec can help.

@Cyroxchan
Copy link
Author

Cyroxchan commented Jan 17, 2018

No existing tools that I'm aware of. As I explained, this proprietary format is brand-spankin' new. I found an article on Google Blog from March 2017 (https://blog.google/products/google-vr/bringing-pixels-front-and-center-vr-video/) where they discuss this new format (called the Equi-Angular Cubemap, or EAC). Essentially, it takes the 360° dome panorama (that would have originally been uploaded via the equirectangular format in my first picture), and reencodes it so that every side of the dome that is projected is now the face of a cube. Which, if you look at the second picture I posted, is exactly what is happening. The screen is split in half: left half for left eye, right half for right eye. Then each half is split into six quadrants, each representing one face of a cube:

RIGHT FACE (rotated 90° CCW)          TOP (no rotation)

FRONT (rotated 90° CCW)               BACK (no rotation)

LEFT FACE (rotated 90° CCW)           BOTTOM (rotated 180°)

So, even though Google has been working on this new format for a while, it has only gone live on YouTube as of approx. a week ago.

So we can do one of three things now:

  1. Watch the 360° video on YouTube. (For those with VR headsets, they will need to watch it on an official YouTube VR app or wait for their favorite VR app to support YouTube's new encoding format). Unfortunately (and this is from personal experience), the YouTube VR app kinda sucks. I want to watch a nice 3D 360° video at 2160s60? I am at the complete mercy of the app, as I cannot choose quality settings in these stupid apps. And from what I've seen, 360° videos in the YouTube VR app sometimes get capped at 1080s60... which makes 360° look godawful.

  2. Wait for 360° apps and players to embrace YouTube's new encoding format. If they do, great. As I mentioned, YouTube's implementation (EAC) is quite superior to the current equirectangular panorama format, as it allows more detail where it is most important: right in front of the viewer's face. However, in order for the format to be truly successful, Google needs to make their implementation algorithm public, so that not just the video players, but the encoding software (for animation, rendering software such as Maya, 3DS Max, Blender, MMD, etc.) can encode the videos properly.

  3. Re-encode the EAC videos downloaded from YouTube back into Equirectangular Panorama. This will be the only solution until either point 1 or point 2 becomes a satisfactory solution.

@samelie
Copy link

samelie commented Jan 17, 2018

They are experimenting with cube maps, you're right. WebGL is much better at rendering cube maps than a single texture. Technically, 6 tiles at 4096x4096 would work.
Here you can see the top row is the wraps "longitude" and the bottom wraps "latitude".

@guygodin
Copy link

guygodin commented Jan 18, 2018

The new format still doesn't look right on a cube. It is more of a curved cube FYI. Still trying to figure this one out =/ What they documented in March 2017 doesn't match the format of the videos we see today.

@Cyroxchan
Copy link
Author

Guy Godin! Developer of Virtual Desktop! I had no idea! I saw your post today on the Oculus Rift Reddit forums about Virtual Desktop 1.9 and how it was compatible with YouTube's cube format, so I immediately went out and bought Virtual Desktop on Steam, and installed the beta!

You're right, YouTube's current implementation must not be 100% accurate to their documentation. I used Virtual Desktop tonight to watch some of the EAC videos I downloaded using youtube-dl, and yeah, you're 99% there, but the seams between the cube faces are slightly warped. Not too noticeable, until you notice them, and then they stick out like a sore thumb. However, the EAC videos are at least in a watchable state outside of YouTube and that's great.

Anyways, awesome work you're doing. I love my Oculus Rift for all the cool VR experiences like VR Chat and all, but I definitely enjoy watching some awesome VR videos. Your player is definitely the best I've used for the Rift, so thank you for your hard work!!

@guygodin
Copy link

Thanks! Yeah the implementation I have right now is not 100% perfect as I had to fiddle with the UVs manually until it looked right so it’s really just an approximation of what Google engineered. Hopefully they’ll release more details about the projection they are using. I’m not a fan of the new format, the quality is inferior to the old one (most likely because they need to re-project from an equirectangular source which makes the image more blurry). So until they have tools to generate their Cube at the source, it will look worse.

@Cyroxchan
Copy link
Author

That is true about the re-encoding worsening the quality. For some of the videos I've produced, I render at 3840x4320, and upload it to YouTube at 120Mbps, so by the time YouTube does it's encoding for streaming, the quality hit when played at 2160s60 won't look too bad. But yeah, anytime an encoding happens, quality is going to be lost (unless you're encoding losslessly, but that's waaaay too large of a bitrate to be viable).

Yeah, hopefully the EAC format either a) goes away or b) becomes so big that it becomes a standard for all software for panoramic videos.

@Cyroxchan
Copy link
Author

Lol... looks like YouTube's experiment with EAC might be ending. I just downloaded a brand new 3D 360° video today and it was in the old, standard equirectangular panorama format. I'll post again in a week or so to confirm or deny today's findings.

@n1ckfg
Copy link

n1ckfg commented Jan 30, 2018

Cubemap 360 video is an open standard too, just not as common. Cubemaps' advantage vs. equirectangular projection is more resolution in the middle of the frame, where you're likely to be looking. The disadvantage is that the stored image no longer makes intuitive visual sense to a human.

@Cyroxchan
Copy link
Author

Oh yeah, I fully realize and can appreciate the advantages that cubemap projection has over equirectangular. The problem lies in the following:

The desired projection standard needs to be universally accepted and utilized at all steps of the video production/distribution pipeline.

If YouTube wants their superior EAC format to work, they need to make sure that 360° cameras can capture the footage in EAC, and (for animation) that all rendering software can render the image in EAC. Then, YouTube needs to allow videos that are in EAC format to be able to be uploaded to YouTube at a good high bitrate for YouTube to re-encode into the different quality levels that they do.

Right now, for users who wish to upload a 360° video to YouTube, there are two choices:

a) You upload the video (injected with YouTube's metadata injector) in the equirectangular projection format. This defeats the whole purpose of the EAC format to begin with, because you're starting with a potentially lower quality source and encoding it into a higher grade format. I like the metaphor someone used on the Oculus Rift Reddit forums comparing it to someone who re-encodes a 128kbps mp3 file to 320kbps... The quality isn't going to get any better! And every re-encode just makes the quality worse, so these EAC re-encodes just end up making the video blurrier than if it had just remained in its equirectangular original.

b) You get one of the few (if any) devices that support YouTube's new "Jump" platform: https://vr.google.com/jump/
This will only benefit live-action video. Animation is still relegated to equirectangular.

But yeah, I think YouTube's realizing that the EAC format was pushed out too soon and doesn't improve the quality of videos uploaded in equirectangular to begin with, because every new 360° video that has been uploaded in the past few days (since my last post) that I have downloaded with youtube-dl has been in equirectangular panorama.

@kleveralt
Copy link

I have the same issue, but I can download the normal format with Chrome and a Chrome extension named "youtube video downloader"(it was already disabled and removed from Chrome extension shop).

youtube source,
image

the way I get the original URL,
image

then I preview this URL in Chrome, I can download it as the format what it look like too,
image

I am so strange why youtube-dl download this in invaild format but this extension can do in right.

@ibvildthings
Copy link

I have tried to download few 360 videos over the last week and I've always found them to use the new EAC cubemap format.
I tried downloading videos in 4K - WebM as well as MP4 format.

@Cyroxchan
Copy link
Author

Cyroxchan commented Mar 2, 2018

@PriteshDesai Check the video upload date. If the 360° video was uploaded prior to January 27th, 2018 (approximate), it will likely have been encoded (or re-encoded) to the EAC format by YouTube. However, it appears that they stopped doing so for any 360° videos uploaded since January 27th. All new 360° videos that I've downloaded after that date (that were uploaded after January 27th) have been in the old standard equirectangular format.

@ibvildthings
Copy link

@Cyroxchan Thanks for the clarification.
I was able to download videos in Equirectangular format even for videos which were uploaded prior to Jan 27.
However in order to do that, you have to pass a blank "browser user-agent". If you pass any "browser user-agent" (for eg. Mozilla 4.0), Youtube serves EAC videos.

I was able to pass a blank "browser user-agent" via a custom C# script. I was able to download videos in Equirectangular format for - 2K resolution MP4 and 2K and 4K resolution MKV.

However when I pass a browser user-agent, Youtube serves 4K MP4 and 4 K MKV video but switches to an EAC format.

I am looking for 4K resolution MP4.

@nosys70
Copy link

nosys70 commented Mar 5, 2018

this is plain stupid.
As per the google article about pixel densities, you see the green an blue is at top and bottom of picture.
you just need to make the interesting part of picture rolled in these regions and left the less interesting parte of picture in the center of picture.
when displayed, it makes no difference for the player which part to display, since the picture is a sphere and you can roll it as much as you want. You just need to set the viewport to reflect the change.
anyway any camera that could create EAC cube will probably start to create an equirectangular before converting to EAC, so no progress here, just double conversion.

@adrianposteuca
Copy link

Solve it, in Unity and a little bit of Video editing.
I am working now to create a small tool that can import the video you download from Youtube and convert it to Equilateral format.

@dancewithmeme
Copy link

@adrianposteuca Sorry for disturbing, but did you solve that problem ?

@adrianposteuca
Copy link

@Uncleout Yes, but is not a stable solution... it works only in Unity. Need a conversion from unity again to Equilateral.

@kodawah
Copy link

kodawah commented Apr 8, 2018

this is very interesting, I wonder if they tag the files correctly with their mesh standard (https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md)

@ExenStryfe
Copy link

@adrianposteuca Can you explain how you solved it in unity ? Thanks

@Haczar
Copy link

Haczar commented May 5, 2018

Found a solution, thanks to @PriteshDesai
Two programs that work to download the 360 videos:

  1. Video DownloadHelper, a Firefox addon working as of May 4th, 2018 (it will guide you through installing the native program to run on your machine to handle bigger downloads). Once the addon is installed, just go to Youtube and click the new icon
    To be sure it works (not certain if this step is required):
  • Go to the URL "about:config" in Firefox and click "I understand the risk"
  • Right click to add a New > String
  • Name it "general.useragent.override"
  • Press enter to leave the contents of the variable blank
  • Delete this field once you're done downloading the 360 videos you need
  1. MediaHuman Youtube Downloader
    It's easier to use, but proprietary, and the trial version only lets you download 20 videos

Using Virtual Desktop, I could play the videos and they don't wrap or chop incorrectly, seems these programs are downloading older versions of the YouTube video and they aren't formatted the new way.

@j0hj0h
Copy link

j0hj0h commented May 11, 2018

thanks @PriteshDesai, with youtube-dl --user-agent "" [url] i get 4k .webm in equirectangular format

@whitedawf
Copy link

Hi everyone,
Really interesting reading this thread. So what was the end result did we find a way to download the full 4k video from any youtube video in the original equirectangular format? Also Is there a way to download just the 2D version in the fullest quality of the video or does it always have to be the 3D version if this is what is available?
Would appreciate any help.

Thanks

@yuricasquel
Copy link

@j0hj0h & @PriteshDesai i got 4K equirectangular in mp4 with youtube-dl -f bestvideo[ext=mp4] --user-agent '' URL

@Riclim
Copy link

Riclim commented May 18, 2018

@ibvildthings
Copy link

The Unity 360 player, only displays regular 6 cubemap videos properly. The YT cubemap isn't natively supported.

Has anyone been able to display the Youtube cubemap properly in Unity?

@hakanai
Copy link

hakanai commented May 28, 2018

I'm on this path at the moment, trying to get it to work in Unity myself. I managed to get the transformations to get the right faces into the right locations, but now it's the warping that I have to fix.

@adrianposteuca
Copy link

Hello Guys,

what I have achieved so far is to create a 3D rig made up of two parts:
A.Part one with faces: Font, left, Right
B.Part two with faces: up, back, down

In a video editing software, I cut the video in half on horizontal, so I got two videos for A and B.
I mapped them in Unity with video player and put the camera inside the cube, it works.

It works on some videos, but still has a problem with lens since is cube seen with a curved lens

@hakanai
Copy link

hakanai commented May 28, 2018

That sounds like what I have so far, except I've done it with a single shader on a single cube (or, as of right now, the skybox). The problem is, it's still distorted because I'm not applying the mapping required to undo the EAC mapping.

@ibvildthings
Copy link

@trejkaz @adrianposteuca How about creating an open source skybox for Youtube? We can all contribute to it and make it available for all.

@hakanai
Copy link

hakanai commented May 29, 2018

Now my skybox code has the correct transform to undo the EAC mapping, but the faces don't quite align correctly. I'm assuming YouTube adds some bleed somewhere and that this bleed isn't documented in anything that I've read so far so I don't know how to avoid it when transforming.

The current release is here. The code in there is written for CG but may apply for any C-like language which wants to do similar calculations.

The other option was to use the new mesh standard. I had two problems with using this for my own project:

  1. They had documented how to make a custom mesh, and talked about how little space the EAC mesh took up, but didn't mention the actual layout of the EAC mesh itself.

  2. I really wanted the image on the actual skybox, and couldn't see any way to get a mesh in there anyway.

Not using the mesh standard may even be why there is a minor issue with alignment still. I'm hoping that getting this initially version out there will encourage some sharing of solutions. :)

@Cyroxchan Cyroxchan changed the title [YouTube] 3D/2D 360° videos - now encoded in a new, proprietary & non-standard format [YouTube] [SOLVED] 3D/2D 360° videos - now encoded in a new, proprietary & non-standard format Jun 7, 2018
@Cyroxchan
Copy link
Author

Cyroxchan commented Jun 7, 2018

So, I'm probably a little late to the game here, but thanks to the work and explanations of @PriteshDesai and @j0hj0h the solution has been discovered!

In order to download the originally uploaded equirectangular panorama format version of the 360° video using youtube-dl, include the following option in your command-line:

--user-agent ""

Returning to my original example video, https://www.youtube.com/watch?v=8DqSh_T20WY
I perform the following to download the 4K60 video:

yt-dl360

Which, when played, shows the correct equirectangular format once again:

yt-dl129

YouTube's EAC re-encoding has been thwarted! Thank you everyone for your hard work!

Now, on to another YouTube VR-video-related issue! The VR180 format has some hidden streams that are not being picked up by youtube-dl. Link to issue here: #16647

@hakanai
Copy link

hakanai commented Jun 7, 2018

The trap there is that the equirectangular copy can be a lot fuzzier than the EAC copy. (This is why I spent time to make a player specifically for the layout I was getting.)

Example:

$ youtube-dl -F https://www.youtube.com/watch?v=eyn9Bvr4UQ4
[youtube] eyn9Bvr4UQ4: Downloading webpage
[youtube] eyn9Bvr4UQ4: Downloading video info webpage
[youtube] eyn9Bvr4UQ4: Extracting video information
[info] Available formats for eyn9Bvr4UQ4:
format code  extension  resolution note
249          webm       audio only DASH audio   58k , opus @ 50k, 1.37MiB
250          webm       audio only DASH audio   76k , opus @ 70k, 1.81MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k, 3.44MiB
171          webm       audio only DASH audio  143k , vorbis@128k, 3.55MiB
251          webm       audio only DASH audio  144k , opus @160k, 3.55MiB
278          webm       256x144    144s  101k , webm container, vp9, 30fps, video only, 2.60MiB
160          mp4        256x144    144s  122k , avc1.4d400c, 30fps, video only, 3.01MiB
242          webm       424x240    240s  229k , vp9, 30fps, video only, 5.80MiB
133          mp4        424x240    240s  262k , avc1.4d4015, 30fps, video only, 6.58MiB
243          webm       640x360    360s  474k , vp9, 30fps, video only, 10.90MiB
134          mp4        640x360    360s  633k , avc1.4d401e, 30fps, video only, 16.29MiB
244          webm       848x480    480s  800k , vp9, 30fps, video only, 19.69MiB
135          mp4        848x480    480s 1149k , avc1.4d401f, 30fps, video only, 29.50MiB
247          webm       1280x720   720s 1678k , vp9, 30fps, video only, 39.70MiB
136          mp4        1280x720   720s 2316k , avc1.4d401f, 30fps, video only, 57.91MiB
248          webm       1920x1080  1080s 2917k , vp9, 30fps, video only, 69.62MiB
137          mp4        1920x1080  1080s 4350k , avc1.640028, 30fps, video only, 104.32MiB
271          webm       2560x1440  1440s 8877k , vp9, 30fps, video only, 217.20MiB
264          mp4        2560x1440  1440s 10446k , avc1.640032, 30fps, video only, 220.75MiB
313          webm       3480x1920  2160s 14292k , vp9, 30fps, video only, 363.84MiB
266          mp4        3480x1920  2160s 16469k , avc1.640033, 30fps, video only, 289.43MiB
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k
36           3gp        320x240    small , mp4v.20.3, mp4a.40.2
43           webm       640x360    medium , vp8.0, vorbis@128k
18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k
22           mp4        1280x720   hd720 , avc1.64001F, mp4a.40.2@192k (best)

Best copies are 313 and 266. 313 is reasonably sharp, but is EAC. 266 is equirectangular, but too fuzzy to enjoy.

And then if you add --user-agent '':

$ youtube-dl -F https://www.youtube.com/watch?v=eyn9Bvr4UQ4 --user-agent ''
[youtube] eyn9Bvr4UQ4: Downloading webpage
[youtube] eyn9Bvr4UQ4: Downloading video info webpage
[youtube] eyn9Bvr4UQ4: Extracting video information
[info] Available formats for eyn9Bvr4UQ4:
format code  extension  resolution note
249          webm       audio only DASH audio   58k , opus @ 50k, 1.37MiB
250          webm       audio only DASH audio   76k , opus @ 70k, 1.81MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k, 3.44MiB
171          webm       audio only DASH audio  143k , vorbis@128k, 3.55MiB
251          webm       audio only DASH audio  144k , opus @160k, 3.55MiB
278          webm       256x144    144p   98k , webm container, vp9, 30fps, video only, 2.55MiB
160          mp4        256x144    144p  111k , avc1.4d400c, 30fps, video only, 2.22MiB
242          webm       426x240    240p  228k , vp9, 30fps, video only, 5.66MiB
133          mp4        426x240    240p  245k , avc1.4d4015, 30fps, video only, 4.76MiB
243          webm       640x360    360p  447k , vp9, 30fps, video only, 10.58MiB
134          mp4        640x360    360p  739k , avc1.4d401e, 30fps, video only, 12.93MiB
244          webm       854x480    480p  792k , vp9, 30fps, video only, 19.40MiB
135          mp4        854x480    480p 1351k , avc1.4d401f, 30fps, video only, 25.99MiB
247          webm       1280x720   720p 1641k , vp9, 30fps, video only, 38.77MiB
136          mp4        1280x720   720p 2699k , avc1.4d401f, 30fps, video only, 48.27MiB
248          webm       1920x1080  1080p 2847k , vp9, 30fps, video only, 68.29MiB
137          mp4        1920x1080  1080p 4327k , avc1.640028, 30fps, video only, 85.77MiB
271          webm       2560x1440  1440p 8861k , vp9, 30fps, video only, 210.96MiB
264          mp4        2560x1440  1440p 10478k , avc1.640032, 30fps, video only, 179.79MiB
313          webm       3480x1920  2160p 14316k , vp9, 30fps, video only, 363.21MiB
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k
36           3gp        320x240    small , mp4v.20.3, mp4a.40.2
43           webm       640x360    medium , vp8.0, vorbis@128k
18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k
22           mp4        1280x720   hd720 , avc1.64001F, mp4a.40.2@192k (best)

All it seems to do is remove the best quality equirectangular option from the list. :)

@Cyroxchan
Copy link
Author

Cyroxchan commented Jun 8, 2018

@trejkaz In your second stream list (where you added --user-agent ''), where 266 has been removed, did you try downloading stream #313? I think you'll be pleasantly surprised to find that by passing --user-agent '', the stream is no longer EAC, but Equirectangular! 😄

FILESIZE NOTE: In your first list, stream #313 is 363.84MiB (EAC version). In the second list, stream #313 is 363.21MiB (Equirectangular version).

And yeah, the #313 (for 30fps) or #315 (for 60fps) stream is in almost all cases the best quality version to download -- the vp9 codec is vastly superior in quality compared to the avc1 codec. Stream #313 is as sharp in Equirectangular as it is in EAC.

Screenshot below taken from stream #313 video downloaded using:
youtube-dl -f 313+171 --merge-output-format mkv https://www.youtube.com/watch?v=eyn9Bvr4UQ4 --user-agent ''
device

@hakanai
Copy link

hakanai commented Jun 8, 2018

Yeah, OK. It does send a different video after all. I didn't expect to get a different video when I provided the exact same format ID, because I assumed something called an ID would behave like an ID. :/

So my only concern left is the quality, right? Both videos are packing the information into 3480x1920, but the EAC one should be fitting better quality in the same size. (Assuming that they introduced it for this reason, which seems to be what the blog posts are claiming.)

@Cyroxchan
Copy link
Author

For sure, the EAC one should, in theory be better quality. It really all depends on the size and quality of the original upload.

If, for example, the author uploaded their video at 3840x2160 resolution in equirectangular format, then there is essentially no way the EAC version of the video at 3840x2160 is going to be better quality.

If the author uploaded the video at a higher resolution, say 7680x4320 resolution in equirectangular format, then the EAC version of the video at 3840x2160 could end up better quality than an equirectangular one at the same resolution.

EAC has its merits for sure, but it's not universally accepted. Until it is, I'll prefer my locally saved files in equirectangular.

@shreytyagi
Copy link

Guys on YouTube, the EAC is implemented only on 1080s quality and above. At 720s and below, the old equirectangular format only is used. So you can download it in 720s (It looks like 240p quality but it's atleast viewable !)

@Cyroxchan
Copy link
Author

@shreytyagi Good to know, but the solution has already been discovered and described above. You can download 360° 4K streams in equirectangular, just by passing --user-agent "" to the command-line code.

@Cyroxchan Cyroxchan reopened this Jun 18, 2018
@Cyroxchan
Copy link
Author

(accidentally closed - i am noob)

@Jithug6
Copy link

Jithug6 commented Aug 10, 2018

You Can Play EAC 360 videos on Pc by using "PotPlayer" there is an option called Equi Angular cube Map.
I dont know its stabilty yet but its worth a try.

On Android you can use Vidmate App to download 360 videos in equirectangular panorama.

untitled

@DaCodaHUB
Copy link

@Jithug6 Potplayer didn't work with my video

@lutchenxl
Copy link

Hi, Cyroxchan. I used your command: youtube-dl -f 313+171 --merge-output-format mkv [URL]--user-agent '' . For some 360° videos ,I can download the 360° 4K streams in equirectangular. but for some 360° videos, with the same command, the downloaded 360° 4K streams is in EAC.

@Mirrorman95
Copy link

How to watch YouTube's ridiculous new 360 3D video format on your computer:

  1. Download the video from YouTube
  2. Download and install PotPlayer
  3. Video > 3D Video Mode > Enable 3D Video Mode, SBS (Side by Side)
  4. Video > 360 Video Mode > Enable 360 Video Mode, Equi-Angular Cubemap 2x3 (Google Stereo)

@Narendherraj
Copy link

Is There really any solution for this problem ?????

@rautamiekka
Copy link
Contributor

Goddamn GitHub made me delete my comment ...

Has anyone tried VLC ? Or any other player for that matter ? PotPlayer is a Window$-exclusive thing, so that's kinda outta the window.

The Firefox extension uses FFmpeg to do the conversions. If FFmpeg has somehow reverse-engineered the new format, that's the place to look at.

@jongmoon
Copy link

jongmoon commented Nov 29, 2018

If targeted on Web Player. egjs-view360 can be solution for viewing EAC Video.

It supports various types of 360 contents. For example Equirectangular, Cubemap and EAC(Youtube)
Ref : https://github.com/naver/egjs-view360/wiki/Supported-Projection-Type
 
Youtube Example on Web is image example. (video format is also supported.)

@shreytyagi
Copy link

Yest this works!
This is how it worked for me:

  1. First download youtube-dl.exe

  2. In the same directory, open powershell (shift + right-click)

  3. Enter the following command:
    .\youtube-dl.exe --user-agent "" URL https://www.youtube.com/watch?v=hR1mNJ11ycU -F

  4. Note down the code for the file with largest size (Most probably 266).

  5. Enter the following command:
    .\youtube-dl.exe --user-agent "" URL https://www.youtube.com/watch?v=hR1mNJ11ycU -f 266+251 --merge-output-format mkv

Done!!!!!

@mikeswanson
Copy link

We have some internal tools at Pixvana (that I wrote) to perform these conversions, and it's all based on the publicly-available YouTube information. So while I probably can't share the internal code, I will say that such a tool is certainly buildable using available information. Wish I could help more directly.

@avagraha
Copy link

avagraha commented Mar 9, 2019

Sorry I did not read this long topic, I wait for a desktop, with a phone 

it is hard to scroll in a space 1cm. between page header/reply 
space/keyboard.

With youtube-dl:
https://postimg.cc/ykfTP5RS
very bad, in my opinion

with other downloaders for Windows:
https://postimg.cc/rK9mWXv5
right, in my opinion.

thanks in advance for your opinion.
 

@avagraha
Copy link

avagraha commented Mar 11, 2019

Hi to all, finally I was able to scroll the whole 3d :)
Very interesting, but there still arises a little problem.
I followed exactly the suggestion of user Cyroxchan here
https://user-images.githubusercontent.com/32349993/41115023-6d077006-6a43-11e8-858d-bce5e8945d78.jpg

Problem with https://www.youtube.com/watch?v=KBQ3ICqpyIs

Instead of the right view as you can see here (lowest YT resolution due to
my choice):
https://postimg.cc/p5VL8qFm
i.e. zero distortion,

following your receipt I got an unacceptable view:
https://postimg.cc/VrQSSqgt
https://postimg.cc/CBg1MFMH

Questions:
mine error?
your error?
youtube-dl error?
viewer sw error? maybe the latter...but with all your YT URLs in this page I
got perfect view without any distortion, therefore I doubt that there is an
error of the viewer Pot (the one and only working here).

thanks a lot for your opinion.

Here what I did:
youtube-dl --user-agent "" KBQ3ICqpyIs -f 313+338 --merge-output-format mkv
I chose 313+338, only because the maximum available 6400x6400 (the best =
the biggest in size = the hightest Mb/sec, fps) is not playable on my OS
(i.e. steady image and audio only).

Edit: resolved due to my intuition.

@Andrei114
Copy link

Found a solution, thanks to @PriteshDesai
Two programs that work to download the 360 videos:

  1. Video DownloadHelper, a Firefox addon working as of May 4th, 2018 (it will guide you through installing the native program to run on your machine to handle bigger downloads). Once the addon is installed, just go to Youtube and click the new icon
    To be sure it works (not certain if this step is required):
  • Go to the URL "about:config" in Firefox and click "I understand the risk"
  • Right click to add a New > String
  • Name it "general.useragent.override"
  • Press enter to leave the contents of the variable blank
  • Delete this field once you're done downloading the 360 videos you need

Download link: https://addons.mozilla.org/en-US/firefox/addon/video-downloadhelper/

  1. MediaHuman Youtube Downloader
    It's easier to use, but proprietary, and the trial version only lets you download 20 videos
    https://www.mediahuman.com/youtube-downloader/

Using Virtual Desktop, I could play the videos and they don't wrap or chop incorrectly, seems these programs are downloading older versions of the YouTube video and they aren't formatted the new way.

THX A LOT! it worked for me :) thx so much!

@klo4koandrew
Copy link

klo4koandrew commented Jun 20, 2019

  1. MediaHuman Youtube Downloader

It's rly works! Thanks!
but 8k videos download only like 4096x4096

@ShivajiReddy
Copy link

I don't know how relevant my question in this thread is but I feel this is the only thread on this repo where I can ask this. I have been looking for this on Oculus forums and am surprised that how/ if noone has encountered this issue before.

Here is the issue:

  • I'm trying to play a 360 Degree(Panaromic Video) Video downloaded from Stanford's Virtual Human Interaction Lab database on Unity with an Oculus.
  • But when I play the video on Unity and watch it in Oculus, only right half of the entire visible region(half sphere) is oriented properly and the other half region is rotated by 90 degrees.

So my question is, is it happening because the video I'm running is downloaded from YouTube and YouTube now has their own proprietary encoding for 360 videos, which cannot be rendered anywhere outside YouTube or its something else?

Any help/reference links would be highly appreciated.

@ytdl-org ytdl-org deleted a comment from mohammad007kh Jul 24, 2019
@ytdl-org ytdl-org locked and limited conversation to collaborators Jul 24, 2019
@dstftw dstftw closed this as completed Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests