I have mp4 SBS 180 VR videos made for Oculus Rift. I'd like to crop the videos a little (simulate the zoom) and then downscale to "cardboard" resolution so it would be smoothly playable on mobile devices.

Some mobile players have already zoom function built in, but this should work as a workaround for keeping the picture sharp (working down from the big resolution) at the expanse of FOV.

Pretty soon I realized I can't simply crop the whole video. I have to crop both sides separately and then join them together as they were.

Could you point me to video-editing software (preferably free and fast to learn) that would allow me to do such thing?

enter image description here

  • Can you post a screenshot of a single frame - both full and how you'd like it cropped and altered?
    – Gyan
    Commented May 14, 2016 at 17:15
  • @Mulvya I'm affraid I can't, so I decided to google for example. Yet I couldn't find a single screenshot sample that would fit my video, except adult ones. After a while a find a sample, that I hope should be considered rated E for everyone. But as you were asking for the final crop sample I realized it can't be cropped as a rectangle. It would have to maintain this elliptical shape. There would be a specific app for this purpose needed, I guess. i0.wp.com/rack.2.mshcdn.com/media/…
    – Saix
    Commented May 14, 2016 at 19:21
  • The frame will remain rectangular, but if the visuals have to be cut in an elliptical shape, that can be taken care of.
    – Gyan
    Commented May 14, 2016 at 20:17
  • @Mulvya Glad to hear it. Any way I could have done it without expensive tools?
    – Saix
    Commented May 14, 2016 at 20:24
  • Yeah, ffmpeg is my candidate. But to confirm what I have in mind, can you point me to a file?
    – Gyan
    Commented May 14, 2016 at 20:30

1 Answer 1


Using the mask image below, you can use ffmpeg to crop and output a MP4 with the visual content bounded in the same elliptical shape as the mask

ffmpeg -i input.mp4 -loop 1 -i 360mask.png \
       -filter_complex "[0]split[a][b]; \
        [a]crop=iw/2:1522:0:300,crop=iw*0.8:ih*0.8,scale=960:-1,pad=960:960:0:150[l]; \
        [b]crop=iw/2:1522:iw/2:300,crop=iw*0.8:ih*0.8,scale=960:-1,pad=960:960:0:150[r]; \
        [l][r]hstack[c]; [c][1]alphamerge[ca]; [1][ca]overlay=shortest=1"    vr.mp4

The video is split into two cropped halves to a rectangle which exactly bounds the visual area, then cropped to 80% along each of its dimensions, and then scaled and padded to a 960x960 canvas, rejoined to form a 1920x960 frame. Then the mask is applied to form the elliptical cut-out.


enter image description here

This is the basic technique. The visuals in your supplied image aren't centered, so I customized the crop expressions based on measurements within an image editor.

  • Thank you, that solves the elliptical shape, but the original obstacle remains. "I have to crop both sides separately and then join them together as they were." Please see the image I have added to my question. Fo the last part of your answer: I'm not sure what you mean but you probably referring to shift caused by 3D (each side is supposed to be a little different).
    – Saix
    Commented May 15, 2016 at 11:21
  • I'll update the command later for the split and crop method.
    – Gyan
    Commented May 15, 2016 at 11:33
  • Command updated for your given sample.
    – Gyan
    Commented May 18, 2016 at 13:41
  • Thank you! Works like a charm. Without previous experience with ffmpeg on this level I wouldn't come up with something like that.
    – Saix
    Commented May 18, 2016 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.