Quantcast A Detailed Analysis of TMPGEnc vs. Cinemacraft - digitalFAQ.com Forums [Archives]
  #1  
07-12-2002, 04:33 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
07-12-2002, 08:18 PM
Timberwolf Timberwolf is offline
Free Member
 
Join Date: May 2002
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
A nice reading kwag!

At least you back up all your assertions(?) with samples and tests of which the procedure was detailed in steps for everyone to check and see.

The moderators and self-proclaimed "experts" at the other board just keep on repeating that CCE x-VBR is theoretically superior to TmpGenc CQ like a mantra and everyone is just supposed to believe it just like that. Where are their controlled tests and procedures and samples? Nothing so far.
Reply With Quote
  #3  
07-12-2002, 08:34 PM
a_star62 a_star62 is offline
Free Member
 
Join Date: Jun 2002
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Kwag, I think that you need to give the CCE boys a break. The only reason that they can achive the great filesize/compressoin/quality that TMPGEnc can is because they dont have you. Dont blame them for that.

Great Work!
Reply With Quote
  #4  
07-12-2002, 11:11 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks guys!

At least I know that my tests are real. There's no cheating there at all. What you see, is what you get
Maybe with the standard TMPEG Q matrix and GOP there's a difference, but I'm not going back to the past. We're moving forward at a pretty good speed

-kwag
Reply With Quote
  #5  
07-13-2002, 11:52 AM
tarsus tarsus is offline
Free Member
 
Join Date: May 2002
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Very intersting reading. I've always used Tpmepg for my vcd's and CCe for my svcd's, as I always found the mpeg1 quality with CCE alawys sucked big time, now after reading you analysis I can understand why, thanks.
Reply With Quote
  #6  
07-13-2002, 01:22 PM
slab slab is offline
Free Member
 
Join Date: Apr 2002
Location: Chicago
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Great post kwag!

Quote:
Originally Posted by kwag
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.
-kwag
Since you know I dabble with your templates in MPEG-2, I did some testing(704x480) and found that your new beta matrix is truely fine tuned for MPEG-1... Keeping the CQ, Min/Max,& VBV quality rates, I ran some test modes in MPEG-2 trying to match filesizes with comparable avg bitrates. Interesting find because the compression would not reach 5823... :P (Just kidding! ), but only 9*P was being achieved instead of 12, even with the gop limited to 48...the only way to acheive the same compression 1-5823(12)-3-1-48 was to dial tone your 5823 and replace the GOP to 1-12-3-1-0...This gave comparable filesizes(+/- 30Kb) the best by changing to VBV=38(+/- 9Kb) in my 30 sec test clip.

Here's my conclusion for your Matrix in MPEG-2, 2 words!... "NO CONTEST!" I found your MPEG-1 Matrix to be superior quality to MPEG-2 of similar filesizes in your (704x480)beta template! You da man!...I am anxious to hear what you conclude from your detailed testing in MPEG-2.

Better copyright that matrix...it's a winner! Even if that is not possible, you will definitely have the kwag police about the boards giving credit where credit is due!

Your hard work has put out an exellent template...Congrats!!!!
Reply With Quote
  #7  
07-13-2002, 09:37 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Result of TMPEG's MPEG-2 2-pass VBR with our Q.Matrix and GOP. The total file size of the video stream is 1,365,228.
The same parameters and .avs script were used as in CCE. Min=300, Avg=1,368 and MAX=2,300.
Here's the same sample, cut out of the mux of the .m2v and the audio file.
http://ns1.shidima.com/kwag/tmpgenc-...ass-mpeg-2.mpg

Now you can compare "TMPEG plus" new 2-pass VBR against the same clip done with CCE in 3-pass (which is really 4 ) mode. Is CCE worth it? You decide. My choice? TMPEG. Even at MPEG-2. CCE lost it's edge.

-kwag
Reply With Quote
  #8  
07-13-2002, 09:42 PM
MoovyGuy MoovyGuy is offline
Free Member
 
Join Date: Jun 2002
Location: Ottawa, Canada
Posts: 118
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Result of TMPEG's MPEG-2 2-pass VBR with our Q.Matrix and GOP. The total file size of the video stream is 1,365,228.
The same parameters and .avs script were used as in CCE. Min=300, Avg=1,368 and MAX=2,300.
I'm running those same sort of tests myself right now, and I'm finding that 2xVBR is producing better results with your K.Matrix and K.GOP than either CQ or CQ_VBR. I'm at the stage where I wittled my Min/Ave/Max values to roughly what you've stated .....

Very K.ool
Reply With Quote
  #9  
07-13-2002, 10:07 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Keep on crunching MoovyGuy
Let us know the results!

kwag
Reply With Quote
  #10  
07-14-2002, 10:44 AM
MoovyGuy MoovyGuy is offline
Free Member
 
Join Date: Jun 2002
Location: Ottawa, Canada
Posts: 118
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Keep on crunching MoovyGuy
Let us know the results!

kwag
Howdy y'all

I've posted the results here http://www.kvcd.net/forum/viewtopic.php?p=3648#3648

Let me know what you think ......

If I had a site to post them to I would, so that you could see for yourselves .....
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
BSD vs. GPL: A Framework for the Social Analysis kwag Off-topic Lounge 4 05-02-2004 09:07 AM
Avisynth: Analysis on BlockBuster kwag Avisynth Scripting 35 07-31-2003 11:26 AM
KVCD: detailed steps for using KVCDx3 template? cbr900 Video Encoding and Conversion 3 08-29-2002 06:45 AM
My experiment with cinemacraft encoder darkstar808 Video Encoding and Conversion 5 06-14-2002 12:35 AM
Using CinemaCraft with KVCD matrix? Omega Video Encoding and Conversion 7 06-07-2002 03:22 PM

Thread Tools



 
All times are GMT -5. The time now is 10:01 PM  —  vBulletin Jelsoft Enterprises Ltd