5

I'd like to use this command to scale, pad and rotate several jpeg images into a common 1000x1000 output resolution:

ffmpeg -i image.jpg -vf "scale=1000:1000:force_original_aspect_ratio=decrease, pad=1000:1000:(ow-iw)/2:(oh-ih)/2" square.jpg

However (EXIF) portrait orientation is not preserved into the output image...

Input:

enter image description here

Expected output on the left, what I get on the right:

Expected Obtained

From different questions on the site, I'm assuming ffmpeg identifies orientation itself and processes images accordingly. Or is that valid only for video streams?

Using latest ffmpeg (4.0.2).

mins
  • 1,091

1 Answers1

1

Displaying images according to their EXIF orientation is a feature that is more common to image editors or image handling libraries.

I suggest to rotate first all images to their true orientation.

For methods of doing the rotation, see the post How to automatically rotate images based on EXIF data?

harrymc
  • 498,455