How can I use ffmpeg to change 360 video projection?
Asked Answered
B

3

7

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?

Bainmarie answered 29/1, 2016 at 19:9 Comment(0)
F
5

Use native FFmpeg v360 filter, it supports more features that any other solution.

Fictional answered 22/8, 2019 at 9:17 Comment(1)
answer without explanation is not an answer, is just an invitation to do by yourself.Ablation
P
5

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.

Plater answered 27/7, 2020 at 22:55 Comment(0)
B
4

You can try out by compiling with the transform filter, developed by Facebook

Transform

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

Burrussburry answered 1/2, 2016 at 7:14 Comment(1)
Works very well, thanks for pointing out this recent ressource. I haven't found yet how to make it work with OSX brew workflow but it's super easy to get running on LinuxBainmarie

© 2022 - 2024 — McMap. All rights reserved.