ffmpeg generate higher quality images for MJPEG encoding [duplicate]

倖福魔咒の 提交于 2019-11-30 09:15:05

Use -q:v to control (M)JPEG quality

The effective range is a linear scale of 2-31, and a lower value will result in a higher quality output.

Examples

Make MJPEG video in 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 named images_0001.jpg, images_0002.jpg, images_0003.jpg, etc.


Private options

For H.264 encoding the -crf and -preset flags generate higher quality. But that doesn't 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 like this: ffmpeg -h encoder=mjpeg.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!