What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?
20.10.31 x64
Can you repeat the problem? If so, what are the steps?
I’m having trouble removing letterboxing from a video. Goal is to apply some other filters then export the result at the original resolution, but without the letterboxing. For preservation of maximum detail, I don’t want any re-scaling (1:1 pixels from input to output). When I am editing, SC is giving me a small black band on the bottom of the preview window. When I export with x264 lossless, that black band is covering the bottom 4px of the video.
My source video is 1920x1080 with 130px of padding top and bottom. I set a custom video mode of 1920x820 resolution and 1920x820 aspect ratio, which are the dimensions of the actual content of the video. Size, Position & Rotate filter to set 100% zoom and position it at 0,-130. In theory(?), my content covers the full extents. Actual result, SC is covering up some of the content in both the preview and export.
I made a dummy video to demonstrate. Intentionally ugly color scheme. The letterboxing I want to remove is green (130px top and bottom); the content I want to keep is yellow (1920x820, centered top-to-bottom). See attached screen shot and files. Also is a sample export using x264 lossless that shows the black bar at the bottom. If you make the y-coordinate of the Size, Position & Rotate filter higher or lower, you can the green bands from the source to show up at the top or bottom of the preview window, but the black bar never goes away.
This is odd, but when I open your provided project, I do not reproduce the problem you report. I use the Video Zoom Scope to look at pixel 1:820 and it shows yellow.
Well that is very odd. I am also testing 20.10.31 x64 Windows 10 x64 and I do not recreate the problem when I open your project or when I recreate your project from scratch using your instructions.
There must be something different either in your environment or with one of your settings. From inspecting your log, I can see
Decimal is “.”
Interpolation is bilinnear
Preview scaling is off
That all matches my system.
I would suggest to try to change some settings and see if any setting affects the problem.
Hopefully someone else will open your project and will be able to recreate the problem.
Your Size Mode is Fill, rather than Fit
Looking at an exported video frame in Gimp.
Size Mode: Fill has shrunk your image by 75.9%, thus changing your image size to 1458x820.
When hitting reset on Zoom, you get the 0,-130 1920x1080
When typing in 100% on Zoom, you get 0,-140 1920x1100
No padding, rather the image is positioned at 0,-130, rather than 0,-140.
This is at Position 0,-130
Changing Position 0,-140, thus changing Size to 1956x1100
It would be easier to use Crop:Source. This option doesn’t stretch the source video/image.
Click “Center”, and leave Center bias as 0px.
I think I followed Hudson555x’s recommendation, but still could not get rid of the black bar. See attached screen capture. When I do size mode: fit, then reset on the zoom, it’s still showing a black bar on the bottom. I think (?) I matched the same settings as Hudson555x’s screen shot, but you can check me in the screen capture.
Moving the y-position down, shows the green padding from the source show up on the top. Moving the y-position up, shows the green padding from the source show up on the bottom, but the black bar is still there between the bottom of the frame and the content. Also in the screen capture.
I also did crop: source per his recommendation. The preview window looks correct (i.e. no black bar at the bottom this time). I did not try a sample export, but assume it would be right. Thanks.
Given that I have a solution, my immediate problem is solved.
HOWEVER, the two methods should produce identical output, shouldn’t they???
You moved the position to 0,-140, which is not what I did in my first image.
At 20 seconds in your video, you’re looking at the VUI (Visual User Interface) for the size of your original source video/image. This is not a part of your exported video.
Conceptually, yes, and similar issues have been raised; but this filter resamples and uses real numbers (float) and thus susceptible to rounding errors and unable to guarantee pixel grid fitting. We welcome any code patches from someone to improve it, but I am not working on it it any time soon.