Use -q:v to control (M) JPEG quality
The effective range is a linear scale from 2 to 31, and a lower value will result in higher product quality.
Examples
Make the MJPEG video in the MOV container:
ffmpeg -i input.mov -c:v mjpeg -q:v 3 -an output.mov
Output a series of JPG images:
ffmpeg -i input.mov -q:v 2 images_%04d.jpg
Files will be called images_0001.jpg , images_0002.jpg , images_0003.jpg , etc.
Private options
For H.264 encoding, -crf and -preset generate higher quality. But this does not seem to work for MJPEG.
The MJPEG encoder does not use -crf and -preset ; these are "private" options for some encoders such as libx264, libx265 and libvpx. You can see private options, such as: ffmpeg -h encoder=mjpeg .
llogan
source share