I’ve long been interested in 360 panoramic photos and videos and being a patient tech consumer, I was fortunate to get the 2016 Gear 360 camera for the low price of £80 shipped; 22% of the original launch price of £350.
Additionally, I wrote a simple 360 web viewer, so I can use any image host (e.g. Imgur, Dropbox, etc.) and not be tied to a specific online platform like Kuula.
Images
You will have to install Hugin manually rather than via brew cask install hugin
as the cask formula usually is out of date with the official releases. Go here to find the latest binaries: https://sourceforge.net/projects/hugin/files/latest/download
Once installed, clone this project https://github.com/ultramango/gear360pano. Now you can use the HuginStitchProject tool installed as part of the Hugin package to use the template files gear360sm-c200.pto
(if using the Gear 360 SM-C200 camera) to stitch your dual fish eye photos together to form a spherical 360 photo.
- Open the HuginStitchProject app
- Select the PTO file
- You will be prompted to enter the name of the output JPEG file.
Note: You can either edit the PTO file and change references to “dummy.jpg” to “your_input_filename.jpg” or simply rename your input file to “dummy.jpg”.
Uploading to Facebook
You can use exiftool
to add metadata so Facebook (and possibly more social media in the future) can recognize the image and use the appropriate viewer on the platform.
# Install exiftool
brew install exiftool
exiftool -ProjectionType="equirectangular" photo.jpg
# 'photo.jpg' is the photo you want to tag
Video
Haven’t figure out a way to get multiblend to compile on OSX so we’ll have to use an alternative projection tool.
We can use this tool to roughly convert a 360 video https://github.com/raboof/dualfisheye2equirectangular
Follow the instructions to compile
gcc -o projection projection.c -lm
and then ensure that the command to generate the mapping file is taking the correct dimensions of the video input.
e.g. If the MP4 files are in total 2560x1280 then the command would be ./projection -x xmap_dokicam_video.pgm -y ymap_dokicam_video.pgm -h 1280 -w 2560 -r 1280 -c 2560 -b 35 -m samsung_gear_360
vs the example given in the project instructions
Use ffmpeg (install via brew install ffmpeg
) to convert your video file:
ffmpeg -i movie.mp4 -i xmap_dokicam_video.pgm -i ymap_dokicam_video.pgm -filter_complex remap out.mp4
Uploading to YouTube
If uploading to YouTube, use Google’s SpatialMedia metadata injector tool to allow YT to identify the upload as a spherical (equirectangular) 360 video. https://github.com/google/spatial-media/releases
Useful code + apps
-
Modified Samsung Gear 360 Manager APK to work on all Android devices
-
The Gear 360 uses the Accessory Devices Bluetooth protocol to talk to paired phones