Firstly, I'd like to roughly describe what I wan to do: Every now and then I take bunch of photos (in a variety of different resolutions, some of them taken with the iPhone camera, some others not), which I want to make kind of a slideshow of. Since I'm dumb I go the gritty way and want to do this with ffmpeg (please don't ask me why ). In order to do so, they all need to be the same size and to keep the aspect ratio I want to background to be completely black. So far, so good.
I used to do this preparation with XnConvert and everything was fine, the photos were all correctly aligned. Now I wondered why not use nconvert instead to make a neat script that does everything on its own. So I exported my existing configuration
and tested the script with the same (!) photos, so there shouldn't be a lot of surprise. However, there is:
Code: Select all
nconvert -quiet -autocrop 1 255 255 255 -ratio -rtype lanczos -resize 1920 1080 -canvas 1920 1080 center -bgcolor 0 0 0 -out jpeg -q 90 -o ../converted/image_#.jpg ./*
The photos from the other camera were correctly rendered, as far as I have seen. The iPhone photos though, are a mess. A few of them are correctly, some are rotated by 90 degrees and some others by 180 degrees. Now I know, the iPhone camera sometimes has strange rotation metadata, but the same images with the same configuration should in my opinion result in the same output.
I already tried to fix this with adding
to the command, but that makes it even stranger. Now the iPhone images are (mostly) correct, but now the other ones are wrong.
Code: Select all
Long story short: Do I miss something here or is there no way to work around that behavior?