Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cross" shaped cubemap layout. Is it possible? #55

Closed
guilovsh opened this issue Feb 2, 2018 · 5 comments
Closed

"Cross" shaped cubemap layout. Is it possible? #55

guilovsh opened this issue Feb 2, 2018 · 5 comments

Comments

@guilovsh
Copy link

guilovsh commented Feb 2, 2018

Is there a way I could output a file with the following layout? I tried a few of the options but couldnt get this specific one:
https://www.keithlantz.net/wp-content/uploads/2011/10/skybox_texture.jpg

Don't know if it matters but my input file is a 4096x2048 equirectangular video.

Thanks!

@kcircnc
Copy link

kcircnc commented Feb 2, 2018

No. But you can pair Transform360 with the native ffmpeg filters (crop/split/overlay) to achieve this.

@guilovsh
Copy link
Author

guilovsh commented Feb 5, 2018

Hmmm... interesting, kcircnc.

Would I be able to run both the transform filter + these cropping,splitting and overlaying operations all at the same time or would you say I have to output the transform360 cubemap std layout and then apply the other filters?

Thanks!

@puffpio
Copy link
Contributor

puffpio commented Feb 5, 2018 via email

@guilovsh
Copy link
Author

guilovsh commented Feb 8, 2018

Thanks guys! Managed to get what I wanted :)

@guilovsh guilovsh closed this as completed Feb 8, 2018
@malDuffin
Copy link

malDuffin commented Dec 12, 2018

For anyone wanting a solution to this, run this on the default cubemap exported from Transform360. I spent a bit of time getting this to work, I'll see about integrating later so that it's a single step.
ffmpeg -i facebook_cubemap.mp4 -filter_complex \ "[0:v]crop=iw/3:ih/2:0:0[topA]; \ [0:v]crop=iw/3:ih/2:ow:0[topB]; \ [0:v]crop=iw/3:ih/2:ow*2:0[topC_crop]; \ [topC_crop]rotate=180*PI/180[topC]; \ color=black:512x512[empty]; \ [empty] split=6[empty1][empty2][empty3][empty4][empty5][empty6]; \ [0:v]crop=iw/3:ih/2:0:oh[bottomA_crop]; \ [bottomA_crop]rotate=180*PI/180[bottomA]; \ [0:v]crop=iw/3:ih/2:ow:oh[bottomB]; \ [0:v]crop=iw/3:ih/2:ow*2:oh[bottomC]; \ [empty1][topC][empty2][empty3]hstack=inputs=4:shortest=1[top_row]; \ [topA][bottomC][topB][bottomB]hstack=inputs=4:shortest=1[middle_row]; \ [empty4][bottomA][empty5][empty6]hstack=inputs=4:shortest=1[bottom_row]; \ [top_row][middle_row][bottom_row]vstack=3[v]" \ -map "[v]" -map 0:a? cross_cubemap.mp4

Note that I just set the [empty] spaces to be 512x512, I did a quick check to see how to define the size of these based on the input width/height but couldn't see anything. I'll try to fix this as well in an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants