0

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

1 Answer 1

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.

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.