I have a working image encoder in C++ using ffmpeg as the backend. I am taking videos in and saving frames out as jpeg, but I am having difficulty adjusting the quality of the output jpegs.
Things I have tried:
Setting AVCodecContext's global_quality and compression_level fields.
I have also tried setting qscale with an AVDictionary of options, but have been unsuccessful there too.
I know its possible because with the command line I can
ffmpeg -i INPUT -q:v 2 output_frame_%02d.jpg and get higher quality images.