digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   A detailed analysis of TMPEG vs. CinemaCraft (http://www.digitalfaq.com/archives/encode/620-detailed-analysis-tmpeg.html)

kwag 07-12-2002 04:33 PM

A detailed analysis of TMPEG vs. CinemaCraft
 
Subject: A detailed analysis of TMPEG vs. CinemaCraft


Well, because i got fed up by reading incorrect posts ( at another site :wink: ), 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:
http://www.digitalfaq.com/archives/error.gif
Here is the clip:
http://ns1.shidima.com/kwag/cce-matr...480-mpeg-2.mpg


Here's TMPEG's graph:
http://www.digitalfaq.com/archives/error.gif
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

Timberwolf 07-12-2002 08:18 PM

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.

a_star62 07-12-2002 08:34 PM

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!

kwag 07-12-2002 11:11 PM

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 :lol:
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 8)

-kwag

tarsus 07-13-2002 11:52 AM

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.

slab 07-13-2002 01:22 PM

Re: A detailed analysis of TMPEG vs. CinemaCraft
 
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!!!! 8)

kwag 07-13-2002 09:37 PM

Result of the same movie encoded as MPEG-2 with "TMPEG
 
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

MoovyGuy 07-13-2002 09:42 PM

Re: Result of the same movie encoded as MPEG-2 with "TM
 
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 8)

kwag 07-13-2002 10:07 PM

Keep on crunching MoovyGuy :lol:
Let us know the results!

kwag

MoovyGuy 07-14-2002 10:44 AM

Quote:

Originally Posted by kwag
Keep on crunching MoovyGuy :lol:
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 .....


All times are GMT -5. The time now is 04:27 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.