How to use ffmpeg to add 3D metadata to a SBS Full Frame video without reencoding?

1

Ok so, I've been searching around for how to do this, but I've had no luck.

I have an SBS Full Frame 3D MP4 that is 648x720p per eye (1296x720p "raw" resolution). I want to use ffmpeg to add metadata to it so YouTube will accept it as a 3D video, with the 3D option in the cog menu and all. I also want to do this without re-encoding. All of the tutorials I found either re-encode the video (bad!) or make YouTube treat it as an SBS Half Frame video (wrong!).

Answer with a full command. Please, no flags on their own or just saying to "look in this .h file for this flag and add it to the command" (I DON'T know how to do that!). Sorry, but I just want to quickly make a .dll for this and forget about how it works.

Thank you in advance!

dan9er

Posted 2018-07-08T18:52:09.557

Reputation: 11

Answers

0

Use

ffmpeg -i in.mp4 -map 0 -c copy -metadata:s:v stereo_mode=left_right out.mkv

Once you have this MKV, you can upload that or run

ffmpeg -i out.mkv -map 0 -c copy -strict -1 out.mp4

Gyan

Posted 2018-07-08T18:52:09.557

Reputation: 21 016

I've just tested it, and these commands are for SBS Half Frame. I know this because when I upload the file to Youtube, the output is stretched horizontally: https://youtu.be/ZEgFnvJDkyE I need SBS FULL Frame so that the YouTube video is 9:10, not 9:5.

– dan9er – 2018-07-09T20:52:20.670

Share log of ffmpeg -i out.mp4 – Gyan – 2018-07-10T05:19:17.820

https://hastebin.com/enopufolor.pas – dan9er – 2018-07-10T20:58:11.937

I've found a list of values that stereo_mode can have: http://www.ffmpeg-archive.org/How-to-identify-a-video-is-3D-td3857078.html#a3859091 Maybe we can find a workaround by using some other value than left_right.

– dan9er – 2018-07-14T00:15:24.450

Do you have a sample of a full SBS video, recognized as such by YT or other players? – Gyan – 2018-07-14T05:06:50.177

No, I do not. I heard in the past you could get around this by putting yt3d:aspect=x:x in the video tags to force an aspect ratio, but I tested it and it no longer works. – dan9er – 2018-07-14T18:03:06.797

You can add -aspect 1:2 and try. – Gyan – 2018-07-14T19:51:45.723

I tried ffmpeg -i %file%.mp4 -map 0 -c copy -aspect 9:10 -metadata:s:v stereo_mode=left_right temp.mkv (without modifying the second command), and that just turned it into an SBS Half Frame video. If YouTube really doesn't support Full Frame SBS, then I'm fine with Half Frame. It's just the loss of quality (pixels are 2:1) that bugs me. – dan9er – 2018-07-15T21:08:12.857