View Full Version : x264 using 9000Kbps peaks for a DVDrip???
Chengbin
20th April 2009, 23:30
I encoded the movie The Core from a DVD using CRF 24. My final encode has an average bitrate of about 835Kbps at 640x480, and because I'm using qcomp 1, the maximum peak bitrate in that encode is 9153Kbps. How the hell does x264 use a 9153Kbps peak for a CRF 24 video? I thought the highest peak bitrate on a DVD MPEG 2 is 9800Kbps. I also thought x264 is a hell of a lot more efficient than MPEG 2? That particular scene was 9600Kbps in the MPEG 2 video. How can x264 use 9153Kbps???
That 9153Kbps scene is a scene where the picture goes to snow, like when you use an antenna for TV, and go to a channel with no signal. Why is this kind of scene is challenging?
J_Darnley
20th April 2009, 23:54
Noise is random and hard to compress. How can you predict other noise from noise?
Chengbin
20th April 2009, 23:56
I used MVDegrain 3
J_Darnley
20th April 2009, 23:58
MVDegrain won't remove noise that strong. If it did you would end up with a flat grey image.
Chengbin
21st April 2009, 00:02
But still, the point is that why is it that difficult to encode? H.264 is (supposedly) far more efficient at encoding than MPEG 2, and yet it used 9153Kbps for that scene in CRF 24 when the original MPEG 2 encoding was 9600Kbps at that scene!!! What if I used a value say like CRF 18? H.264 not as efficient as MEPG 2???
LoRd_MuldeR
21st April 2009, 00:04
You said that you have set --qcomp to 1.0 in CRF mode, which is equivalent to using QP mode. And then you are surprised about bitrate peaks ???
The purpose of CRF is to take away bitrate from high motion scenes and you disabled that feature. Now you have the result ;)
And of course H.264 can have higher bitrates than MPEG-2, if you only lower the quantizers enough. You can't draw any conclusions about efficiency from that...
Chengbin
21st April 2009, 00:21
I would like to have high btirate peaks because I'm encoding at low bitrates, and at the default qcomp of 0.6, the low motion scenes look great, but the high motion scenes are bad. That's why I raised qcomp to 1. (Is that bad or something??) Now the high motions look great, and I don't have to use a lower CRF value to get good quality high motion scenes and waste bitrate on low bitrate scenes.
I believe CRF 24 is a pretty high CRF value. Of course I know you can have bitrates higher than the original, say if you go down to like CRF 16. But isn't CRF 24 a high quanitizer value? I don't expect a CRF 24 encode to almost match the bitrate of the original encode during a peak.
poisondeathray
21st April 2009, 00:21
^ and to add to Lord Mulder's comments: Chengbin, you are attempting to draw efficiency conclusions comparing the source to the 2nd generation x264 encode? Try re-encoding it with MPEG2 and then you could have a more valid comparision... If I were to guess, that scene would look very bad with the MPEG2 encode - that type of noise is difficult for all encoders.
Also if you used psy settings, your encode will use more bitrate at the same crf value. (It's basically detail & noise)
Sagekilla
21st April 2009, 00:25
Hint hint: Use the zones parameter. I'm not 100% sure but I believe you can set qcomp for the section where you have a pure-noise like image to something like 0.4 instead.
Also, like J_Darnley said: How do you predict noise from noise? Or better yet, effectively quantize noise? If you can find a way to quantize noise if very little bits, I'm sure all the encoding companies around the world would love to know how. You'd be creating effectively a magical (read: nonexistent and impossible) comprsesion algorithm.
LoRd_MuldeR
21st April 2009, 00:34
I would like to have high btirate peaks because I'm encoding at low bitrates, and at the default qcomp of 0.6, the low motion scenes look great, but the high motion scenes are bad. That's why I raised qcomp to 1. (Is that bad or something??)
It's neither "good" nor "bad". Using qcomp=1.0 with CRF mode is equivalent to QP mode and that's it. What you see simply is the result of that.
Anyway, there is a reason why CRF was invented and why most people seem to be pretty happy with that mode...
Sagekilla
21st April 2009, 00:38
@LoRd_MuldeR: Is it equivalent in the sense that aq is effectively "off" as well? From what I know, when you use qp you lose AQ.
LoRd_MuldeR
21st April 2009, 00:43
@LoRd_MuldeR: Is it equivalent in the sense that aq is effectively "off" as well? From what I know, when you use qp you lose AQ.
I can't say for sure. I'm referring to this post:
Well, VAQ works with all of those modes (though, technically, qcomp=1 and CRF is equivalent to QP mode)... so not really, I think.
Dark Shikari
21st April 2009, 00:45
@LoRd_MuldeR: Is it equivalent in the sense that aq is effectively "off" as well? From what I know, when you use qp you lose AQ.No, it isn't.
ajp_anton
21st April 2009, 01:22
The mpeg2 version at 9600kbit/s probably looks like **** compared to the original source. x264 is simply trying to copy that **** as accurately as possible. And it being **** doesn't make it any less complex to encode.
Jawed
21st April 2009, 10:24
If you're trying to maintain quality at high CRF you might be better off constraining quantisers rather than tweaking qcomp - this is the approach I take. I set qpmin to 8 less than target crf and qpmax to 3 more than target crf, e.g.:
--crf 22 --ref 3 --mixed-refs --bframes 3
--b-adapt 2 --b-pyramid --weightb --subme 7
--partitions i8x8 --8x8dct --qpmin 14 --qpmax 25
--me umh --merange 8
AQ is on at default, and qcomp is at default, 0.6. psy-rdo is also at default.
I found this approach gave me a better trade-off than fiddling with qcomp. That was a few days' testing...
Jawed
smok3
21st April 2009, 11:07
The mpeg2 version at 9600kbit/s probably looks like **** compared to the original source. x264 is simply trying to copy that **** as accurately as possible. And it being **** doesn't make it any less complex to encode.
exactly, for starters you would need to use the same source for both encodes,
false
source -> mpeg2 -> x264
better
source -> mpeg2
source -> x264
...
Dark Shikari
21st April 2009, 11:15
If you're trying to maintain quality at high CRF you might be better off constraining quantisers rather than tweaking qcomp - this is the approach I take. I set qpmin to 8 less than target crf and qpmax to 3 more than target crf, e.g.:
--crf 22 --ref 3 --mixed-refs --bframes 3
--b-adapt 2 --b-pyramid --weightb --subme 7
--partitions i8x8 --8x8dct --qpmin 14 --qpmax 25
--me umh --merange 8
AQ is on at default, and qcomp is at default, 0.6. psy-rdo is also at default.
I found this approach gave me a better trade-off than fiddling with qcomp. That was a few days' testing...
JawedAll partitions disabled except i8x8?
...really? :rolleyes:
Jawed
21st April 2009, 11:48
Knew somebody would query that.
Yeah, improved bitrate didn't seem worth the considerably longer encoding time. e.g. 1% worse bitrate with i8x8 versus p-all, 17% faster, tested with r1071.
The benchmark is without full avisynth pre-processing - with avisynth de-noising it's about 5% faster, not 17%.
Did those tests back in January. Those tests were with 5 refs. Since then I changed to 3 refs, when I did a mini-re-evaluation based upon r1130.
If I'm doing a high-resolution, hiqh quality encode then I go to town:
--crf 21 --ref 3 --mixed-refs --no-fast-pskip --bframes 3
--b-adapt 2 --b-pyramid --weightb --subme 9 --trellis 2
--partitions all --8x8dct --qpmin 13 --qpmax 24 --me umh
because the time spent in the avisynth script is longer, hiding the x264 slowdown. At 0.68fps x264 is mostly twiddling its thumbs.
Jawed
Dark Shikari
21st April 2009, 12:01
Knew somebody would query that.
Yeah, improved bitrate didn't seem worth the considerably longer encoding time. e.g. 1% worse bitrate with i8x8 versus p-all, 17% faster, tested with r1071.You do know that --partitions all is not the default and is unnecessarily slow, right?
And that 1% worse bitrate at the same CRF doesn't mean the quality is identical...
Jawed
21st April 2009, 12:25
You do know that --partitions all is not the default and is unnecessarily slow, right?
In the remainder of the test results, i8x8 is:
p8x8,i8x8 - 1.1% bigger - 9.8% faster
p8x8,b8x8,i8x8 - 1.6% bigger - 13.4% faster
And that 1% worse bitrate at the same CRF doesn't mean the quality is identical...
I tweak CRF for quality - I use crf 18, 19, 20, 21 or 22 depending on resolution/quality of source. I'm not interested in making 0.1 sized tweaks to CRF.
---
I knew I should have just posted the qpmin and qpmax settings and not the whole profile - way to take a thread off topic, eh?
Jawed
nurbs
21st April 2009, 12:32
What he means is that a given crf value will give you different quality for different options so you shouldn't take the filesize changes as a measure how much the compression suffers when changing options.
Jawed
21st April 2009, 12:41
I know. But I was only testing for encoding speed - the IQ is something I set afterwards with CRF. The IQ differences amongst the partition settings are smaller than the IQ differences resulting from the CRF increments I use.
Jawed
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.