The Blog

About Me


Marius Oberholster Hey! I'm having an incredible learning experience, not only learning how Blender works (yes, still learning), but also about Open-Source and the incredible software available. Stick around!

Uploading 3DSBS content to YouTube

Posted by Marius Oberholster on Friday, September 22, 2017 Under: Tutorials
Hey all!

Without ado, here is the video! (Below for more details on why this way)


GOD is so great!

For more on Exodus 7-12, KJV:
BibleAnimations blog
Production Vlog playlist

3D content comes in various forms and like audio, for stereo, comes in 2 streams or more. YouTube supports
- 3D Side By Side
- 3D Top and Bottom
- 360'
- VR (2 streams of 360 - for Google Glass or other headmounted VR gear)

The old way of making YouTube videos 3D:

For most of the above, there is a very neat little tool you can download from GitHub that YouTube recommends (Mac and Windows - download the appropriate zip on the page if you have a 64-bit version or follow the python instructions for 32-bit) to inject the special metadata needed for YouTube to recognize the 3D type of the content you are uploading:

This fantastic little tool is so user friendly you'll totally understand it within the moment you open it, hahaha. Because I am on Windows, I downloaded that and ta-da:

 

Now, if your video does contain spatial audio in one of those formats, remember to tick that box as well. For VR videos, you are going to have to tick both video boxes:
 - My video is spherical (360)
 - My video is stereoscopic 3D (top/bottom layout)

If you have done spatial audio, again, remember to tick that box too.

The big issue here is that Side-by-side 50% isn't listed here, so YouTube's help pages leaves us with only one of the following options:

 - Don't do YouTube 3D at all
 - Render out your videos as Top-and-Bottom instead
 - Inject metadata using FFMPEG (a commandline video processor) or a video editor that has the capability of adding the special metadata upon export.

Number 1 isn't gonna fly, because I have an assignment to produce Exodus in 60fps 3D 4K. Bypassing YouTube's 3D settings by using Anaglyph (Red/Cyan) has too many video colorspace ghosting problems, so that in and of itself isn't gonna work.

Number 2 isn't gonna work because a lot of the footage is already rendered at SBS and I don't have the depthmaps for a large majority of it (without going and rendering them), so re-conversion ain't gonna happen.

Number 3 has a few catches in that the video editors recommended are either totally out of budget or don't produce the result I am looking for. That leaves us with:

FFMPEG - it's free and can skip the processing stage in adding the metadata

Now, YouTube gives us the following code for FFMPEG:

For H.264 encoded video in .mov or .mp4 container:

ffmpeg -i input_file.mkv -vcodec libx264 -x264opts \    "frame-packing=3:frame-packing-interpret=1:frame-packing-quincunx=0:frame-packing-grid=0,0,0,0" output_file.mp4

And for Matroska and WebM video

ffmpeg -i input_file.mkv -c copy -metadata:s:v:0 stereo_mode=1 output_file.mkv

Now do remember that these are about the containers, not the codecs within the containers (though they do matter). You can almost think of the container as a coffee can with your video and audio and metadata inside. You can chuck a VHS, DVD, Blu-ray, etc in there with a CD, tape, A-Track tape, music box wheel and with all that, a set of instructions to how whoever wants to use them, should understand their array to get the right result.
That set of instructions and how it's handled is particular to the coffee can, and the info inside it. So the info has to be right for the coffee can you use.

That brings us to our coffee can processor FFCuppacino! hahaha.

I want to share with you a few things first:

The given code on the website (https://support.google.com/youtube/answer/7278886?hl=en) is wrong for the first one. It will spit out "Invalid Argument" every single time, because it is an invalid argument. For H.264 in an MPEG-4 container, it's supposed to be:

ffmpeg -i input_file.mp4 -vcodec libx264 -x264opts frame-packing=3 output_file.mp4

And not:
ffmpeg -i input_file.mkv -vcodec libx264 -x264opts \    "frame-packing=3:frame-packing-interpret=1:frame-packing-quincunx=0:frame-packing-grid=0,0,0,0" output_file.mp4

I do think that some of the info there is for different formats and whoever posted it assumes everyone would know that, but I can't say for sure - not an FFMPEG expert here. BUT I have read on YouTube's developer blog that Frame packing 3 is all that YouTube is looking for for regular SBS 3D video. GOD gave me that solution as I was prepping for this video! 

Do not fear, both of these lines of code will copy your audio verbatim. This video's scope is for normal SBS3D and there you don't have spatial audio, so it's irrelevant.

And with that, let's do a practical example!

First, you need to download FFMPEG and unzip it to a folder. I recommend you use the Static linking (it just means that each FFMPEG tool is it's own EXE in the Lib folder where you unzip it). Whether you use 64-bit or 32-bit doesn't matter for metadata. I'll be using the 32-bit version already unzipped, just because I already have an input video in that folder (I have a few versions on my PC, because I suspected that the version was the problem for MP4, hahaha).

The best is to copy your video to the same folder as your FFMPEG.exe file, which is the one we're in now (and make sure it's named the same as the input video section of the FFMPEG code or change the code to the correct file name - spelling matters).

Now, press Ctrl+Shift and right-click in an open space in the folder. You'll see it says Open Command Window here. This means that you can simply copy and paste the code into the command window and hit enter.

Once that is done, like now, you'll see you have a copy of the video and it's named Output (or whatever you changed it to) and that is the file you upload like you would any other video. Custom thumbnails, description, video title, etc. The 3D part is handled by YouTube under the hood.


GOD is so great!

And that's it!

I hope you guys found this super helpful and that you don't feel like screaming anymore! haha.

Now get out there and load those coffee cans with the right instructions! hahaha.

Biggest thanx to GOD for helping me with this. Without HIM, none of this would be possible! :D

Know JESUS yet?
http://www.crossallegiance.org/knowJesus.html

Have a great one!!!

Thank YOU!!!!!!

In : Tutorials 


Tags: god  jesus  holy spirit  blender  anime  progress  3d  exodus  kjv  moses  metadata  uploading  3d video  side by side  how to  tutorial 
Social
(+27) 073 104 2834   |   marius.oberholster@gmail.com   |   Contact

Make a free website with Yola