[MPlayer-users] Understand cropping

Jason Tackaberry tack at urandom.ca
Thu Nov 23 15:35:28 CET 2006

On Wed, 2006-11-22 at 22:39 -0500, T wrote:
> If I gave -vf crop=704:304 to mplayer/mencoder, it will actually use
> crop=704:304:8:88 instead of crop=704:304:4:90, correct? Because that's
> what I calculate as the actual center, since:
>  (720-704)/2 = 8
>  (480-304)/2 = 88

Sounds right.

> If so, why cropdetect suggests crop=704:304:4:90?

Why would you assume cropdetect would return a region centered within
the original frame?  cropdetect sees that the first pixels above the
threshold occur at x=4,y=90.  If it had returned the values you expect
(704:304:8:88), the top would contain 2 black or half-black pixels, and
you might also have 4 black or half-black pixels on the right edge.
(You might also be ok on the right edge, as cropdetect rounds the
dimensions to the lowest multiple of 16.)


More information about the MPlayer-users mailing list