When compiling ffmpeg from source and testing hardware accelerated transcoding with scaling using the instructions for Linux located at Accelerated FFMPEG Instructions, the command listed in the instructions:
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda –resize 1280x720 -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4
fails with the following message:
Option hwaccel (use HW accelerated decoding) cannot be applied to output url –resize -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to. Error parsing options for output file –resize. Error opening output files: Invalid argument
The documentation claims the command “uses the built in resizer in cuvid decoder”, but it appears ffmpeg may no longer allow a resize option to be sent to the decoder. Any help with updating the documentation would be much appreciated.