Export Resolution same as cropped, source video

Hi,

I want to add video to timeline, crop it and export it with the resolution as the cropped image. How to do that?

I can only set the export resolution by hand, which is really inconvenient. To do this, I need to find out the resolution of the source image, then substract cropping border values, and then set the result as export resolution.

2 Likes

I have the same need and I can’t… quite… figure out how to do it in shotcut.

I want to take an existing video, crop it, and export it at exactly the cropped size. Basically exactly what this page does: https://ezgif.com/crop-video

Select an area, press crop, and :boom: bam I have a video of just that smaller cropped area.

I figured out how to add and use the crop filter thanks to this forum, but no matter how I export the final video I get crazy results. :frowning:

1 Like

Shotcut does not have a simple cropping function like that as it is designed for working with multiple sources each with possibly many different sizes/resolutions. There are other tools that are designed for single files like converters that do that. Shotcut works like a desktop publishing program with a page size or a drawing program with a canvas size. But, you can accomplish it. After you determine the final size you want you need to use Settings > Video Mode > Custom> Add… to change the canvas size and then Crop.

Given the way it works, it is not easy to determine the output size by cropping within Shotcut. Instead, you can open the video file in Shotcut, choose File > Export Frame…, open the frame in an image editor to determine the output size, use Video Mode > Custom > Add… in Shotcut, re-open the clip, add the Crop filter, adjust, and Export. You might find the “Center” and “Center bias” options of the Crop filter handy in this workflow.

I realize this is a common need, and I will move this topic to the Suggestions category with the hope to make it more convenient in some future version.

2 Likes

Hello,
Is this function now present in shotcut ?
I need to produce a 1400 x 400 px video from a standard 1920 x 1080 one.
It is easy to cropp it with the appropriate filter, but then, how to export this cropped video ?
For now, the output I got is a wide black screen with my litlle crop inside. :frowning:
Thanks for your help.

3 Likes

I think that this feature already exists, at least in the capacity that I have used it.

If you double click the clip you wish to crop in the playlist tab, you will open it up into the preview pane. You can tell this is the case because the “source” tab will be selected instead of the “project” tab. With the clip selected in this way, from the playlist and not the project timeline, you can use the preview pane to seek to the section of clip to crop. You can then use the “filters” tab to add “Crop: Source” (the other crop modes will not work for this purpose) and adjust the position bars to clip the video. Again, it is critical that you are adding this filter to the source clip and not a timeline instance.

Now, before adding the clip from the playlist to the timeline and while the clip is still selected in the source viewer, select the menu item Settings > Video Mode > Automatic. Even if Automatic is already selected, this should resize the project to the resolution of the cropped source video. After this is done, the cropped video can be added to the timeline for additional editing, such as trimming.

It’s a snappy workflow once you get the hang of it. Works for me as of version 20.04.12

5 Likes

Wow! You are correct. This surprised even me. Nice find. The steps involving Playlist and Timeline somewhat complicate the story, but it can be used for more advanced scenarios. Many users simply want to do this for a single clip:

  1. start with no project
  2. open a clip
  3. add video filter Crop: Source
  4. optionally add other filters and trim as needed
  5. choose Settings > Video Mode > Automatic
  6. click Export (At this point you can see the Video > Resolution in advanced mode has adopted the new resolution.)
  7. now you can either export or add this to Playlist or Timeline to start a project

CAUTION: You must ensure the resulting resolution has even values for both width and height for most video codecs to export. It is even possible that some filters will not work correct either.

It is a nice find but it looks like when you do it once you can’t undo it. If you want to try the cropping again it looks like you’d have to start a new project all over again unless I am missing something.

I’m probably missing a step, but I can’t make this work with 20.04.12.
I tried several times with and without adding a clip to the playlist.
Started with Automatic and 1080p 25fps and 1080 60fps video modes.

Basically, it’s this: If you load a clip into the playlist and choose Settings > Video Mode > Automatic then the Export settings will be reset to that clip’s resolution and fps. You can see test this by throwing in the playlist two clips of different resolutions and choosing Settings > Video Mode > Automatic for each clip. You will keep bouncing between both of those resolutions in the Export menu.

It does seem that this whole thing seems to get messed up if you add anything to the timeline. So the process must be kept in the Source and Playlist without adding anything in the timeline.

If you are only using Source and no playlist or timeline project, there is a bug that after you change video mode nothing with filters works again until you reload the clip. Basically, if you want to try more than once you need to start over from the beginning.
Workarounds for all the pitfalls are left as an exercise for the reader. Hint: copy and paste the filters.

That bug was fixed in version 20.09

I am using the latest version (Shotcut version 20.11.28). And after I set up the View Mode as “Automatic” it messes up what I’ve just cropped, so I have to realign the cropped area again.

My suggestion to make it a simpler task is to add a checkbox at the “Crop: Source” filter to “Set it as new View Mode” (just like we have the checkbox “Center” in that filter). Additionally, it would be a lot easier to crop black bars if the cropping bars had a strong color like green like the filter in Avidemux. P.S. I am not comparing the two open source softwares, both are great and serve different purposes, I am just using their crop filter to illustrate and make a suggestion.

In version 20.09.13 Crop: Source was fixed for the more common usage of Cropping within a project when using proxy scale, and it broke this use case. However, this use case was never intended and only discovered by accident. We need to figure out a different way to support this use case.

1 Like

I have also same situation and no find any solution, so please help us

English is not my first language so sorry for any inaccuracy. Also, no idea about video editing. This is my first program trying to use for this.

I just want to open a video, select the part I want to actually use in the future from the video, crop that part (this means removing everything outside of the selection box) and then save that part with its new resolution according to the selected part, of course. Like you can do in paint with a picture, for example. Can I do that with shotcut program in a simple way?

When trying to crop a video in shotcut, the result is the selected part working normally but everything else (the non-cropped part) just black out. And if a export the video, the result is the same. I have a “cropped” video with the same resolution (??) and a smaller box (the actually cropped part) surrounded by black color spaces.

There are many different ways to accomplish what you are seeking. Many different ways to use filters.

If you have something specific, it might be best to start a help topic of your own and many others will help you accomplish what you wish to do with Shotcut.

I recently had the same misunderstanding of the Crop filter - and I have been speaking English for seven decades.

The Crop filter removes unwanted surrounding material, leaving the image the same size.

What you want requires, in most editors (such as The Gimp image editor, which I use) two steps:

  • Crop Image
  • Scale Image

In Shotcut, this can be done in one step, using the Size, Position, Rotate filter.

Using the SPR filter, It can even be done dynamically, using Keyframes.

There are two excellent tutorial videos on this filter.

and

For Crop:Rectangle and Crop:Circle, this is correct.

1 Like

Thanks for the replies. I couldn’t do it but I already waste the saturday trying to do this so it’s just time to move on. I can say shotcut was the closest program to help me with it. With other programs I couldn’t even get to the “trying to crop the part of the video you actually want” stage.

I clearly went with the wrong mindset, probably spoiled for doing it mindless with pictures in paintnet for years. Open pic, select, crop to selection, save and that’s it. I assumed, clearly wrong, that video should be the same. Open vid, select the actual part of the video you want (in my case, I just wanted the vertical square where a person is doing sign language in some news channels), crop that part, save it and move on. No idea why would I want only a part of the video visible and the rest… as black painted background? But I assume is some sort of effect. At the same time no idea why would I want to zoom-in to a part of the video unless, of course, I explicitely select a zoom related tool. Or why would I wanted to maintain the same resolution while selecting and cropping a smaller part inside a video? If the video is, let’s say, 1920x1080, and the part I selected is something like 260x450 (my ignorance makes me wonder if a resolution like that is possible in a video, I assume yes), I expected the new video to be at the resolution of the cropped part (260x450) and not catastrophically pixel-zoomed adapted at 1920x1080 resolution.

This is just beyond confusing for me and, clearly, I’m not gonna get it since it looks plain unnatural for me. In any case, thanks for the help regardless. I didn’t want to just delete my account without at least thanking the help to try overcome my clumsy attempts at this.