A tool that converts distorted 360° video into a single video made by stitching together six square videos. I built it for macOS in Swift. The tool splits the video into image frames, then uses trigonometric calculations to determine which pixel in the distorted source corresponds to each pixel in the flat output.
Overview
I built a tool that converts 360° video into flat video.
When a distorted 360° video is loaded and the output resolution is selected, pressing Convert splits each frame into an image and converts the 360° video into six 90° views. The six square videos are then stitched together and exported as a single video.
After converting the frames into images, the tool uses atan to determine which source pixel corresponds to each output pixel.
I decided to create this program because 360° video formats can use storage inefficiently due to the way the top and bottom portions are stretched.