Take VR ready photos with your current phone and publish them to social media
My sister convinced me to take a vacation with her to Myanmar. The country begun to open it’s borders in 2012 and the people was relatively new to tourists. We toured all over the country and realized that many of the locations we were visiting were just opening up and that most of the tourist were native burmese. I always liked the idea that Marriot had deployed for trying to capture the experience of being somewhere via VR and realized my phone could do it too as a photosphere.

PhotoSpheres
Stock android comes with a camera app that allows you to capture a photograph in the format of a google street views by moving your phone and taking individual photos and then stitching them together.
I couldn’t quite share the google maps embed as well as I’d like and I thought it would be to try out the youtube360 + cardboard option and facebook’s facebook360. Unfortunately both only supports videos, not still images. Fortunately there is a robust video encoding toolset with great command line options.
FFMPEG
First a little disclaimer: I did this on windows 10. I’m sure if you are already command line savvy already on a unix based system. The only configuration I had to do was manually edit the path environment variable. In case you aren’t sure or just need a refresher you can also follow this tutorial which goes step by step. Copy the photospheres onto your PC as you would any photograph. Access it as external storage, go to DCIM/ and look around. Then by looking around on stack overflow I found this answer which was exactly what I needed.

-i is the input file — PANO_20160223_120116.JPG
-c is the video codec — h.264
-t is the duration — 5 seconds
the last argument is the destination path for the video
Once the command is sent give it some time to churn through and if all goes well it should look something like this:

Adding the 360 Metadata
We have a video ! That’s so cool. But if we try and upload it to youtube360 or facebook360 it will just look like a warped video. Google has a support page where you can download an app that will add this metadata for you, or there’s python script but the app is very easy to use.

It’s that simple. Select your file choose to add Spherical projection and then his the save as button, it will automatically create a new filename similar to the original file path. That video file can be uploaded to youtube360 of facebook360 and it should be displayed in their native player. I might end up writing a little node app to do this as well if so I’ll post a follow up.