Vargol / spatial-media

Specifications and tools for 360º video and spatial audio. Modified for Google's VR180
56 stars 11 forks source link

Can the Aspect Ratio be modified to 1:1 instead of 16:9? #13

Open petermg opened 6 months ago

petermg commented 6 months ago

This metadata injector works AMAZINGLY WELL for my 3D SBS 16:9 videos (32:9 2D). However I have some that are needing to be played back at 1:1 aspect ratio. Is it possible to modify this app so that I can select the 1:1 aspect ratio for those files? Examples are when I record PC VR videos on my PC, I record them at 3840 x 1080 FULL SBS. So when using this to inject the metadata it works perfectly and they play back in YouTubeVR in 16:9.

However I have other videos that I record on my Quest directly and it always forces 1:1 aspect regardless of resolution. So I have to play those video files back at 1:1. But when I use this app to inject metadata into those, they play back in the wrong aspect ratio in YouTubeVR, they play back at 16:9 aspect ratio instead of 1:1. It would be great, if possible, to have an option between 16:9 and 1:1 aspect ratio for the metadata.

Vargol commented 6 months ago

If you're using the command line you should be able to use the -v or --view arguments. e.g. -v 1x1

If you're using GUI you would need to change the code in spatialmedia/gui.py around line 184

        if spherical == "full-frame" :
            metadata.fov = [16.0, 9.0]

change it too

        if spherical == "full-frame" :
            metadata.fov = [1.0, 1.0]
petermg commented 6 months ago

Thank you! I will try this, both methods!

petermg commented 6 months ago

If you're using the command line you should be able to use the -v or --view arguments. e.g. -v 1x1

If you're using GUI you would need to change the code in spatialmedia/gui.py around line 184

        if spherical == "full-frame" :
            metadata.fov = [16.0, 9.0]

change it too

        if spherical == "full-frame" :
            metadata.fov = [1.0, 1.0]

This worked PERFECTLY!!! TYSM!!! I forked this and posted it as a Windows binary that I compiled! https://github.com/petermg/spatial-media/releases/tag/binary I did NOT modify any of the code. It's command line ONLY for the binary.

petermg commented 6 months ago

Ok I actually just also modified the GUI to have the options of not just 16:9 but also 1:1, and 4:3. Tested it and it works! Binary posted at same link as above. image