Downloading 3DVR from YouTube (youtube-dl)

kunoichi

Occasional Visitor
Mar 26, 2007
622
2,247
Downloading 3DVR videos from YouTube and making them work on different devices can be quite a hassle.
For example, at the time of writing most mobile cpus won't be able to handle 60fps 3D 360 at 4096x4096 resolution,
but there may be other issues like video players not being able to handle Googles Equi-Angular Cubemap (EAC) projection.

"Bruh, why even download though, when I can simply use the YouTube app or web-browser?"

Nothing lasts forever, sometimes YouTube channels and videos disappear for one reason or another.
Sometimes you may want to watch videos offline, or put them on a device to save bandwidth or for a better experience.
Maybe you have a Plex server, where you can enable DLNA and simply stream your videos over Wi-Fi to a device using Skybox VR without going through the SMB hassle.

Prerequisites:
This guide uses youtube-dl, so make sure to download a copy first.

Downloading 180 3DVR is farly straightforward, let's use Venus Reality's Charlotte 06 video as an example:
Code:
youtube-dl https://www.youtube.com/watch?v=mozVUUnsGOI

At the time of writing this will download a .webm container with the following codecs:
Video: VP90 3840x1920 59.94fps [V: English [eng] (vp9 profile 0, yuv420p, 3840x1920) [default]]
Audio: Opus 48000Hz stereo 3072kbps [A: English [eng] (opus, 48000 Hz, stereo) [default]]

Which should play fine on most players like Skybox VR, the problem is that some metadata like video description and download url won't be stored in the file.
Even when adding the parameter --add-metadata the additional metadata wont be stored in the webm for some reason (bug?).

Since webm is essentially a mkv limited to certain codecs like VP9, and since mkv can contain any combination of codecs anyway,
we can fix this by specifying mkv as output format, our new base command line becomes:
Code:
youtube-dl --add-metadata --merge-output-format mkv https://www.youtube.com/watch?v=mozVUUnsGOI

Now assume we have an older device or we are not able to stream our downloaded video from our home server/computer due to slow Wi-Fi.
Instead of re-encoding the video, it is possible to specify which version of the file to download from YouTube.

To list the available codecs/resolutions/framerates for a video, use -F:
Code:
youtube-dl -F https://www.youtube.com/watch?v=mozVUUnsGOI

To download a version with customized encodings of the video, specify the format code from the first column, video codec first, then audio-codec.

For example, using these formats:
251 webm audio only DASH audio 167k , opus @160k, 4.33MiB
303 webm 1920x1080 1080s60 4368k , vp9, 60fps, video only, 128.25MiB


Our new command line becomes:
Code:
youtube-dl --add-metadata --merge-output-format mkv -f 303+251 https://www.youtube.com/watch?v=mozVUUnsGOI

The process for 360 3DVR is similar, but as stated earlier, your device might not be able to to handle 4096x4096.

You may want to move to a lower resolution like 315:
315 webm 3840x2160 2160p60 16338k , vp9, 60fps, video only, 385.90MiB

Again, let's us Venus Reality's Queenie 03 video as an example:
Code:
youtube-dl --add-metadata --merge-output-format mkv -f 315+251 https://www.youtube.com/watch?v=5FjTAXQ-DqM


When opening this file you will notice that it has the EAC projection mentioned earlier.

This is fine if you are using a player like Skybox VR, where there is a button for "YouTube" projection, but what if your player does not support EAC?

Don't panic, Top-Bottom (TB) encodings are still available, but you have to specify an empty user agent.

Note that the available formats may differ depending on user agent, so if you change user agent, make sure to list formats again:
Code:
youtube-dl -F --user-agent "" https://www.youtube.com/watch?v=5FjTAXQ-DqM

Now download the video with an empty user agent:
Code:
youtube-dl --add-metadata --merge-output-format mkv -f 315+251 --user-agent "" https://www.youtube.com/watch?v=5FjTAXQ-DqM

When opening this file it should now be a regular Top-Bottom 360 3DVR video.

Edit: In fact, the seams are currently not perfect with EAC when using Skybox VR, so right now it may be better to go for Top-Bottom anyway.

As for now, that's all there is to it!

Happy Downloading!

:qustionable:
 
Last edited:
  • Like
Reactions: javr and eshwaa

chazz00

Well-Known Member
Nov 6, 2009
24
-298
I download youtube vids with JDownloader. Just tried it one day and it worked. Who knew?

1. Open JDownloader
2. Start your youtube vid.
3. Right click and pick copy video url at current time. After a short time it will show up in the linkgrabber tab in the highest res available.
4. Start download. When done you can erase all the extra junk that comes with the vid.
 

kunoichi

Occasional Visitor
Mar 26, 2007
622
2,247
The 180 VR download method I described broke a long time ago, but can now be performed with the yt-dlp fork.

On windows, grab the latest yt-dlp.exe that can be found here:
Code:
https://github.com/yt-dlp/yt-dlp/releases

You also need a copy of ffmpeg in the same folder in order for yt-dlp to merge the downloaded audio and video:
Code:
https://www.ffmpeg.org/download.html

To grab the 180 VR format, the yt-dlp client must now simulate being an android device by using the argument
Code:
--extractor-args youtube:player_client=android

To list available formats use:
Code:
yt-dlp -vF --extractor-args youtube:player_client=android https://www.youtube.com/watch?v=4Z_Ezl2r-p4

To download use:
Code:
yt-dlp --add-metadata --merge-output-format mkv -f 315+251 --extractor-args youtube:player_client=android https://www.youtube.com/watch?v=4Z_Ezl2r-p4

That's all, good luck and Happy Downloading!