[FFmpeg-user] How to lossless crop mp4 videos

Nicolas George george at nsup.org
Mon Aug 16 10:44:29 EEST 2021


Ulf Zibis (12021-08-16):
> if I understand correct, mp4 videos are encoded in blocks of 16x16
> pixels. I I'm wondering if I could crop a video by multiples of 16
> pixels without reencoding the remaining blocks.

It depends on the codec, not the format.

With a codec like MJPEG, it is possible. There are tools to do it with
individual images, look up jpegtran.

But with video codecs that use temporal compression, a visible part of
the next image can depend on a cropped part of the current image, and
that makes it impossible.

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/20210816/d45bd4b7/attachment.sig>


More information about the ffmpeg-user mailing list