360fy – An Open-source 360° Video Creator by Sapnesh Naik

Full Article :

KernalDev - https://www.kerneldev.com/2017/12/10/360fy-an-open-source-360-video-creator-by-sapnesh-naik/

360fy – An Open-source 360° Video Creator:

360fy is an open-source 360° Video creator which converts a video captured from a smartphone camera using a wide angle lens into a 360° video. The application currently works on Linux based distributions (such as Ubuntu, Fedora, Arch etc) and uses open-source libraries at its core and 360fy itself is a fully open-source software and the code is available for your use on my GitHub repository.

What is 360° video?

A 360° camera captures a video in every direction at the same time. The user is able to see all the directions in the video just by moving his mobile phone in that particular direction (using phone’s Gyroscope Sensor) or by panning the screen using mouse if the user is viewing on a desktop computer. 360fy is an affordable(it’s free!) and one of the few open-source 360° video creator software available.

Requirements:

    • A wide-angle lens:  I hacked a wide-angle lens made by Kogeto-dot to fit for my use case (buy on Amazon).

      wide-angle lens

    • Python 2.7 : I chose Python over other OOP based languages due its compatibility with SimpleCV and its superior scripting abilities.
    • SimpleCV 1.3.0: SimpleCV is an open-source Computer Vision framework based upon OpenCV. I chose SimpleCV over OpenCV because of it’s simplicity.
    • PyQt5: PyQt is a GUI widgets toolkit. It is basically a Python interface for Qt and I used PyQt to design and build a GUI for 360fy.
    • libavcodec: libavcodec is also a free and open-source library of codecs for encoding and decoding video and audio. I used this library to encode the final video to h.264 (mp4) format.

Input Video:

open-source 360° video creator - 360fy-input-video
Input video

The input video captured from a smartphone camera using the wide angle lens is the shape of a doughnut. The 360fy software willdewarp this video and add metadata to it. Using which 360° video players can recognise the video and play it back accordingly.

Result: 

The final video can be played back in 360° video players such as GoPro – VR Player or it  can also be uploaded to social media platforms such as YouTube and Facebook.

Usage:

Clone the github repo and launch 360fy application from the application directory.

$./src/fy360.py

 

The 360fy main window has the options to select the input video (Select Video) and output video location (Save As).

open-source 360° video creator - 360fy_main_window
360fy Main Window

 

The main window also contains a Help button through which you can access further documentation.

open-source 360° video creator - 360fy Help window
Help Window

 

When you click the Start button you will be prompted with a note which will ask you to select the centre, the start and end point of the doughnut shaped video.

open-source 360° video creator - 360fy_usage_prompt
Usage prompt

 

You will also get a live preview of the dewarpig process so that you can see the ongoing progress.

open-source 360° video creator - 360fy_live_dewarp_preview
Live preview of the de-warpig process

 

If you want a more verbose information about what is actually happening, take a look at the Terminal output!

open-source 360° video creator - 360fy_command_line_output
Terminal output

 

When the process is finished you will get a Process complete dialog through which you can either open the video itself or choose to navigate to the directory where the video is stored.

open-source 360° video creator - 360fy_process_complete_dialog
Process complete dialog

The spirit of open-source! 

This project is fully open-source and you are free to use this open-source 360° video creator and modify it according your needs! I welcome any pull requests to the project’s GitHub page and I look forward to hearing your thoughts in the comments section below!!

Liked this project? Then you might want to check out my other projects!

The post 360fy – An Open-source 360° Video Creator by Sapnesh Naik appeared first on KernelDev.

Leave a Comment

%d bloggers like this: