I have a video which I'm trying to downscale to a video output, and also create a thumbnail image at every 2 seconds using a single FFMpeg command(hardware accelerated). Following is the command:
ffmpeg -hwaccel cuvid -hwaccel_output_format cuda -noautorotate -i "inputVideo.mp4" -vf "scale_cuda=1280:720,hwdownload,format=nv12,setsar=1:1" -c:v h264_nvenc -profile:v main -level:v 4 -b:v 2500K "outputVideo.mp4" -vf "scale_cuda=160:90,hwdownload,format=nv12, fps=0.5,setsar=1:1" "thumbnailOutputs_%04d.jpg"
But the input video has a rotation parameter(180 degrees) in its metadata, and based on the FFMpeg Documentation the command automatically rotates the output since -autorotate is enabled by default. I don't want my outputs to be rotated.
-autorotate Automatically rotate the video according to file metadata. Enabled by default, use -noautorotate to disable it.
I changed my command to add -noautorotate. It fixed the video output, but the image outputs are still getting rotated. I even tried separating the the command for images and using -noautorotate but still doesn't work.