I want to convert 360 videos from equirectangular to cubic projection. How can I do this with ffmpeg? What are other efficient open source approaches?
Use native FFmpeg v360 filter, it supports more features that any other solution.
You need the v360 filter (make sure you use the latest ffmpeg build as older versions don't include it).
For instance:
-vf v360=equirect:c3x2
3x2/6x1/1x6 cubemap layouts are available.
You can try out by compiling with the transform filter, developed by Facebook
Transform is a video filter that transforms 360 video in equirectangular projection into a cubemap projection
Build Instructions:
Transform is implemented as an ffmpeg video filter. To build Transform, follow these steps:
Checkout the source for ffmpeg
Copy vf_transform.c to the libavfilter subdirectory in ffmpeg source
Edit libavfilter/allfilters.c and register the filter by adding the line: REGISTER_FILTER(TRANSFORM, transform, vf); in the video filter registration section
Edit libavfilter/Makefile and add the filter to adding the line: OBJS-$(CONFIG_TRANSFORM_FILTER) += vf_transform.o in the filter section
Configure and build ffmpeg as usual
© 2022 - 2024 — McMap. All rights reserved.