<p>Use</p>

<pre><code>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
</code></pre>

CC BY-SA 3.0
2016-05-22T17:44:07.453Z
Perfect. Thank you. You might want to fix the typo though. You missed a '=' after scale command.
Saix
CC BY-SA 3.0
2016-05-22T17:02:05.650Z
2016-05-22T17:56:50.843Z
2016-05-22T17:56:50.843Z
Gyan
<p>As I have no previous knowledge of video editing, I'm still struggling to get <strong>ffmpeg</strong> to work as I need.</p>

<p>I need to resize <strong>a video of any size and any aspect</strong> 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.</p>

<p>It's not supposed to be 3D, only cardboard friendly.</p>

<p><img src="https://i.sstatic.net/06YZx.jpg" alt="visual explanation"></p>

<ffmpeg>
Resize, crop and SBS duplicate with ffmpeg
Saix
# Resize, crop and SBS duplicate with ffmpeg

(Asked by: username_0 on 2016-05-22)

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](https://i.sstatic.net/06YZx.jpg)

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2016-05-22. Score: 2 | Accepted answer

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

> **Comments:**
> **username_0**: Perfect. Thank you. You might want to fix the typo though. You missed a '=' after scale command.  

---

