<p>I have tried it on the colab, plz check if
<a href="https://colab.research.google.com/gist/xer-rex/90c426cd7dbdfd4ec3330a7c3b46f98f/sidebyside.ipynb" rel="nofollow noreferrer">https://colab.research.google.com/gist/xer-rex/90c426cd7dbdfd4ec3330a7c3b46f98f/sidebyside.ipynb</a> helps?</p>

CC BY-SA 4.0
2020-08-12T03:35:39.607Z
Many thanks for your suggestion which looks very interesting. Unfortunately I have no knowledge of Python and can only use ffmpeg using the terminal
Ben Hardy
CC BY-SA 4.0
2020-08-12T23:12:43.287Z
My suggestion on colab has nothing to do with Python, i treat it as a Linux terminal, as you see i did !ffmpeg with exclamation mark at front, i can do !ls, !cp, !rm, ...
xer-rex
CC BY-SA 4.0
2020-08-13T06:59:08.530Z
thanks for your response. Sorry, this is a big learning curve! I tried your code substituting my video files and starting with "ffmpeg" not "iffmpeg" but received this message:  
_At least one output file must be specified
zsh: command not found: -filter_complex_  
I assume there will be many formatting issues because I am using ffmpeg on a mac terminal?
Ben Hardy
CC BY-SA 4.0
2020-08-13T11:11:11.767Z
I think it's just the matter of ffmpeg version on colab it uses 

ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
xer-rex
CC BY-SA 4.0
2020-08-10T11:22:42.987Z
2020-08-10T11:22:42.987Z
xer-rex
<p>trying to create a 4x2 grid from 8 videos using the terminal on a mac. The code I am using is not working:<br /></p>
<p><code>ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -i input6.mov -i input7.mov -filter_complex &quot;[0:v][1:v][2:v][3:v] [4:v] [5:v][6:v][7:v] xstack=inputs=8:layout=0_0|0_h0|w0_0|w0_h0|w0+w1_0|w0+w1_h0|w0+w1+w2_0|w0+w1+w2_h0[v]” -map &quot;[v]&quot; 4x2grid.mp4</code><br />
Any ideas? I'm using ffmpeg version 4.3.1. And the error message is: <br /> <em>dquote&gt;</em> <br />
Not sure why this is. I am relatively new to ffmpeg but can successfully create a 3x2 grid using the following code without the same message: <br />
<code>ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -filter_complex &quot;[0:v][1:v][2:v][3:v] [4:v] [5:v] xstack=inputs=6:layout=0_0|w0_0|0_h0|w0_h0|w0+w3_0|w0+w3_h0[v]&quot; -map &quot;[v]&quot; 3x2grid.mp4</code><br />
I have also tried various other possibilities including the following code but with the same result: <br />
<code>ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -i input6.mov -i input7.mov -filter_complex &quot;[0:v][1:v][2:v][3:v][4:v][5:v][6:v][7:v] xstack=inputs=8:layout=0_0|w0_0|0_h0|w0_h0|w0+w3_0|w0+w3_h0|w0+w3+w4_0|w0+w3+w4_h0[v]” -map &quot;[v]&quot; 4x2grid.mp4</code><br />
Although I have tried to read the explanation here: <br />
<a href="http://ffmpeg.org/ffmpeg-all.html#xstack" rel="nofollow noreferrer">http://ffmpeg.org/ffmpeg-all.html#xstack</a> <br />
I am not sure I fully understand how to specify the desired layout configuration.</p>

CC BY-SA 4.0
2020-08-12T03:33:33.310Z
Hi, thanks for your response. I've tried to answer your questions and added a greater explanation of the problem and the solutions I've tried. Hope it's clearer. I'm not sure what you mean by ffmpeg command output? Do you mean desired output. If so that is outputting the finished video as an .mp4
Ben Hardy
CC BY-SA 4.0
2020-08-13T06:12:13.530Z
@Paul Thanks for your response. Not sure how I find the error message output of ffmpeg? When I try the code discussed above using terminal in Mac OS 10.14.6 I receive the message "dquote" which I gather means I've executed a line of code with only one double-quote character. However as I mention I can create a 3x2 grid using a similar format:  
```ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -filter_complex "[0:v][1:v][2:v][3:v] [4:v] [5:v] xstack=inputs=6:layout=0_0|w0_0|0_h0|w0_h0|w0+w3_0|w0+w3_h0[v]" -map "[v]" 3x2grid.mp4```
Ben Hardy
CC BY-SA 4.0
2020-08-14T11:28:52.970Z
That's possible. will have a look at the link. Many thanks
Ben Hardy
<video><ffmpeg><video-editor><codec><transcoding>
Create 4x2 grid mosaic
Ben Hardy
# Create 4x2 grid mosaic

(Asked by: username_0 on 2020-08-10)

trying to create a 4x2 grid from 8 videos using the terminal on a mac. The code I am using is not working:

`ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -i input6.mov -i input7.mov -filter_complex "[0:v][1:v][2:v][3:v] [4:v] [5:v][6:v][7:v] xstack=inputs=8:layout=0_0|0_h0|w0_0|w0_h0|w0+w1_0|w0+w1_h0|w0+w1+w2_0|w0+w1+w2_h0[v]” -map "[v]" 4x2grid.mp4`  
Any ideas? I'm using ffmpeg version 4.3.1. And the error message is:   
 *dquote>*   
Not sure why this is. I am relatively new to ffmpeg but can successfully create a 3x2 grid using the following code without the same message:   
`ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -filter_complex "[0:v][1:v][2:v][3:v] [4:v] [5:v] xstack=inputs=6:layout=0_0|w0_0|0_h0|w0_h0|w0+w3_0|w0+w3_h0[v]" -map "[v]" 3x2grid.mp4`  
I have also tried various other possibilities including the following code but with the same result:   
`ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -i input6.mov -i input7.mov -filter_complex "[0:v][1:v][2:v][3:v][4:v][5:v][6:v][7:v] xstack=inputs=8:layout=0_0|w0_0|0_h0|w0_h0|w0+w3_0|w0+w3_h0|w0+w3+w4_0|w0+w3+w4_h0[v]” -map "[v]" 4x2grid.mp4`  
Although I have tried to read the explanation here:   
<http://ffmpeg.org/ffmpeg-all.html#xstack>   
I am not sure I fully understand how to specify the desired layout configuration.

**Tags:** video, ffmpeg, video-editor, codec, transcoding

> **Comments:**
> **username_0**: Hi, thanks for your response. I've tried to answer your questions and added a greater explanation of the problem and the solutions I've tried. Hope it's clearer. I'm not sure what you mean by ffmpeg command output? Do you mean desired output. If so that is outputting the finished video as an .mp4  
> **username_0**: @Paul Thanks for your response. Not sure how I find the error message output of ffmpeg? When I try the code discussed above using terminal in Mac OS 10.14.6 I receive the message "dquote" which I gather means I've executed a line of code with only one double-quote character. However as I mention I can create a 3x2 grid using a similar format:   ```ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -i input4.mov -i input5.mov -filter_complex "[0:v][1:v][2:v][3:v] [4:v] [5:v] xstack=inputs=6:layout=0_0|w0_0|0_h0|w0_h0|w0+w3_0|w0+w3_h0[v]" -map "[v]" 3x2grid.mp4```  
> **username_0**: That's possible. will have a look at the link. Many thanks  

---

## 1 answers

### Answer by username_1 on 2020-08-10. Score: 0

I have tried it on the colab, plz check if
<https://colab.research.google.com/gist/username_1/90c426cd7dbdfd4ec3330a7c3b46f98f/sidebyside.ipynb> helps?

> **Comments:**
> **username_0**: Many thanks for your suggestion which looks very interesting. Unfortunately I have no knowledge of Python and can only use ffmpeg using the terminal  
> **username_1**: My suggestion on colab has nothing to do with Python, i treat it as a Linux terminal, as you see i did !ffmpeg with exclamation mark at front, i can do !ls, !cp, !rm, ...  
> **username_0**: thanks for your response. Sorry, this is a big learning curve! I tried your code substituting my video files and starting with "ffmpeg" not "iffmpeg" but received this message:   _At least one output file must be specified zsh: command not found: -filter_complex_   I assume there will be many formatting issues because I am using ffmpeg on a mac terminal?  
> **username_1**: I think it's just the matter of ffmpeg version on colab it uses   ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers  

---

