<p>For anyone else looking for this, I think that I have worked it out.</p>
<p>You need to change the frame numbers of the incoming sources before they are combined:</p>
<p><code>ffmpeg -i TriMotion.ts -framerate 50 -filter_complex &quot;[0]crop=1920:1080:0:0,setpts=(PTS*3)-2[v1];[0]crop=1920:1080:1920:0,setpts=(PTS*3)-1[v2];[0]crop=1920:1080:0:1080,setpts=(PTS*3)[v3];[v1][v2][v3] interleave=nb_inputs=3&quot;  -c:v libx265 out.mov</code></p>
<p>This command sets the frame numbers in increments of 3 before the interleave filter combines them.</p>

CC BY-SA 4.0
2024-01-25T11:57:33.727Z
2024-01-25T11:58:31.460Z
2024-01-25T11:58:31.460Z
openelectron
<p>I have a 4K 50fps video file that is split into 4 quadrants (only 3 are needed). It is generated by a slow motion camera running at 150 FPS. Each of the quadrants contains the same image shifted by a frame.</p>
<p>I want to cut out the 3 sections of the picture, take a frame from each image and insert them sequentially. This will result in a 1920x1080 50FPS clip 3 times a long as the original, but the motion in the picture will run slower.</p>
<p>I know how to cut the sections from the image, but I'm struggling to find a filter to insert the frames sequentially.</p>
<p><code>ffmpeg -i TriMotion.ts -filter:v &quot;crop=1920:1080:0:0&quot; out.mp4</code></p>
<p><code>ffmpeg -i TriMotion.ts -filter:v &quot;crop=1920:1080:1920:0&quot; out.mp4</code></p>
<p><code>ffmpeg -i TriMotion.ts -filter:v &quot;crop=1920:1080:0:1080&quot; out.mp4</code></p>
<p>I have tried the following, but the output is normal speed;</p>
<p><code>ffmpeg -i TriMotion.ts -filter_complex &quot;[0]crop=1920:1080:0:0[v1];[0]crop=1920:1080:1920:0[v2];[0]crop=1920:1080:0:1080[v3];[v1][v2][v3] interleave=nb_inputs=3&quot;  -c:v libx265 out.mov</code></p>

<ffmpeg><video><slowmotion>
How to insert alternate frames from multipule video sources to create a single output file using ffmpeg
openelectron
# How to insert alternate frames from multipule video sources to create a single output file using ffmpeg

(Asked by: username_0 on 2024-01-23)

I have a 4K 50fps video file that is split into 4 quadrants (only 3 are needed). It is generated by a slow motion camera running at 150 FPS. Each of the quadrants contains the same image shifted by a frame.

I want to cut out the 3 sections of the picture, take a frame from each image and insert them sequentially. This will result in a 1920x1080 50FPS clip 3 times a long as the original, but the motion in the picture will run slower.

I know how to cut the sections from the image, but I'm struggling to find a filter to insert the frames sequentially.

`ffmpeg -i TriMotion.ts -filter:v "crop=1920:1080:0:0" out.mp4`

`ffmpeg -i TriMotion.ts -filter:v "crop=1920:1080:1920:0" out.mp4`

`ffmpeg -i TriMotion.ts -filter:v "crop=1920:1080:0:1080" out.mp4`

I have tried the following, but the output is normal speed;

`ffmpeg -i TriMotion.ts -filter_complex "[0]crop=1920:1080:0:0[v1];[0]crop=1920:1080:1920:0[v2];[0]crop=1920:1080:0:1080[v3];[v1][v2][v3] interleave=nb_inputs=3" -c:v libx265 out.mov`

**Tags:** ffmpeg, video, slowmotion


---

## 1 answers

### Answer by username_0 on 2024-01-25. Score: 0

For anyone else looking for this, I think that I have worked it out.

You need to change the frame numbers of the incoming sources before they are combined:

`ffmpeg -i TriMotion.ts -framerate 50 -filter_complex "[0]crop=1920:1080:0:0,setpts=(PTS*3)-2[v1];[0]crop=1920:1080:1920:0,setpts=(PTS*3)-1[v2];[0]crop=1920:1080:0:1080,setpts=(PTS*3)[v3];[v1][v2][v3] interleave=nb_inputs=3" -c:v libx265 out.mov`

This command sets the frame numbers in increments of 3 before the interleave filter combines them.


---

