Subject: A detailed analysis of TMPEG vs. CinemaCraft
Well, because i got fed up by reading incorrect posts ( at another site
), I decided to do a detailed analysis and compare both encoders by using the best modes of each.
It's clear that CCE is a better MPEG-2 encoder ( that's what they say ) than TMPGEnc, and that TMPGEnc is a better MPEG-1 encoder than CCE.
That is a fact, and everyone agrees on that. But which encoder produces the best quality over the other, may it be MPEG-1 or MPEG-2? Well, this is what this is all about.
Before I start, I want to acknowledge that above 3-4Mbps, MPEG-2 will always be better than MPEG-1. No matter what encoder is used, because MPEG-2 scales, and MPEG-2 doesn't. But what really started to bother me was that some people say that CCE's X-pass is better than TMPEG's CQ modes. So here are the real life results.
I encoded "The Matrix" ( video stream only ) with the new KVCD beta 704x480 template, now using our own Quantization Matrix and GOP. The new template encodes CQ_VBR mode. The total size for the movie's video stream came out to 1,302,091KB. Then encoded the same movie, using
DVD2SVCD, with the default CCE parameters for MPEG-2, 3-pass mode ( 3 plus 1 for .vaf ), and a quality setting of 17 ( the latest recommended value ) and the noise filter "unchecked".
I had calculated the average bit rate to be 1,368Kbps, to create a file of the same size as the one created by TMPEG. It came out very close, at 1,362,127. At 60MB difference, a 4.4% advantage for CCE, but good enough for the test. A 4.4% in file size is not visible in quality. I send these parameters to a friend, who has a licensed version of CCE, so that he would encode the movie, because I don't have CCE. Not even a demo ( and I don't want it anyway ). The samples I posted are muxed with 224Kbps audio, and 30 seconds each. It's exactly the same section of both encodes. The CCE came out way smaller in size at 6,295KB, versus 7,526KB for TMPEG, which proves again my statement that CCE's X-pass mode cares about average size as specified, and doesn't care about quality. I'll explain that last statement in more detail later. Here are the two graphs made by bit rate viewer, where you can see the difference in quality, produced by TMPEG.
Here's CCE's sample graph:
Here is the clip:
http://ns1.shidima.com/kwag/cce-matr...480-mpeg-2.mpg
Here's TMPEG's graph:
Here's the clip:
http://ns1.shidima.com/kwag/tmpgenc-...480-mpeg-1.mpg
A detailed analisys of the graphs:
Take a very close look at both graphs, and note the "Peak" bit rate. In CCE, it's 1,652Kbps. In TMPEG, it's 2,254Kbs. What happened to the "INTELLIGENT" bit rate allocation of CCE. The MIN bit rate was set to 300Kbps and the MAX was set to 2,300Kbps in the encoder! It doesn't work. CCE was busy with it's muli-pass encoding, trying to balance the total bit rate assigned by the average value and not go overboard the final size.
FACT: CCE's X-pass VBR mode cares about a final size. There's nothing here about quality. It will create the best possible quality "within" the constraints of the min/avg/max bit rate values given.
Another thing to look at, very closely, is the average bit rate for this clip. In TMPEG, it's 1,630Kbps. In CCE, it's 1,375Kbps. Again, this value is lower in CCE, because the encoder is worried about bit rate allocation. Even that this scene needs a lot of bit rate, because it's an action scene, CCE didn't care about increasing the bit rate.
Let's look at the quality, the Quantization values:
The average Q factor for TMPEG in this clip is 1.79, with a peak value of 3.17.
The values for CCE are 2.56, with a peak value of 3.27.
Again TMPEG's quality factor was
almost twice better that CCE's value. 1.79 is way better than 2.56. It's clear in the graph.
Now if you look at both mpeg files with WinDVD, you'll see that CCE's mpeg is darker, an advantage over TMPEG for pointing out "mosquito effects" and artifacts. I believe the luminance level was set at 0-255 instead of 16-235 when it was encoded. Again, an advantage for CCE, because artifacts are damped with this color space.
But in reality, and to my surprise, CCE's mpeg file has more artifacts and "mosquito effect" than TMPEG!
If you step through the cce mpeg file, looking at the still screen shots of the clip ( by pressing "N" in WinDVD ) , you'll see the grainy (dirty?) mpeg result of CCE, specially on the fast panning scenes of the clip. I know this is not noticeable in a TV, barely on a HDTV, if viewed normally without pausing the movie. But my point is very clear.
Conclusion:
CCE is probably the best MPEG-2 software encoder.
TMPGEnc is probably the best MPEG-1 software encoder.
Which encoder produces the best quality, visually, mathematically, subjectively, every way you want to look at it, below 3Mbps?
TMPGEnc
Which mode produces the best quality?
CQ mode, at least with the new KVCD 704x480 CQ_VBR, KVCD's Q.Matrix and GOP
Please remember that CCE was used with the default Q. Matrix included with the program, and that the GOP can't be extended, as it is in TMPGEnc. That could be a factor for the large difference in quality.
As for the time to encode, TMPEG's total time was around 6 hours in a P4 @1.6Ghz using CQ-VBR mode. CCE's encoding time was
almost 16 hours!, also on a P4 @1.6Ghz.
Here's a cut of DVD2SVCD log's file:
--------------------------------------------------------
- 7/11/2002 4:51:16 PM
- Free on drive C: 12224.73 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------
- Editing AVS script file
Executing Frameserver.
Closing program
Executing Cinema Craft Encoder.
StreamSectors: 771186864
AudioSectors: 132753852
VideoPAPO: 9889668
ScanOffsetBytes: 235386
SeqAligningBytes: 14960088
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 1.00
PureMPEGStream: 613347866.00
Seconds: 8186.31
CalcMPEGStream: 613347866.00
Frames: 196155
CDSize: 740.00
Cut point 735.00
Variable Settings:
Frames: 196155
Anti Noise Filter: Off
Passes: 3
Image Quality: 17
VAF file creation: On
Video Encoding Mode: Multipass VBR
Min. bitrate: 300
Max. bitrate: 2300
Avg. Bitrate: 1368
Aspect Ratio: 4:3 (No borders, encoded as 4:3)
---AVS Begin---
LoadPlugin("C:\post-prod\tools\MPEG2DEC.dll")
mpeg2source("C:\THE_MATRIX_16X9LB_N_AMERICA\VIDEO_ TS\matrix-dvd2avi-176.d2v")
BilinearResize(704,352,0,0,720,480)
#TemporalSmoother(2,2)
AddBorders(0,64,0,64)
#Trim(0,196155).FadeOut(150)
#ResampleAudio(44100) # CCE 2.5 'crashfix' for Athlons
#== If you want this 'fix' permanently, edit the INI-file:
#== Under [AVSscript] set the CCEcrashfix-option to
#== CCEcrashfix=1
----AVS End----
Closing program
CCE Max Speed: 0.590
Video Encoding finished.
--------------------------------------------------------
- 7/12/2002 8:46:26 AM
- Free on drive C: 10804.96 mb
I haven't tried the new 2-pass of TMPGEnc plus against CCE's 3-pass mode. But the next run I do, will be TMPGEnc in MPEG-2 mode using our own Q. Matrix with CQ_VBR against this last run of CCE. That's my project for later today ( if I can ). So we'll see the results. As fas as quality is concerned, at 704x480, the KVCD MPEG-1 beta template at 704x480 is superior to CCE's MPEG-2 3-pass mode. Above 3Mbps, CCE WILL be superior, because MPEG-1's quality curve will not increase above that bit rate. MPEG-2 will, and using CCE will be a clear advantage.
This article has been posted at vcdhelp's forum simultaneously.
-kwag