I have 3:2 content that is saved in a 4:3 frame with black bands at the top and bottom. I want to remove the banding such that the output is a 3:2 resolution clip WITHOUT DISTORTING THE ORIGINAL CONTENT. I've tried playing with the crop filter but the black bands remain, and the camera automation can remove the banding by zooming in, but then the left and right image sides get cropped out of the output. Is there a tutorial for this exact scenario?
The only way I have tested to do this will cut off the right and left sides some and I do not know a way around that. IgorBeg may have a better solution. My example had no content on the sides: https://streamable.com/1a5osk 1) load your 4:3 video with the bands 2) drag the "Crop & Position" plugin to the video track and bring up its "Show controls" popup menu 3) adjust the "Top" and "Bottom" sliders to crop the bands at the top and bottom 4) now switch the Settings->Format to 3:2 On Sun, Mar 3, 2024 at 6:40 AM Rob Prowel via Cin < [email protected]> wrote:
I have 3:2 content that is saved in a 4:3 frame with black bands at the top and bottom.
I want to remove the banding such that the output is a 3:2 resolution clip WITHOUT DISTORTING THE ORIGINAL CONTENT.
I've tried playing with the crop filter but the black bands remain, and the camera automation can remove the banding by zooming in, but then the left and right image sides get cropped out of the output.
Is there a tutorial for this exact scenario?
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Oops, previous email will distort it. But there must be a way to do this? On Sun, Mar 3, 2024 at 6:40 AM Rob Prowel via Cin < [email protected]> wrote:
I have 3:2 content that is saved in a 4:3 frame with black bands at the top and bottom.
I want to remove the banding such that the output is a 3:2 resolution clip WITHOUT DISTORTING THE ORIGINAL CONTENT.
I've tried playing with the crop filter but the black bands remain, and the camera automation can remove the banding by zooming in, but then the left and right image sides get cropped out of the output.
Is there a tutorial for this exact scenario?
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
More searching on the internet leads to the following conclusion. Changing aspect ratio - the reality seems to be "you cannot do that". You either need to crop or distort. Instead I "think" you will have to add borders to two of the sides. On Sun, Mar 3, 2024 at 6:40 AM Rob Prowel via Cin < [email protected]> wrote:
I have 3:2 content that is saved in a 4:3 frame with black bands at the top and bottom.
I want to remove the banding such that the output is a 3:2 resolution clip WITHOUT DISTORTING THE ORIGINAL CONTENT.
I've tried playing with the crop filter but the black bands remain, and the camera automation can remove the banding by zooming in, but then the left and right image sides get cropped out of the output.
Is there a tutorial for this exact scenario?
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Den 03.03.2024 14:40, skrev Rob Prowel via Cin:
I have 3:2 content that is saved in a 4:3 frame with black bands at the top and bottom.
I want to remove the banding such that the output is a 3:2 resolution clip WITHOUT DISTORTING THE ORIGINAL CONTENT.
I've tried playing with the crop filter but the black bands remain, and the camera automation can remove the banding by zooming in, but then the left and right image sides get cropped out of the output.
Is there a tutorial for this exact scenario?
You can possibly try a test on a file or clip copy using ffmpeg "crop and resize". If I understand the problem right, keep the original w(idth) of the video resolution and use h=w*2/3=w/1.5 ffmpeg -i input.mp4 -vf "crop=w:h" output.mp4 according to this article example https://www.bannerbear.com/blog/how-to-crop-resize-a-video-using-ffmpeg/#exa...
Den 03.03.2024 14:40, skrev Rob Prowel via Cin:
I have 3:2 content that is saved in a 4:3 frame with black bands at the top and bottom.
I want to remove the banding such that the output is a 3:2 resolution clip WITHOUT DISTORTING THE ORIGINAL CONTENT.
I've tried playing with the crop filter but the black bands remain, and the camera automation can remove the banding by zooming in, but then the left and right image sides get cropped out of the output.
Is there a tutorial for this exact scenario?
You can possibly try a test on a file or clip copy using ffmpeg "crop and resize". If I understand the problem right, keep the original w(idth) of the video resolution and use h=w*2/3=w/1.5
ffmpeg -i input.mp4 -vf "crop=w:h" output.mp4
It might be simpler with mplayer/mencoder: Run from console: mplayer -vf cropdetect input.mp4 Mplayer prints in the console something like: crop area: X: 5..719 Y: 2..575 (-vf crop=704:560:12:10) 0.9% 6 0 These are actual crop parameters--^^^^^^^^^^^^^^^^^^^^^^ Use them: mplayer -vf crop=704:560:12:10 input.mp4 To recode cropped content add the same -vf option to mencoder. _______________________________________________________________________________ Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
On 3/3/24 15:28, Terje J. Hanssen via Cin wrote:
You can possibly try a test on a file or clip copy using ffmpeg "crop and resize". If I understand the problem right, keep the original w(idth) of the video resolution and use h=w*2/3=w/1.5
ffmpeg -i input.mp4 -vf "crop=w:h" output.mp4
according to this article example https://www.bannerbear.com/blog/how-to-crop-resize-a-video-using-ffmpeg/#exa...
Yeah, I know how to do it with ffmpeg filters quite easily, but was hoping it could be done in cinelerra as one of a longer sequence of edits.
You can use some ffmpeg filters directly in cinelerra. I think that cinelerra has ffmpeg's crop filter. Best regards, Andrey пн, 4 мар. 2024 г. в 10:59, Rob Prowel via Cin <[email protected]>:
On 3/3/24 15:28, Terje J. Hanssen via Cin wrote:
You can possibly try a test on a file or clip copy using ffmpeg "crop and resize". If I understand the problem right, keep the original w(idth) of the video resolution and use h=w*2/3=w/1.5
ffmpeg -i input.mp4 -vf "crop=w:h" output.mp4
according to this article example
https://www.bannerbear.com/blog/how-to-crop-resize-a-video-using-ffmpeg/#exa...
Yeah, I know how to do it with ffmpeg filters quite easily, but was hoping it could be done in cinelerra as one of a longer sequence of edits.
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
I tested that in Cinelerra-GG using a PNG made by me: 1920x1080 inside a 1920x1440. And using an easy settings, it works as you want, I think. But I don't know if it could work for you, for your specific video. Could you share a little fragment of video (at least 3 seconds), please? If you can,... can you upload that in somewhere,.. not here? Thanks. IgorBeg Il 04/03/2024 08:59, Rob Prowel via Cin ha scritto:
Yeah, I know how to do it with ffmpeg filters quite easily, but was hoping it could be done in cinelerra as one of a longer sequence of edits.
I think the work can also be done in CinGG. When you have distortions it is because the format of the project does not match the format of the track on the timeline or the format of the asset; in our case the track is considered. I created in inkscape an image with a 4:3 format and the dimensions of 768x576. Inside I drew a rectangle that coincides with the 3:2 format with dimensions 768x512. I attach this image. If we change the DAR (aspect ratio) from 4:3 to 3:2 we get a distorted image. So we must first adjust the track on the timeline to the new dimensions and then conform the project (size 768x512 and DAR to 3:2) in the window Settings --> Format. Now that format and track size match we have our crop without distortion. Note: the first step of scaling to the 768x512 size should not be done on the asset (via plugin or the Resize found in RMB --> Info), because this keeps the DAR at 4:3. We must scale by acting on the track in the timeline, via RMB --> Resize track... The steps I took are as follows: 1- I upload the image 4-3_3-2.png 2- upload image to timeline 3- RMB on the track on the Timeline and I choose Resize track 4- I set the value 768 (unchanged) and 512 (new). Note that the ratio of sides remains 1:1. I click OK. 5- I see the deformed track because it conflicts with the project format (which matches the asset format) 6- I open the Set Format window (Setting --> Format) 7- Set H = 512 8- Set Display Aspect Ratio a 3:2 9- I click Apply and then click OK. 10- In the compositor you can see the crop of the asset that exactly shows the 768x512 format at 3:2 11- By making a render this remains in the new format, that is, of the desired 3:2 crop.
On 3/4/24 04:30, Andrea paz via Cin wrote:
The steps I took are as follows: 1- I upload the image 4-3_3-2.png 2- upload image to timeline 3- RMB on the track on the Timeline and I choose Resize track 4- I set the value 768 (unchanged) and 512 (new). Note that the ratio of sides remains 1:1. I click OK. 5- I see the deformed track because it conflicts with the project format (which matches the asset format) 6- I open the Set Format window (Setting --> Format) 7- Set H = 512 8- Set Display Aspect Ratio a 3:2 9- I click Apply and then click OK. 10- In the compositor you can see the crop of the asset that exactly shows the 768x512 format at 3:2 11- By making a render this remains in the new format, that is, of the desired 3:2 crop.
That works! The part that makes it possible is "resize track", because otherwise importing a clip causes the project settings to follow those of the imported clip. so to summarize 1) import content 2) resize track 3) modify project settings 4) adjust camera as necessary 5) render Thx!
Actually in the case of my png image, the "Resize track" step is not necessary, but it is always better to have the project format the same as the track format in Timeline, especially if you are using multiple clips. Note: "Set Format" and "Resize track" cause a crop, which is necessary in your case, but we often want to avoid it by using the "Scale" plugin instead of "Resize track." @IgorBeg can you please indicate your method? (I plan to make an addition to the manual).
I have added the tip to the manual; see if it is okay. I also attach a txt file for those who want to correct or improve the tip. To be put at the end of section 3.2: A tip on how to eliminate Letterbox/Pillarbox black bands in the Set Format window can be found here: \nameref{sub:remove_letterbox}. To be put at the end of section 19.7.11: \subsection{How to remove letterbox/pillarbox bands}% \label{sub:remove_letterbox} To remove the horizontal black bands of the letterbox or the vertical black bands of the pillarbox we need to change the \textit{size} and \textit{aspect ratio} of the source by cropping. For example, if we want to remove the letterbox from a $4:3$ frame to leave only the content with aspect ratio $3:2$, we can act on the project format by doing the following steps: \begin{enumerate} \item Check the size of the base W of the original frame in pixels; \texttt{Resource} window $\rightarrow$ \texttt{RMB} on Asset $\rightarrow$ \texttt{Info} $\rightarrow$ \texttt{Detail}; e.g. W = 768 px \item Obtain the height of the figure in $3:2$, i.e., without the black bands; H can be obtained from the formula: $\frac{3}{2} = \frac{W}{H}$ \quad from which $H = \frac{768 \times 2}{3}$; \qquad e.g., H = 512 px \item Note that $W \times H = 768 \times 512$ is just the crop we are looking for to switch from $4:3$ frame to $3:2$ frame without letterbox \item Open \textit{Set Format} window: \texttt{Settings $\rightarrow$ Format} \item Change $H = 512$ and set \textit{Display Aspect Ratio} to $3:2$; press \texttt{Apply} and \texttt{OK}. Note that we leave W unchanged, since the frame width does not change. \item If needed, act on the \textit{Camera} tool to get the desired viewport. \end{enumerate} \paragraph{Note:} in complex situations, with multiple sources of different sizes, it may be appropriate to premise an additional step to the second: change the size of the track on the Timeline via \texttt{RMB $\rightarrow$ Resize track}. In this way we crop the track to match it to the project format that we will change in the next step. This way we avoid possible unwanted distortions. In the case of the pillarbox, we will leave H unchanged while calculating the new value of W. The formula $\frac{x}{y} = \frac{W}{H}$ is valid for any aspect ratio ($4:3; 16:9; 2.35:1$; etc)
Updated the Manual and checked into GIT, this Tip section after reviewing, testing the steps, and minor punctuation changes. I apologize if I do not put the entire "Credits" personnel into the git line, but Andrea adds all of the Latex to get it to format correctly and saves me from having to do that (which I dislike doing). Thank you everyone who contributed to various ways to remove bands while preserving aspect ratio. On Wed, Mar 6, 2024 at 5:35 AM Andrea paz via Cin < [email protected]> wrote:
I have added the tip to the manual; see if it is okay.
пт, 8 мар. 2024 г., 20:01 Phyllis Smith via Cin <[email protected]
:
Updated the Manual and checked into GIT, this Tip section after reviewing, testing the steps, and minor punctuation changes. I apologize if I do not put the entire "Credits" personnel into the git line, but Andrea adds all of the Latex to get it to format correctly and saves me from having to do that (which I dislike doing). Thank you everyone who contributed to various ways to remove bands while preserving aspect ratio.
Thanks! I wish to have upbeat 'infinity' (8) day of March!
On Wed, Mar 6, 2024 at 5:35 AM Andrea paz via Cin < [email protected]> wrote:
I have added the tip to the manual; see if it is okay.
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
participants (8)
-
Andrea paz -
Andrew Randrianasulu -
Georgy Salnikov -
Igor BEGHETTO -
Phyllis Smith -
Rob Prowel -
Terje J. Hanssen -
Андрей Спицын