Code Monkey home page Code Monkey logo

Comments (7)

evgenykuzyakov avatar evgenykuzyakov commented on June 29, 2024 2

I've added an option to specify different input_layout. You can now pass cubemap_32 in the input_layout and equirect as an output_layout. It'll generate an equirect from the cubemap_32 layout.
It doesn't let you use multiple videos. But if you combine them into single cubemap_32 layout then you can get the equirect output. Depending on what expansion around the faces you use, you may want to specify the input_expand_coef. If you don't use any expansion around the edges of each face, then specify input_expand_coef=1.0

Example command to run reverse cubemap_32 to equirectangular format is:

ffmpeg -i input.mp4 -vf transform360=input_layout=cubemap_32:input_expand_coef=1.0:output_layout=equirect:w=2048:h=1024 -c:v libx264 -preset veryfast -crf 10 -threads 0 -c:a copy output.mp4

from transform360.

evgenykuzyakov avatar evgenykuzyakov commented on June 29, 2024 1

You probably can use complex filter to merge 6 images into 1 and then chain transform filter with it. Example of complex filters: https://github.com/nwochaadim/ffmpeg-installation/wiki/Applying-complex-filters-to-videos

from transform360.

kcircnc avatar kcircnc commented on June 29, 2024

Equirect -> cubemap is a lossy transformation, as the resolution of the former is higher than the latter. This implies that a cubmap -> equirect transform would not be possible without interpolation which will degrade the image quality.

from transform360.

jo-chemla avatar jo-chemla commented on June 29, 2024

That's right, but one might adjust the resolution of the cubemap to ensure the equirect at desired resolution will not be affected too much by interpolation. Let say I want a 4k equirect (about 2160p), I would produce a cubemap with each face side having 2048px - or the correct amount so that the interpolation does not affect too much the result.

from transform360.

jo-chemla avatar jo-chemla commented on June 29, 2024

thanks a lot! would be very helpful to be able to provide six input sequences - 6 images for each frame of the 360 sequence, the naming to be defined by ffmpeg if images are given in determined order (first input is front, second is left, ...), but I imagine it will require more work. Nice addition!

from transform360.

JaiiRLopeZ avatar JaiiRLopeZ commented on June 29, 2024

@evgenykuzyakov @jo-chemla @kcircnc Do you know to change the order of the faces cubemap?

from transform360.

rodrigopolo avatar rodrigopolo commented on June 29, 2024

How about YouTube's cube map to equirectangular?

from transform360.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.