How to crop specific segments of a video while maintaining original resolution in other parts?

Hello,

I have an original video 1280 x 720
I want to edit it and crop some part of the video (but not the whole video with the same crop area)
I want to keep the other parts of the video with the original stream and without any crop (1280 x720)

I am using the filter “crop: rectangle”

So I would like to process and save the whole video with this inside:
Original video from 0 min to 1min24 (original resolution 1280 x720)
Then crop image from 1min24 to 1min40 (I would like to crop this part and increase the size of the cropped area in order to match the original resolution in the saved video, and avoid the black stripes)
Then keep Original video from 1min40 to 1min52 (original resolution 1280 x720)
Then crop image from 1min52 to 2min15 (I would like to crop this part and increase the size of the cropped area in order to match the original resolution in the saved video, and avoid the black stripes)
Then Original video from 2min15 to the end of the video

Also, how can I keep the 1280 x 720 aspect ratio for the cropped area rectangle ?

Original video size:

Then crop and enlarge the cropped video to fit the original video size:

Then crop and enlarge the cropped video to fit the original video size:

Thanks for your help :slight_smile:

If I understand you correctly, on the crop sections you are going to need to add a size, position, and rotate (SPR) filter to enlarge them back to something closer to 1280x720. But crop shouldn’t be becessary at all since you want them to fill the entire window.

If your crop ratio isn’t perfect that shouldn’t matter as long as it is close, then when you resize back up it might end up being something bigger that more than fills the entire window - for instance, 1280x735, which shouldn’t matter much since you can adjust the position on screen. If that really is important, then you need to set the physical dimensions of your crop in the width and height parameters so they are at the same 16:9 ratio, and then when you add the SPR filter and size it back up it will end up being exactly (or almost exactly) 1280x720.

For instance, if a crop has a width of 980 then you will need to set the height to 551. Even that isn’t pixel perfect since it should be 551.25, so when you upscale you would need to set the short side - in this case the height - to 720, and then the width will be automatically set at 1281. If your crop is slightly off the other way, then you set the width to 1280 and the height would be auto set to something slightly greater than 720.

If you don’t like math then use this site to get your numbers:

However, having said all that, since you want the crop to fill the entire screen by making it larger, you shouldn’t need crop at all. Just the SPR added so the correct section is enlarged is all you need.

Also, you will need to split your video at the start and end of the sections (e.g. 1min52 to 2min15) where you want to crop/enlarge so the filters applied to those don’t affect the other parts of your video.

If you don’t know about splitting or SPRs then it would pay you to take a moment to go over the basic tutorials found here:

HTH.