Q: FFMPEG encoding is rotating portrait images uploaded from the iPhone I'm trying to figure out why FFMPEG is rotating my thumbnail image when a portrait video is uploaded from an iphone.
Here is my command line test:
ffmpeg -i video/test.mp4 -c:v libx264 -profile:v high -level 5 -crf 18 -preset medium -maxrate 10M -bufsize 16M -pix_fmt yuv420p -vf "scale=iw*sar:ih, scale=\'if(gt(iw,ih),min(1920,iw),-1)\':\'if(gt(iw,ih),-1,min(1080,ih))\'" -x264opts bframes=3:cabac=1 -movflags faststart -b:a 320k -y video/test.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -s 410x231 video/testthumb.jpg 2>&1

Then the portrait image is rotated 90 degrees to be made a landscape image, but the video stays portrait. How can I keep the orientation the same?
