ffmpeg vp9未设置恒定质量 [英] ffmpeg vp9 not setting constant quality
本文介绍了ffmpeg vp9未设置恒定质量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行ffmpeg来将4k hevc视频转换为vp9,但是无论我使用什么设置,它总会带来可怕的质量和相同的文件大小.
I'm running ffmpeg to convert a 4k hevc video to vp9 but no matter what setting I use, it always comes out horrible quality and the same filesize.
命令:
ffmpeg -y -i /tmp/longsample.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 30 /tmp/vp9-30.mkv
ffmpeg -y -i /tmp/longsample.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 15 /tmp/vp9-15.mkv
ffmpeg -y -i /tmp/longsample.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 0 /tmp/vp9-0.mkv
我正在docker上使用ffmpeg:latest.
I'm using the ffmpeg:latest on docker.
推荐答案
ffmpeg中VPx编解码器所做的就是将视频比特率值用作上限.如果用户未设置,则ffmpeg假定默认值为200 kbps.您需要重置该值以获得不受约束的CRF编码.
What the VPx codecs in ffmpeg do is use the video bitrate value as a ceiling. If not set by the user, ffmpeg assumes a default of 200 kbps. You need to reset the value to get unconstrained CRF encoding.
ffmpeg -y -i in.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 30 -b:v 0 out.mkv
请参见 https://trac.ffmpeg.org/wiki/Encode/VP9#constantq
这篇关于ffmpeg vp9未设置恒定质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文