问题描述
在Google周围浏览后,我浏览了有关h264编码的页面,并发现了有关qp的信息. https://trac.ffmpeg.org/wiki/Encode/H.264
After browsing around Google, I've came across this page about h264 encoding and discovered about qp. https://trac.ffmpeg.org/wiki/Encode/H.264
我的问题是:crf和qp有什么区别?总体上说,最好使用qp而不是crf,还是仅使用qp 0以获得最佳无损?如果首选,qp是否具有已知的合理设置?到目前为止,我知道crf的默认值是23,而质量18则是明智的选择,尽管我不明白为什么更好的合理无损的情况下18不会是默认值.最后,更改其中任何一个是否会导致与非ffmpeg播放器或仅与qp不兼容?
My questions are: What are the differences with crf and qp? Is it better to use qp over crf overall, or is it only if for using qp 0 for best lossless? Does qp have a known sensible setting if it's preferred? So far, I know crf has the default value of 23 while 18 is a sensible preferred increase in quality, although I don't understand why 18 wouldn't be default if better sensible lossless. Lastly, would changing either of them cause incompatibility with non-ffmpeg players or just qp?
我正在从webm转换为mp4.
I'm converting from webm to mp4 by the way.
我打算测试crf 23和18,然后选择哪一个最好,但是我似乎找不到关于此比较或qp的任何具体信息.
I was going to test crf 23 and 18 and pick which is best but I can't seem to find any concrete information on this comparison or about qp.
推荐答案
直接设置量化参数QP
时,它在整个编码过程中保持恒定,并且将根据设置值压缩每个帧.
When you set the quantization parameter QP
directly it remains constant throughout the encoding and each frame will be compressed based on the set value.
恒定速率因子CRF
允许QP
在运动较多的帧中上升,而在静止帧中下降,从而在保持压缩效率的同时产生一致的感知质量.
Constant rate factor CRF
allows the QP
to go up for frames with a lot of motion or down for still frames resulting in a consistent perceived quality while keeping the compression efficient.
本文对其进行了很好的解释.
This article explains it very well.
CRF
默认值只是一个默认值,您需要选择一个适合您视频类型的值. FFmpeg具有 PSNR 和 SSIM ,可让您比较结果.
The CRF
default is just a default, you need to pick a value adapted for your type of video. FFmpeg has filters like PSNR and SSIM which allow you to compare the results.
这篇关于ffmpeg中的crf和qp有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!