ffmpegmjpeg

FFmpeg image2 output: Control JPG image quality when using mjpeg_qsv


My FFmpeg command ouputs a series of JPG images. Simplified:

ffmpeg -f dshow -video_size 3840x2160 -framerate 25 -i "video=My Webcam" -qscale:v 5 -vcodec mjpeg_qsv "C:\out\%d.jpg"

I want to use -vcodec mjpeg_qsv to leverage GPU acceleration. Usually (without "_qsv") I can control JPG image quality by using qscale:v , but it seems to have no effect in combination with mjpeg_qsv.

Is it even possible to control JPG image quality when using mjpeg_qsv? If yes, any ideas how? Thanks!


Solution

  • The mjpeg_qsv encoder makes use of the global_quality option. Range is 1 to 100. Default is 80.