digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Bitrates: Testing CQMatic Versions (http://www.digitalfaq.com/archives/encode/4660-bitrates-testing-cqmatic.html)

vhelp 08-06-2003 06:42 PM

Evening "brickwalls :banghead: hitters" (you guys)

I've ben after this fact for the longest of times (eons) and in many
areas of concirn..

..to develop a consistant "testing platform" for new developing ideas
like CQM !!

Too many peoles have too many variables / differences in their setups
and processes and so on and so forth. Somthing "generic" has to be
implemented, or else things will get more involved, issue'wise :!:

I'll spare you all my regimin, and assume someone already has a working
flow plan ? Anyways, I agree that we need something like this for
these kinds of testings, AND to minimize the countless headaches that
could plague us all (mostly the developer) in achieving a goal.
Are you Matic, cause I'm Matic (jellen) anyways..

-vhelp

jorel 08-06-2003 07:23 PM

vhelp,one my opinion:

first we need one reference,
after everybody got perfect results with the same progs,scripts,etc,...
we can try some variables or this work will be so hard!
then after this perfect "reference",
the "generic" will be easy with some little changes!
see that if the same dvd movie is ntsc or pal, give differents results.

:)

vhelp 08-06-2003 07:26 PM

@ Jorel..

Quote:

Originally Posted by jorel
vhelp,one my opinion:

first we need one reference,
after everybody got perfect results with the same progs,scripts,etc,...
we can try some variables or this work will be so hard!
then after this perfect "reference",
the "generic" will be easy with some little changes!
see that if the same dvd movie is ntsc or pal, give differents results.

:)

Yea Jorel.. I agree :)
Preferebly, a movie that everyone has.. then we can MAP out the issues
as well as the success (pros and cons)

EDIT: - - this way, you build a "template" or "gauge" to use in future
testings.. :idea:

-vhelp

kwag 08-06-2003 08:17 PM

Well, I finished my test with the same movie. This is going to be a pain :!:
Look at the results:

I encoded "Red Planet" with this script and CQM 1.1.02:

Code:

## DLL Section ##
#
#LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
 
#
#
#
Mpeg2Source("K:\RED_PLANET\VIDEO_TS\red.d2v")
#

GripCrop(352, 480)
GripSize(resizer="BicubicResize")


GripBorders()
LetterBox(16, 16, 16, 16)
Limiter()

Plain and simple RAW .avs script. without filters.

First test:
352x480 MIN=523.83 MAX=2,000
CQ found: 80.25
Encoded file size: 834,313KB

Second test:
352x480 MIN=300 MAX =2,500
CQ found: 74
Encoded file size: 643,633KB

Both CQ values are incorrect :!:

The wanted file size by Moviestacker is 726,338KB

Now that is what I call a problem :!:
Look at the difference in file sizes, just from CQ 74 to ~80 8O

Here's my CQMatic log, with MIN=300, MAX=2,500:
Code:

http://www.kvcd.net
CQMatic Version 1.1.03
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 13:56:22 Date: 08/06/2003
Ready!
Project: K:\red.tpr

Creating: CQMatic.tpr

f:\temp\red.m1v
Execute.
Movie Time: 106
Average Bitrate: 919
Full Encode mode
Executing Prediction Phase...
Process started at 13:56:53
On 08/06/2003
Setting up initial sampling.
Using CQ of 79.80
Prediction cycle #1
Encoder started...
Process canceled
Project: K:\red.tpr

Creating: CQMatic.tpr

f:\temp\red.m1v
Execute.
Movie Time: 106
Average Bitrate: 919
Full Encode mode
Executing Prediction Phase...
Process started at 14:02:47
On 08/06/2003
Setting up initial sampling.
Using CQ of 79.80
Prediction cycle #1
Encoder started...
Process time: 4.75 minutes.
Encoder end.
File size difference  = 0.915482
Low fence: 2.000000
High fence: 79.800003
Last CQ = 79.80
Current CQ = 73.06
CQ difference = 6.744522
Using CQ of 73.06
Prediction cycle #2
Encoder started...
Process time: 4.73 minutes.
Encoder end.
File size difference  = 1.024159
Low fence: 73.055481
High fence: 79.800003
Last CQ = 73.06
Current CQ = 76.43
CQ difference = 3.372261
Using CQ of 76.43
Prediction cycle #3
Encoder started...
Process time: 4.87 minutes.
Encoder end.
File size difference  = 0.994805
Low fence: 73.055481
High fence: 76.427742
Last CQ = 76.43
Current CQ = 74.74
CQ difference = 1.686134
Using CQ of 74.74
Prediction cycle #4
Encoder started...
Process time: 4.75 minutes.
Encoder end.
File size difference  = 0.996434
Low fence: 73.055481
High fence: 74.741608
Last CQ = 74.74
Current CQ = 74.48
CQ difference = 0.266525
Using CQ of 74.48
Prediction cycle #5
Encoder started...
Process time: 4.75 minutes.
Encoder end.
File size difference  = 0.996678
Low fence: 73.055481
High fence: 74.475082
Last CQ = 74.48
Current CQ = 74.23
CQ difference = 0.247437
Using CQ of 74.23
Prediction cycle #6
Encoder started...
Process time: 5.33 minutes.
Encoder end.
File size difference  = 0.996914
Low fence: 73.055481
High fence: 74.227646
Last CQ = 74.23
Current CQ = 74.00
CQ difference = 0.229034
Using CQ of 74.00
Prediction cycle #7
Encoder started...
Process time: 4.80 minutes.
Encoder end.
File size difference  = 0.998487
Low fence: 73.055481
High fence: 73.998611
Last CQ = 74.00
Current CQ = 73.89
CQ difference = 0.111969
Encoding set to Full encode.
Full encode start...
CQMatic complete!
Total minutes of process: 34.10
Process ended at 14:36:53
On 08/06/2003


Here's the same .avs processed with ToK using MIN=523.83 and MAX=2,000:
Code:

=============================================================
ToK Log: K:\red-raw.avs
=============================================================
 
Resolution (fps):352x480 (23.976 fps)
Total Frames: 153232
Total Time  : 01:46:31
-------------------------------------------------------------
 
Audio Size: 89,474,000
Required Video Size: 729,726,000
 
Factor: 59.940
Desired Sample Size: 12,174,275
 
-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------
 
Full Sample
Next CQ: 80.000. Sample Size: 13,777,673
Small Sample
Next CQ: 80.000. Sample Size: 13,777,673
Predicting...
Next CQ: 70.690. Sample Size: 9,261,035
Next CQ: 76.020. Sample Size: 11,339,836
Next CQ: 77.696. Sample Size: 11,353,185
Next CQ: 78.662. Sample Size: 11,360,750
Next CQ: 79.222. Sample Size: 12,395,118
Next CQ: 79.022. Sample Size: 11,966,978
Next CQ: 79.120. Sample Size: 12,138,553

Exit Condition: 0.500 % reached ! yahoo !
Tries  : 8
 

Final CQ: 79.120
Total Time For Predicition: 00:21:59

Total Time (all operations): 00:21:59
 
Finished

And again with ToK, now MIN=300, MAX=2,500:
Code:

-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------
 
Full Sample
Next CQ: 80.000. Sample Size: 13,938,086
Small Sample
Next CQ: 80.000. Sample Size: 13,938,086
Predicting...
Next CQ: 69.876. Sample Size: 8,863,847
Next CQ: 75.710. Sample Size: 11,352,100
Next CQ: 77.464. Sample Size: 11,391,108
Next CQ: 78.488. Sample Size: 11,417,857
Next CQ: 79.093. Sample Size: 12,145,163

Exit Condition: 0.500 % reached ! yahoo !
Tries  : 6
 

Final CQ: 79.093
Total Time For Predicition: 00:17:11

Total Time (all operations): 00:17:11
 
Finished


In both cases, ToK predicted almost the same CQ, but by looking at the CQMatic log, a CQ of ~80 with MIN=523.83 and MAX=2,000 we know that the file will be over 100MB in size :!:
So at 79.093 it will still be way over. Then, probably with the same CQ, but MIN=300, MAX=2,500 it will be smaller.

So here we have it. Complete different results, by just a change in MIN and MAX, throws off file size in the range on hundreds of megabytes :!:
Now, I really believe that an alternate prediction method should be investigated, because the sampling method used in ToK, acp and CQMatic obviously doesn't work every time with TMPEG, and we've been lucky every time we hit a correct target. That's what I think.

-kwag

vhelp 08-06-2003 08:26 PM

Hi kwag..

If I can jump in here for a moment..

member how you favored so well, AVS v2.08 ??
Does that STILL apply today, or R U saying that this version was wrong
all along too ?? :roll:

Cause, if you're not saing so, then perhaps it's just an AVS v2.52 issue as
I've theorised all along.

Ok, so you've testd AVS v2.52 w/ CQM.. HOW ABOUT TESTING AVS v2.08
w/ CQM (at least w/ prediction only) to get an idea of what's what ??

At least try the above out, and see, so that you don't go pulling your hair
out over an NEW prediction method.

bye for now..
-vhelp

vhelp 08-06-2003 08:30 PM

@ Kwag..

Hay, I can't believe I'm actually quoating myself, for the first time.. anyways..

Quote:

Originally Posted by vhelp
Hi kwag..
Ok, so you've testd AVS v2.52 w/ CQM.. HOW ABOUT TESTING AVS v2.08
w/ CQM (at least w/ prediction only) to get an idea of what's what ??

At least try the above out, and see, so that you don't go pulling your hair
out over an NEW prediction method.
-vhelp

Since you're not using MA in your script, definately, most defenatly try again
w/ EXACT same script you used in above test w/ same params and things !!

-vhelp

kwag 08-06-2003 09:06 PM

Quote:

Originally Posted by vhelp
Hi kwag..

If I can jump in here for a moment..

member how you favored so well, AVS v2.08 ??
Does that STILL apply today, or R U saying that this version was wrong
all along too ?? :roll:

Cause, if you're not saing so, then perhaps it's just an AVS v2.52 issue as
I've theorised all along.

You have a point, which I missed :!:
I'm going to do an encode of "Red Planet", but directly from the .d2v project, bypassing AviSynth completely.
Thanks for bringing this up :)

-kwag

vhelp 08-06-2003 09:13 PM

@ Kwag..

Quote:

Originally Posted by kwag
Quote:

Originally Posted by vhelp
Hi kwag..

If I can jump in here for a moment..

member how you favored so well, AVS v2.08 ??
Does that STILL apply today, or R U saying that this version was wrong
all along too ?? :roll:

Cause, if you're not saing so, then perhaps it's just an AVS v2.52 issue as
I've theorised all along.

You have a point, which I missed :!:
I'm going to do an encode of "Red Planet", but directly from the .d2v project, bypassing AviSynth completely.
Thanks for bringing this up :)

-kwag

yes, directly via a .d2v file. That was what I ment in my previous post :!:

yes.. excellent !! great movie too, and I have on DVD :)
..note, I'm only trying to help, if I can - no matter how small :roll:

And, you're welcomed :flip:

-vhelp

Dano 08-06-2003 11:08 PM

Don't know if this is relevant or not but I had some problems with the July 17 version of AviSynth 2.52. I went back to the previous version and all is well again.

vhelp 08-07-2003 08:04 PM

Hi everyone.

@ Kwag..

I think I may have a "possible" cause of the issues w/ prediction havoc :!:

The answer may lie in viewing what happens to shorter-length clips ie,
1 VOB encodes or ~25 min. ( ie, movie, "Matrix" ) predicitions.

I won't say what happens, because I think you may jump the gun, and claim
it's something else or my debug in flawed :roll:
But, I must say, I did notice something, that I think might shed some light,
on the matter - maybe.

But, I'll have to run some more tests. I'm heading on to "Get Karter"
cause I also did that one in 1 VOB format (21 minutes)

Below are my "process" params.. follow it to the letter, to obtain the same
results as mine. But, first, here is the LOG file, followed by the process:

Only you will/might know what the issue(s) are after viewing/trying out the test for your self, since you are the developer of CQM :wink:

Please let me know what you think about this (after you've performed the
test(s) yourself) - K ??

Thanks for your attention,
-vhelp
.
.

Quote:

http://www.kvcd.net
CQMatic Version 1.1.02
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 20:18:35 Date: 08/07/2003
Ready!
Project: H:\en\v2.520-matrix.01.tpr

Creating: CQMatic.tpr

H:\matrix.mpg
Project: H:\en\v2.520-matrix.691x394.01.tpr

Creating: CQMatic.tpr

H:\matrix.mpg
Project: H:\en\v2.520-matrix.136x691x394.01.tpr

Creating: CQMatic.tpr

H:\matrix.mpg
Execute.
Movie Time: 136
Average Bitrate: 691
Prediction Only mode
Executing Prediction Phase...
Process started at 20:28:28
On 08/07/2003
CQ set for prediction
Setting up initial sampling.
Using CQ of 60.00
Prediction cycle #1
Encoder started...
Process time: 4.27 minutes.
Encoder end.
File size difference = 3.179569
Low fence: 60.000000
High fence: 90.000000
Last CQ = 60.00
Current CQ = 90.00
CQ difference = 30.000000
Using CQ of 90.00
Prediction cycle #2
Encoder started...
Process time: 4.30 minutes.
Encoder end.
File size difference = 2.867288
Low fence: 90.000000
High fence: 90.000000
CQ ABOVE watermark. CQ set to 90.0
Using CQ of 90.00
CQMatic complete!
Total minutes of process: 8.57
Process ended at 20:37:02
On 08/07/2003
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Quote:

* DVD TITLE: "Matrix"
- - - NTSC - 16:9 - 136 minutes

* RIP: smartripper v2.27
- - - ripped in File Mode

* CLIENT: dvd2avi v1.76
- - - forcedFilm, rgb, tv

* VFAPI: reader codec v1.04b
- - - default params, to psuedo .avi file
- - - "for frameserving in vdub to TMPG"

* FRAMESERVER: vdub v1.49["01.00.vdr"]
- - - Filters: nulltransform (for cropping/letterbox)

* Encoder: TMPG v2.520
- - - MPEG-2 ES (VidOnly) / 704x480 / IN(16:9) OUT(16:9)
- - - vid: 23.976 / 3:2pldn / 8bits /
- - - adv: progessive / field b / 16:9 / FS[KARatio]
- - - GOP: 1,5823,2,1,24 / [x] Output bitstream...
- - - Qua: "notch" / [x] Use floating point...

kwag 08-07-2003 08:12 PM

Hi vhelp,

You entered 136 minutes for a ~25 minute VOB :!:
That's why CQMatic gave you a CQ of 90.
You must enter the correct time in CQMatic, as it is used to calculate the size of the sample needed for the real target.

-kwag

vhelp 08-07-2003 08:19 PM

Hi Kwag..

Quote:

You entered 136 minutes for a ~25 minute VOB
That's why CQMatic gave you a CQ of 90.
You must enter the correct time in CQMatic, as it is used to calculate the size of the sample needed for the real target.
Ok, thanks.. but what about what I said above ??

In any case, I'm off to try "Get Karter".. just to see the results, to see if
I get the same experience I got w/ "Matrix"

In any event, I'll also try YOUR suggest w/ BOTH these movies afterwards :!:

Question:
* given the above, and your response to my movie lenth (136min) what
or how should I count-balance w/ respect to BITRATE.. assuming I want to
fill a CDR ie, 800mb w/ a 25 minute (Like I'm gonna do that, but you never
know) ... for BITRATE distribution, how should I "balance" it ??
* also, to minimize the amount of time spending on testing your CQM and
predition debuggin, how should I set the bitrate (if it needs to be) and the
time required, if I have ie, 25 minute VOB I want to test predictions with,
rater than waiting 55 minutes for prediction tests, maybe cutting it down to
something like, 5 to 10 minutes ??

Pretty lame questins, but can you give anything for each for them ??

Thanks for the assist and all,
-vhelp

kwag 08-07-2003 08:26 PM

Quote:

Originally Posted by vhelp

Ok, thanks.. but what about what I said above ??

In any case, I'm off to try "Get Karter".. just to see the results, to see if
I get the same experience I got w/ "Matrix"

In any event, I'll also try YOUR suggest w/ BOTH these movies afterwards :!:

Question:
* given the above, and your response to my movie lenth (136min) what
or how should I count-balance w/ respect to BITRATE.. assuming I want to
fill a CDR ie, 800mb w/ a 25 minute

You can't :!:
Because 25 minutes even at CQ=90, won't fill a CD-R ( with MIN=300, MAX=2,500 ) :!: CQMatic will always calculate a CQ of 90. 25 minutes is just too short, so even at CQ=100 and a resolution of 704x480, you won't fill a CD-R. Maybe, just maybe at 704x480 you get slightly under 90, but I don't think so, unless you set your audio to 224Kbps and MAX=4,000 :idea: :roll:

-kwag

vhelp 08-07-2003 08:33 PM

@ Kwag..

w/ respect to below, ok.. thanks.. I understand now.. and, it makes LOTS
of sense 8O dah..

One more thing.. about CQM, could you add in an option somewhere's
(even during copy to clipboard dialog box) a feature to CLEAR the contents
of the LOG, so that I can restart another predict test, w/out having to shut
it down, and start it up again w/ an empty window (minues your (c) .. ) ??

Thanks again, and testing "Get Karter" w/ CQMatic-1.1.02.exe anyways..

-vhelp
.
.

Quote:

Originally Posted by kwag
Quote:

Originally Posted by vhelp

Ok, thanks.. but what about what I said above ??

In any case, I'm off to try "Get Karter".. just to see the results, to see if
I get the same experience I got w/ "Matrix"

In any event, I'll also try YOUR suggest w/ BOTH these movies afterwards :!:

Question:
* given the above, and your response to my movie lenth (136min) what
or how should I count-balance w/ respect to BITRATE.. assuming I want to
fill a CDR ie, 800mb w/ a 25 minute

You can't :!:
Because 25 minutes even at CQ=90, won't fill a CD-R ( with MIN=300, MAX=2,500 ) :!: CQMatic will always calculate a CQ of 90. 25 minutes is just too short, so even at CQ=100 and a resolution of 704x480, you won't fill a CD-R. Maybe, just maybe at 704x480 you get slightly under 90, but I don't think so, unless you set your audio to 224Kbps and MAX=4,000 :idea: :roll:

-kwag


kwag 08-07-2003 08:47 PM

Quote:

Originally Posted by vhelp

Thanks again, and testing "Get Karter" w/ CQMatic-1.1.02.exe anyways..

Check your PM ;)

-kwag

vhelp 08-07-2003 08:55 PM

Hi Kwag..

Quote:

Originally Posted by kwag
Quote:

Originally Posted by vhelp

Thanks again, and testing "Get Karter" w/ CQMatic-1.1.02.exe anyways..

Check your PM ;)

-kwag

I'm off to testing CQMatic-1.1.03.exe now.. :)

I'm going to use the single VOB's time length.. ie, 21 minutes for the
movie "Get Karter" in this next (doing now)

I'm trying to cut down on the length of time it takes to test, in hopes that the
test will still hold up to "prediction" debuggin. If it does, great!! But, if it
does not, ..oh well, we'll have to live w/ the longer debuggin time :) and
use the full-length of movie, for testing/debuggin for ya :)

Sorry about the premature hype earlier. But, it did get up hehe 8)
-vhelp

vhelp 08-07-2003 09:17 PM

Kwag..

Just wanted to let you know, that CQMatic-1.1.03.exe did a better
job at finding a CQ value (for the 21 min test clip) - - gave me 50.17
in 22 minutes time vs. 55 minutes in previous testing of full-length movies.

I hope that it does't matter what length we use (shorter in my case) for the
prediction testings because of this. Please le me (us all) know if this does
taint the prediction process.

The way I read it, CQ 50.17 will fit my whole movie of "Get Karter" w/ 103 min.
onto one 800mb CDR !! (if I read/understood that correctly) ..yes ??

Listen, if using shorter length movie test clips is proved to be no valid for
CQM testing/debuggin, then WHY NOT USE IT ?? Will take less time to work
out the issues, not to mention, less headache :roll:

There's a bonus to useing shorter length test clips though :wink:

I'm off to give "Matrix" another go, but this time w/ 25 minutes..

Below, is my "Get Karter" LOG and Process, using only a 21 minute test VOB (via psuedo .avi for source) w/ latest CQMatic-1.1.03.exe:

-vhelp
.
.

-----------------------------------------

Quote:

http://www.kvcd.net
CQMatic Version 1.1.03
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 22:07:24 Date: 08/07/2003
Ready!
Project: H:\en\v2.520-getkarter.103x948x541.cqm(v1.1.03).tpr

Creating: CQMatic.tpr

H:\getkarter.mpg
Execute.
Movie Time: 21
Average Bitrate: 948
Prediction Only mode
Executing Prediction Phase...
Process started at 22:07:49
On 08/07/2003
CQ set for prediction
Setting up initial sampling.
Using CQ of 60.00
Prediction cycle #1
Encoder started...
Process time: 1.18 minutes.
Encoder end.
File size difference = 0.862505
Low fence: 2.000000
High fence: 60.000000
Last CQ = 60.00
Current CQ = 51.75
CQ difference = 8.249680
Using CQ of 51.75
Prediction cycle #2
Encoder started...
Process time: 1.20 minutes.
Encoder end.
File size difference = 0.938964
Low fence: 2.000000
High fence: 51.750320
Last CQ = 51.75
Current CQ = 48.59
CQ difference = 3.158630
Using CQ of 48.59
Prediction cycle #3
Encoder started...
Process time: 1.20 minutes.
Encoder end.
File size difference = 1.010314
Low fence: 48.591690
High fence: 51.750320
Last CQ = 48.59
Current CQ = 50.17
CQ difference = 1.579315
Using CQ of 50.17
Prediction cycle #4
Encoder started...
Process time: 1.52 minutes.
Encoder end.
CQMatic complete!
Total minutes of process: 5.12
Process ended at 22:12:56
On 08/07/2003
--------------------------------------------

Quote:

* DVD TITLE: "Get Karter"
- - - NTSC - forced film - 16:9 - 103 minutes

* RIP: smartripper v2.27
- - - ripped in File Mode

* CLIENT: dvd2avi v1.76
- - - forcedFilm, rgb, pc

* VFAPI: reader codec v1.04b
- - - default params, to psuedo .avi file
- - - "for frameserving in vdub to TMPG"

* FRAMESERVER: vdub v1.49["01.00.vdr"]
- - - Filters: nulltransform (for cropping/letterbox)

* Encoder: TMPG v2.520
- - - MPEG-2 ES (VidOnly) / 704x480 / IN(16:9) OUT(16:9)
- - - vid: 23.976 / 3:2pldn / 8bits /
- - - adv: progessive / field b / 16:9 / FS[KARatio]
- - - GOP: 1,5823,2,1,24 / [x] Output bitstream...
- - - Qua: "notch" / [x] Use floating point...

kwag 08-07-2003 10:09 PM

That looks good :)
Now everyone come in, and join the fun ( or the disaster :mrgreen: )
http://www.kvcd.net/CQMatic-1.1.03.exe

-kwag

vhelp 08-07-2003 11:31 PM

hi Kwag..

I got a stupid question to ask..

Is there any way to get TMPG's old encoding back, so that I can encode
JUST THE AUDIO portion of that last test sample I did ??

I haven't done anything to TMPG yet. I just want to change it to Audio Only
and then I'd like to MUX them (aud/vid) to one file. I want to fix the glitch
that's causing it to studdre in Windvd. Powerdvd plays it fine, but for those
that play it in windvd would not benefit from it otherwise. Is there anything
that I can do (regarding above) after finishing a CQM test, just to get the
audio portion of the SAME and last encode from CQM ??

Hope you understood that. Thanks,
-vhelp

kwag 08-07-2003 11:53 PM

Select "Prediction Only" in CQMatic. When the process is finished, run TMPEG. You'll have the last CQ already set. Just clear your range, select "System (Audio+Video") and add your audio in the "Audio Source" of TMPEG.

Now you can encode full Video + Audio.

-kwag

vhelp 08-08-2003 12:18 AM

Hi Kwag..

Quote:

Originally Posted by kwag
Select "Prediction Only" in CQMatic. When the process is finished, run TMPEG. You'll have the last CQ already set. Just clear your range, select "System (Audio+Video") and add your audio in the "Audio Source" of TMPEG.

Now you can encode full Video + Audio.

-kwag

Sorry old chap, but it's not working !!

It's encoding the whole thing (all 36,513 frames of the 21 min. vob)
I need it to encode the same prediction frames, but only the audio.

What I CAN do is let it go through the predict once, w/ auido and video,
and then when TMPG comes up again w/ MPEG-2 warning message, I can
copy the mpeg file to an new name, and then cancel out of CQM and TMPG
and then de-mulplex and reMUX - problem solved, but at an expense.

I guess, you hadn't accounted for anyone wanting to include audio during
the prediction phase ??

-vhelp

vhelp 08-08-2003 12:23 AM

@ Kwag..

regarding my previous post above, actually, what's happening is this.

It's going through the prediction phase just fine, but as soon as the last
prediction frames are processed, it stays on one frames, and continues to
encode blank frames, for the remaining 36,513 frames. If that helps any.

Note, the first few frames (from CQM prediction phase) are the same.

-vhelp

kwag 08-08-2003 12:27 AM

Did you Select your range of frames in TMPEG :?:
If you don't, it will continue to encode for the length of the audio :roll:

-kwag

vhelp 08-08-2003 12:34 AM

Kwag..

Quote:

Originally Posted by kwag
Did you Select your range of frames in TMPEG :?:
If you don't, it will continue to encode for the length of the audio :roll:

-kwag

No, no... I think you misunderstood me :!:

Ok, picture the scenario...

A - I use the "Matrix" rip (first 21 minute VOB) for the CQM predict testing.
B - I've now completed the (A) and have a small 2mb file thats only .m2v

But, I'd like to include the audio w/ this .m2v sample (frame for frame w/
audio)

So, you tell me, it can be done, and just redo it, but this time, w/ the setts
(audio + video) but it doesnt work that way.

What I want, is (B) above, and the audio to match it with. So, my theory
was that if I re-ran the CQM test w/ the same as in previous (video only)
test, but this time, either with Audio only, or Audio + Video.

If (Audio + Video) then I can de-MUX it and re-MUX - - but only if I have to.

Now do you understand what I'm asking ??

-vhelp

vhelp 08-08-2003 01:29 AM

Hi guys..

Sorry, I'm exhausted, w/ trying to get Audio either included w/ CQM's
predictions (w/ same video frames used in predict test encodes) or with
both audio and video together, but not the whole video, just the predicted
encoded video (and audio) all for MUXing purposes really. Anyways..

Since this can't be done (I've tried to no avail) below is what I encoded w/
CQM's predicted CQ of 39.86 !! So, it looks like it would take a CQ 39.86
to fit 136 minutes to fit on one 800mb cdr (based on 21 minute test VOB
computations)

* matrix.mpg.sample.21min.cq(39.86).rar

Note, make sure the extension name is .rar (not .mpeg) some browsers
will think it's an .mpeg and name the file that way. Just rename to .rar
and use WinRAR to extract the actual .mpg file !!

Be sure Powerdvd "Config Setup" properly for best viewing 16:9 ...
-------------------------------------------------------
* 4:3 Pan&ScanScreen...
[change to 1024 x 768]
[x] ask me before change

* 16:9 Widescreen...
[change to 1024 x 768]
[ ] ask me before change

* Screen Control...
[ ] Run full screen
[x] Keep screen Aspect Ratio
-------------------------------------------------------

Windvd gives very poor results w/ 16:9, and not to mention incorrectly too,
unless it's from an actual DVD disk.

I'm pooped, so good night !! :Drunk:
See you guys on TGIF day !!
-vhelp

kwag 08-08-2003 01:33 AM

Quote:

Originally Posted by vhelp

Now do you understand what I'm asking ??

-vhelp

Yes, but you can't run Audio + Video with CQMatic, because the formula used is for Video stream only.
I'll take that into consideration for a future version :!:
When I integrate the calculator, I'll set an "Audio" option, to take into consideration if it's a "Video Only" stream, or if it's a "Video + Audio" stream :)

-kwag

J-Wo 08-08-2003 12:50 PM

Wooaaaaah is something wrong with 1.1.04 here or what? So I'm encoding Terminator 2, Divx source, split into two parts. I'm working on part 1 right now which is 79 min and an avg bitrate of 1227 (from MS). First I ran prediction using 1.1.03 and it gave me a CQ of 83.76. So then I loaded the same project file into 1.1.04 but overode default CQ so it would start at 83.76, and it predicted CQ 58.91 after only 1 try! Then I did it again but this time started at default CQ 60 and after one prediction run it predicted that as the final CQ. Something smells fishy here? I'm going to encode at all three CQs to see which is actually accurate. Here's a copy of my log:
Code:

http://www.kvcd.net
CQMatic Version 1.1.04
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 13:38:25 Date: 08/08/2003
Ready!
Project: E:\Movies\T2 Special Ed Divx\part1.tpr

Creating: CQMatic.tpr

E:\Movies\T2 Special Ed Divx\part1.m1v
Project resolution: 528x480
Execute.
Movie Time: 79
Average Bitrate: 1227
Full Encode mode
Executing Prediction Phase...
Process started at 13:38:46
On 08/08/2003
Setting up initial sampling.
Using CQ of 83.76
Prediction cycle #1
Encoder started...
Process time: 1.93 minutes.
Encoder end.
File size difference  = 0.703311
Low fence: 2.000000
High fence: 83.760002
Last CQ = 83.76
Current CQ = 58.91
CQ difference = 24.850662
Using CQ of 58.91
Prediction cycle #2
Encoder started...
Process time: 1.90 minutes.
Encoder end.
Encoding set to Full encode.
Full encode start...
CQMatic complete!
Total minutes of process: 3.85
Process ended at 13:42:37
On 08/08/2003
Project: E:\Movies\T2 Special Ed Divx\part1.tpr

Creating: CQMatic.tpr

E:\Movies\T2 Special Ed Divx\part1.m1v
Project resolution: 528x480
Execute.
Movie Time: 79
Average Bitrate: 1227
Full Encode mode
Executing Prediction Phase...
Process started at 13:43:59
On 08/08/2003
CQ set for prediction
Setting up initial sampling.
Using CQ of 60.00
Prediction cycle #1
Encoder started...
Process time: 1.92 minutes.
Encoder end.
Encoding set to Full encode.
Full encode start...
CQMatic complete!
Total minutes of process: 1.92
Process ended at 13:45:54
On 08/08/2003


Bchteam 08-08-2003 03:03 PM

@ J-Wo

As Kwag already said, the prediction for Divx isn't accurate, because of Codec - related problems. You probably should use Tok for DivX Encodes.

@ All

The first full encode, which I predicted with CQMatic Version 1.1.0.4., is going to be done in 5 - 7 Minutes. It looks very promising, i'm at 98 % right now and the current Size is 674 MB. The target Size is 688 MB. I think, we found a solution. Cheers :D

Bchteam 08-08-2003 03:14 PM

Wohoo.... :ole:

The Process is done. The target size was 704.512 KB and the Final Size is 706.063 KB. Damn, that's so f*ckin' close. It's an awesome feeling, to have reliable prediction :o

Krassi 08-08-2003 03:16 PM

Hi Bchteam,

great to hear that :D Can you post some details :?: I would like to know how you calculated your average bitrate.

Bchteam 08-08-2003 03:18 PM

I used Moviestacker 2.0 for the average Bitrate.

What exact details you wanna here ?

Krassi 08-08-2003 03:22 PM

Did you use the MA-script :?:
I ask because i'm currently testing without filters. The value given by moviestacker is giving me a slighty oversized file. I think CQMatic does a good job, maybe the problem is the given average bitrate.

Bchteam 08-08-2003 03:25 PM

That's the Script:

Code:

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("J:\2009\2009Project.d2v")
#
Telecide()
Decimate()
undot()
Limiter()
asharp(1, 4)
BicubicResize(528, 480, 0, 0.6, 0, 0, 720, 576)
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,1, 1) ")

#
#
#

LetterBox(16, 16, 24, 24)
Limiter()

#
#
## Functions ###

function fmin(int f1, int f2) {
  return (f1<f2) ? f1 : f2
}
#
####

I can't confirm that Moviestackers Avg. Bitrate is causing too high file sizes.

kwag 08-08-2003 10:32 PM

CQMatic 1.1.06 test result on interlaced material.
 
Just finished my "Styx - Return to Paradise" encode.

Processed directly via .d2v (no filters) and used TMPEG's internal deinterlacer (double).
CQMatic 1.1.06 calculated CQ of 31.32. Low because of 528x480 "Full Screen" encode, but this was just for a final file size test.
Moviestacker wanted file size: 724,391.25KB
FInal encoded file size: 735,946KB
For a difference of +1.57% :mrgreen:

-kwag

totonho03 08-09-2003 09:10 AM

Hello Kwag:

Yesterday, I tried a couple of things, using CQm v1.1.06:
1.- I started doing a prediction on a short 20 minutes clip, but Moviestacker gave me an average bit rate of 5,000+. After I while I aborted this test, thinking that the prediction was erroneous. In addition to that, the min bit rate would have been higher than the max range of 2000, and I did not know what results CQmatic would have given me had I used such high average bit rate.
2.- I also started a second prediction, this time with the full 120 minutes, using avi (d2v) as my source. The resolution was 528 X 480, and it gave a prediction of about 41.+. Actually I stopped it in its 5th run, because I thought that it was given me a low CQ.
3.- Next was the full encode, on the same film that I was testing before, using avi as source, and a resolution of 352X480. The results are:

Target range: 682 Meg (Moviestacker)
Encoded size: 668 Meg. Which is within 2% of what I wanted
Which is great. You may remember that I was getting CQs ranging from 51 to 90, with file sizes anywhere from 1.2 G to 900+ megs. Now it is within 2%!!!!!!!!!!!! :D

There is an issue that I would like advise:
In viewing the M1V file, via your kvcd player, I noticed that the video is horizontally stretched. The movie is anamorphic, and the ratio setting that I am using in Tmpgenc is 16:9. Is this correct or should I use different settings? ( As in 1:1?)

Thanks an regards

Totonho

kwag 08-09-2003 11:26 AM

Quote:

Originally Posted by totonho03

There is an issue that I would like advise:
In viewing the M1V file, via your kvcd player, I noticed that the video is horizontally stretched. The movie is anamorphic, and the ratio setting that I am using in Tmpgenc is 16:9. Is this correct or should I use different settings? ( As in 1:1?)

Hi Totonho,

The KVCD player uses the same engine as WMP. So the aspect will look wrong in both players. Use WinDVD or PowerDVD for playback ;)

-kwag

vhelp 08-09-2003 12:20 PM

Hi totonho,

Quote:

There is an issue that I would like advise:
In viewing the M1V file, via your kvcd player, I noticed that the video is horizontally stretched. The movie is anamorphic, and the ratio setting that I am using in Tmpgenc is 16:9. Is this correct or should I use different settings? ( As in 1:1?)
If you wnat TRUE'est aspect ratio play for 16:9 encodes (encoded to 16:9)
and, which I label as OUT(16:9) you should really use only PowerDVD.
I use v3.0 but I would assume/suspect that any version over v3.0 would do.
.
.
and follow it w/ these config setting, for max TRUE'est 16:9 playing pleasure:

Be sure Powerdvd "Config Setup" properly for best viewing 16:9 ...
-------------------------------------------------------
* 4:3 Pan&ScanScreen...
[change to 1024 x 768]
[x] ask me before change

* 16:9 Widescreen...
[change to 1024 x 768]
[ ] ask me before change

* Screen Control...
[ ] Run full screen
[x] Keep screen Aspect Ratio
-------------------------------------------------------

And, you can test this view out, w/ the sample I have here:
* SAMPLE Encodes.. KDVD; KVCD; CVD; SVCD; VCD and "x"
...and, look for #6, which is my latest one.

It's a very low bitrate encode, based off a CQM topic, but do giev it a try
anyways, to get the feel for what I'm talking about !!

playing in normal windowed size (16:9 non-fullscreen view) really bring out
the 16:9 feel, not to mention the FullScreen 16:9 view too, but the windowed
view will deffinately tell you the TRUEth of 16:9 encodes.

Note, this is for MPEG-2 encodes to 16:9 output :!: :!:

If you play your encodes w/ anything else WinDVD or Zoom or any other
app that claims 16:9, then you're only jipping yourlsef w/ thoughts of:
:eeks: and :screwy:

DYSAF, and follow my regimin, and you'll thank me (perhaps, later) :!:
-vhelp

totonho03 08-09-2003 01:16 PM

Hello gentlemen:

@kwag: I am wieving the film with Powerdvd, and it looks stretched indeed. I have viewed both the original vob file, as well as the M1V and mpg versions of the same film. The vob file looks very good in Power DVD, but the encoded M1V and Mpg files are stretched.

@vhelp: I have setup my powerdvd with the settings you provided. and it did not help. as mentioned above, if the vob file plays ok, then the encoded file should also play Ok, if it was encoded properly. The input to the encoder came directly from dvd2avi, with no filters, and it was encoded using the 16:9 ratio. Perhaps I need to encoded using different ratio settings. While I may not be able to experiment today, I will do that tomorrow afternoon.

At least CQmatic is working!!!!!!!! :D

Thank you guys for your help and advise.
Regards

Totonho03

vhelp 08-09-2003 01:30 PM

hi totonho,

Quote:

@vhelp: I have setup my powerdvd with the settings you provided. and it did not help. as mentioned above, if the vob file plays ok, then the encoded file should also play Ok, if it was encoded properly. The input to the encoder came directly from dvd2avi, with no filters, and it was encoded using the 16:9 ratio. Perhaps I need to encoded using different ratio settings. While I may not be able to experiment today, I will do that tomorrow afternoon.
The reason why it did not play, is because there is no 16:9 suport for VCD,
or MPEG-1 :!:

I know that TMPG has the 16:9 setting (even for MPEG-1 encodes) but I think
that this may be an oversight, that it includes this features setting for MPEG-1
or that maybe, perhaps its there just for the "Aspect Ratio" of things, but
nothing more.

MPEG-2 has the flag for 16:9, but AFAIK, MPEG-1 does not, hence your
proof during play, in PowerDVD and standalone DVD player (as in my
experience too, hence my conclusion as well on this 16:9 issue for MPEG-1
sources)
.
.
But, don't be fooled by the 16:9 output for MPEG-1, when you view it in
Zoom player or any other SW player out their. It's just stretching it to look
like 16:9 (giving you the illusion of 16:9 w/ those letterbox bars)

That's why I made certain, I stated that the 16:9 settings and all, for the
SW PowerDVD v3.0 was for MPEG-2 encodes only !!

Now, you can restle this all you want, till you're BLUE in the face, but you'll
get nowheres, when you finally play it in your standalone DVD player !!

Have you at least even looked at the sample I posted, to get the feel for
what I am on to here ??

FWIW here, when you see me writing like this:
* IN(16:9) means your source is 16:9 aspect ratio
* OUT(16:9) means you encoded the IN(16:9) source to output 16:9 !!

Sorry for the ..off topic.. here!

Hope that helps a bit :)
-vhelp

totonho03 08-10-2003 03:27 PM

Hi vhelp:

Thanks for your answer. I tried downloading your sampler, but for some reason my computer thinks that this is an mpeg file, and I was not able to downloaded as a RAR file. I will try again later on today.

Thanks

Totonho


All times are GMT -5. The time now is 12:09 AM  —  vBulletin © Jelsoft Enterprises Ltd

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