1

As I have no previous knowledge of video editing, I'm still struggling to get ffmpeg to work as I need.

I need to resize a video of any size and any aspect ratio to height a of 960px, then crop both sides to get a square of 960x960 where the original image would be centered. And now the tricky part for me, I need to duplicate this square, so they would be side by side as single output video of 1920 x 960 pixels.

It's not supposed to be 3D, only cardboard friendly.

visual explanation

2

Use

ffmpeg -i video.mp4 -filter_complex \
       "[0]scale=iw*sar:ih,setsar=1,scale=-1:960,crop=960:960,split[left][right]; \
        [left][right]hstack[sbs]"  -map "[sbs]" -map 0:a? out.mp4
  • Perfect. Thank you. You might want to fix the typo though. You missed a '=' after scale command. – Saix May 22 '16 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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