[FFmpeg-user] Unable to crop JPG to a size with odd (non-even) dimensions

Nicolas George george at nsup.org
Sun Jul 16 11:28:54 EEST 2023


Sam Logan (12023-07-16):
> I am trying to precisely crop a JPG. The problem is that when I try to crop
> to dimensions that are odd (non-even), FFmpeg is forcing the output to
> instead be even. For example, if I try to crop to 585x1040...:
> 
> ffmpeg -i "Input.jpg" -vf crop=585:1040:0:0 "Output.jpg"
> 
> ...then FFmpeg instead generates a 584x1040 image. How do I force my
> desired cropping to 585x1040?

You probably need to specify a pixel format without chroma subsampling.
Next time, post your complete console output, as specified in the rules
of this list, so we do not have to guess.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20230716/53fa8cfc/attachment.sig>


More information about the ffmpeg-user mailing list