[FFmpeg-user] loseless cropping from 1980x1088 to 1080 possible?

Zhang Weiwu zhangweiwu at realss.com
Thu Apr 26 13:05:01 CEST 2012

On 2012年04月26日 11:52, gildororonar at mail-on.us wrote:
> I should be able to change the video file header so that the player 
> crop the video while playing back, a.k.a. cropping it loselessly. Yet 
> "cropping loselessly" didn't yield any useful search result.
> So is it in theory correct that I can "loselessly" crop the 8 pixels? 
> If so, is ffmpeg the right tool for this purpose? 

Don't know what codec you used. If you use h.264 and use Windows, I can 
crop without having to re-encode h.264 so you should be able too. The 
tool is called h264info:

There is a 'crop' field on the lower-right where you can type value for 
t/b/l/r (top/bottom/left/right).

The fact this tool require raw h.264 stream to work in imply that 
cropping is not a feature of the container.

This tool comes with no document (they didn't even replace the Microsoft 
Foundation Class logo from application icon), there are a few 
instruction here of in general how to use it:

The answer from Carl Eugen Hoyos indirectly imply ffmpeg is not the 
right tool for your purpose, I guess. ffmpeg helps you extract video to 
a separate file for other tools, and allows you merge it back, though I 
never managed to do that myself....

The reason you cannot find it by searching "crop-loselessly", is because 
people don't address this operation by that name. I yet not know what is 
the right name for such codec-level-cropping...

Best regards

More information about the ffmpeg-user mailing list