Log in

View Full Version : QuEnc optimal settings for low bitrate source, SVCD target


M4ST3R
30th August 2006, 21:05
I wanted to find the optimal settings for QuEnc 0.71 with a low bitrate source and a SVCD target. For those who want to know how this story began, check this thread (http://forum.doom9.org/showthread.php?t=114101"). I've decided to open my own topic to not hijack drcl's one. I made the tests for myself, for the TV shows I need to encode but I've decided to share the results because it could be interesting for some people.

Please note those optimal results are not supposed to be universal. They are the best ones in my case but could be very different with other sources and targets.

By the way, I'm not at all an experimented user, so my test might be flawed.

The source is a digital TV rip, XviD at 1100 kpbs, 624x352, 25fps, about 40 minutes. The target is PAL SVCD, target bitrate 2474 kbps (by FitCD). The avisynth script contains no filter (other than ConvertToYV12 and BilinearResize).

Running a slow computer, I didn't encode the entire video, but I picked a 2 minutes clip containing different scenes (indoor, outdoor, slow, fast...) that well represents the profile of the entire video. The clip has an average bitrate of 1131 kbps (slighty higher than the entire video). I know it's not optimal but I don't have the time to encode the entire video and compute the metrics.

The real bitrate values are given by virtualdubmod. The bitrate for the XviD is in kbps, for the MPEG files in Kbps (I don't know it's a typo/bug or if it really uses 1000 bytes or 1024 bytes according to the file format)

In (RED) the metric value to beat.

Unchanged settings:
Avisynth resize method: bilinear
[2474] Bitrate
[12] GOP Size
[2] Max B-Frames
[ ] Interlaced Encoding
[ ] Force Closed GOP
[ ] Scene Detection
[def] Matrix
[4:3] Aspect Ratio
[SVCD] Mux Profile VBR, SVCD compliant max bitrate:

[2600] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 1979
PSNR: 46.76
SSIM: 90.95
Much lower bitrate than expected.

Let's see if advanced settings can help to increase the bitrate, in order to fill up the CD.

[2600] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[x] Extreme & Slow [8] DC PrecisionActual bitrate: 1914
PSNR: 46.55 (46.76)
SSIM: 90.67 (90.67)
Extreme & Slow gives a lower bitrate and a lower quality. Will keep it OFF for the next tests.


[2600] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [11] DC PrecisionActual bitrate: 1771
PSNR: 46.19 (46.76)
SSIM: 89.96 (90.67)
11 bits DC precision gives a much lower bitrate and lower metrics. Will keep 8 bits DC precision for the next tests.


[2600] Max Bitrate
[x] VBR [x] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 1831
PSNR: 46.52 (46.76)
SSIM: 90.52 (90.67)
Trellis quantization gives a much lower bitrate and lower metrics. Will keep it OFF for the next tests.

Is High Quality really useful?:

[2600] Max Bitrate
[x] VBR [ ] Trellis
[ ] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2129
PSNR: 46.92 (46.76)
SSIM: 91.23 (90.67)
Actually it gives better metrics! But since the bitrate is about 150 kbps higher, I'm not sure it's fair to say that High Quality OFF is better. However in my case, it's better, since it's the only setting that increases the bitrate (and the quality).

CBR:

[ ] VBR [ ] Trellis
[ ] High Quality [ ] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2476
PSNR: 46.03 (46.92)
SSIM: 90.91 (91.23)


[ ] VBR [ ] Trellis
[x] High Quality [ ] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2476
PSNR: 46.02 (46.92)
SSIM: 90.97 (91.23)

In 1 pass mode, High Quality ON/OFF gives about the same quality


[ ] VBR [ ] Trellis
[ ] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2471
PSNR: 45.62 (46.92)
SSIM: 88.58 (91.23)


[ ] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2471
PSNR: 45.03 (46.92)
SSIM: 87.30 (91.23)

2 pass is worse than 1 pass. Moreover with 2 pass, High Quality ON is worse than OFF.

I haven't tried other settings (trellis, extreme,...) since they gave worse results in the VBR tests.

Conclusion for compliant SVCD:

The best settings are:

[2600] Max Bitrate
[x] VBR [ ] Trellis
[ ] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC Precision PSNR: 46.92
SSIM: 91.23

1 pass CBR, high quality OFF, though slightly worse, is a good (faster) alternative

Since I can't fill the CD with SVCD compliant settings, let's try to go beyond 2600. The next tests will use Max Bitrate=8000

VBR, not SVCD compliant max bitrate:

[8000] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2471
PSNR: 47.88 (46.92)
SSIM: 92.60 (91.23)
Good, the expected bitrate is finally reached and the metrics are better.


[8000] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[x] Extreme & Slow [8] DC PrecisionActual bitrate: 2450
PSNR: 47.77 (47.88)
SSIM: 92.46 (92.60)
Again, Extreme & Slow settings are worse.


[8000] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [11] DC PrecisionActual bitrate: 2340
PSNR: 47.40 (47.88)
SSIM: 91.93 (92.60)
Again, 11 bits DC precision is worse. By the way it's undersized.


[8000] Max Bitrate
[x] VBR [x] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2396
PSNR: 47.64 (47.88)
SSIM: 92.26 (92.60)
Again, trellis quatization is worse.

Let's see if High Quality OFF gives better quality (like with max bitrate=2600)

[8000] Max Bitrate
[x] VBR [ ] Trellis
[ ] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC PrecisionActual bitrate: 2474
PSNR: 47.85 (47.88)
SSIM: 92.53 (92.60)
It's (very) slightly worse. Could be interesting if speed is a priority.

So going beyond the SVCD max bitrate really helps to reach the target bitrate and increase the quality.
I was a bit worried about how to burn and play such a non compliant file.
However I burnt it as SVCD/mode2 with Nero without problem. It seems Nero doesn't analyse the max bitrate during its compliance check. And it played perfectly on my standalone DVD player. It seems standalone DVD players can read CDs faster than 2X (I wondered that).

Final conclusion:

The best settings are:

[8000] Max Bitrate
[x] VBR [ ] Trellis
[x] High Quality [x] 2 Pass
[ ] Extreme & Slow [8] DC Precision PSNR: 47.88
SSIM: 92.60

"Advanced" settings never give better results, High Quality can be disabled with a small quality tradeoff.

Again, don't forget the source is low bitrate and the tests are done on a 2 minutes clip. The results are probably very different with a DVD source or target.

drcl
1st September 2006, 17:43
Firstly, I think the sample is too short to be really represntative. It seems like (from my own experience) all 2-pass video compression works better over longer clips and visual quality is always worse (in my opinion) on short samples.

11bits DC precision is not relevant. It's not DVD spec compliant so probably wont work on DVD players.

There may be an explaination for the undersizing. As you are encoding from to a 16:9 letterbox from a source that has been compressed twice already there is the possibilty that the encoder is getting saturated throughout most of the clip. Check this with bitrate viewer. If you wanted to increase the bitrate you could try some other matrices.

Your DVD player reads above 2x, mine doesnt.

There is no point in doing 2pass CBR. Not really sure why 2pass is not greyed out when VBR is deselected.


Personally I dont think Quenc is suitable for SVCD. It's great for DVD but low max bitrate restrictions seem to cause problems.

I think metrics are not the best measure of encoder ability. Use your eyes.

The bitrate you want is so close to the max bitrate that i dont think you would see much difference between a CBR and a correctly restrained VBR.

Have you tried HC 0.18?

M4ST3R
2nd September 2006, 12:37
Firstly, I think the sample is too short to be really represntative. It seems like (from my own experience) all 2-pass video compression works better over longer clips and visual quality is always worse (in my opinion) on short samples.
I know but as I explained my computer is too much slow. It takes about 7-8 hours to encode the 40 minutes source, and 20 minutes to compute the metrics for the 2 minutes sample. By the way, I didn't post all the tests I did, only the "interesting" ones. So it would have take me 1 month or something to do the tests with the full video.

There may be an explaination for the undersizing. As you are encoding from to a 16:9 letterbox from a source that has been compressed twice already there is the possibilty that the encoder is getting saturated throughout most of the clip. Check this with bitrate viewer.
I know, it was explained there (http://forum.doom9.org/showthread.php?p=864316#post864316)

If you wanted to increase the bitrate you could try some other matrices.
I did. It's worse actually.
There is no point in doing 2pass CBR. Not really sure why 2pass is not greyed out when VBR is deselected.
I wondered that myself but I googled and found some links about 2 pass CBR video encoding, then I don't think it's a bug. That's why I tested this mode. But the results are not good.
I think metrics are not the best measure of encoder ability. Use your eyes.
I know but I tried to do 3 or 4 visual tests and couldn't see the difference.

The bitrate you want is so close to the max bitrate that i dont think you would see much difference between a CBR and a correctly restrained VBR.
Correct, I said CBR is good alternative
CBR: PSNR: 46.03 SSIM: 90.91
SVCD compliant VBR: PSNR: 46.92 SSIM: 91.23

Have you tried HC 0.18?
I can't get it to run