[Cin] removing letter boxing while preserving aspect
Georgy Salnikov
sge at nmr.nioch.nsc.ru
Mon Mar 4 04:12:27 CET 2024
> 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 sge at nmr.nioch.nsc.ru
_______________________________________________________________________________
More information about the Cin
mailing list