digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Bitrates: CQMatic/CalcuMatic (http://www.digitalfaq.com/archives/encode/4595-bitrates-cqmatic-calcumatic.html)

kwag 07-19-2003 06:54 PM

Quote:

Originally Posted by black prince
I'm keeping my fingers crossed that file prediction
will go just as smoothly. :)

So Im I, but I have a strong feeling it will not :mrgreen:
But I'll do my best to surprise everyone ;)

Edit:
Hey!, I just noticed CQMatic is only ~24 hours old :)
Doesn't do much, but ~90% is already finished :D

-kwag

vhelp 07-19-2003 07:42 PM

Hay Kwag..

Actually, there were a few things I didn't quite get in your
instructs..

You have to first launch TMPG, and create a .TPR file of your project ie,
I used my dvd movie, DOGMA.

Question...
When I create my .TPR file (above) and I set it up the way I would
normally do so, and finally, point CQMatic to it, will it take
over my settings, ie, CQ value etc. ?? ??
Just curous.

I'm a pain in the butt, I'm a pain in the butt.. but,

* Could you add in a CLEAR button, to clear that LOG window ??

Well, I'm testing it out now. If I have any thingelse
further to add, I'll do so here.

-vhelp

vhelp 07-19-2003 07:48 PM

ok, one more question, please.

Is there another method of obtaining the Average bitrate, instead of
using MovieStacker ??

I ask, case I don't have (or want) it installed at this time. Is MS using that
forumula to obtain Ave bitrate, that you posted earlier, what MS uses ??
.
.
cause I'll use it for now.

Well, for now, I'm going to guess at the AVe for the movie, DOGMA.
Lets say, 900kb for starts.

Really, thanks again :)
-vhelp

kwag 07-19-2003 07:48 PM

Quote:

Originally Posted by vhelp
Hay Kwag..

Actually, there were a few things I didn't quite get in your
instructs..

You have to first launch TMPG, and create a .TPR file of your project ie,
I used my dvd movie, DOGMA.

Question...
When I create my .TPR file (above) and I set it up the way I would
normally do so, and finally, point CQMatic to it, will it take
over my settings, ie, CQ value etc. ?? ??
Just curous.

It will read you project file, and create a new temporary one. Yours is not modified at all :!:
Quote:


I'm a pain in the butt, I'm a pain in the butt.. but,

* Could you add in a CLEAR button, to clear that LOG window ??
I'll add more stuff later. Now I'm focused on functionality, starting on file prediction routines now.
Quote:


Well, I'm testing it out now. If I have any thingelse
further to add, I'll do so here.
Great :)


-kwag

kwag 07-19-2003 07:53 PM

Quote:

Originally Posted by vhelp
ok, one more question, please.

Is there another method of obtaining the Average bitrate, instead of
using MovieStacker ??

Yes. There are many average bitrate calculators all over the net :!: . Bitrateviewer, FitCD, MovieStacker, some Javacript calculators at vcdhelp, etc.
Quote:


I ask, case I don't have (or want) it installed at this time. Is MS using that
forumula to obtain Ave bitrate, that you posted earlier, what MS uses ??
You don't know what you're missing :!: You're missing the most precise calculator available :cool:

-kwag

vhelp 07-19-2003 07:55 PM

Hi kwag.. :)

Progress..

I have successfully tested your quicky app and as far as I can tell, it
passed w/ flying colors :!:

But, it did what it's was suppose to right ??

One thing I noticed, that I hope to see in a future version, is a

* [x] keep TMPG open after completion
.
.
so that I can see where TMPG left off, or for debuggin purposes.
* clear button
* [x] keep TMPG open after completion

Can't think of anything else just yet. Only first run, K ??
-vhelp

totonho03 07-19-2003 08:31 PM

This is a first!!!
 
Maestro Don Kwag:

Milagro de milagros...........so far, everything is working here as well. I had no problems creating a 4 minutes clip, using dvd2avi, by the way, the script works very good, which means that my notepad is not introducing any foreign characters; then followed your instructions and created the file in Tmpgenc. I just tested it with video, my next step is to do it with audio as well. (Output of headac3 to Tmpgenc audio folder, correct?)

Thanks Kwag

Totonho03

kwag 07-19-2003 08:38 PM

Quote:

Originally Posted by vhelp
Hi kwag.. :)

Progress..

I have successfully tested your quicky app and as far as I can tell, it
passed w/ flying colors :!:

But, it did what it's was suppose to right ??

It should start TMPEG, and encode your project with your settings. Nothing else.
Quote:


One thing I noticed, that I hope to see in a future version, is a

* [x] keep TMPG open after completion
That is the default I have it set, after the prediction passes. Only on prediction, it has to close, in order to iterate to find CQ. But on the last run, the full encode, it will stay open after it ends.

Here's cqmatic Version 0.92 Alpha. Still doesn't do prediction, but now the interface is I believe 99% finished, and with a little of my own personal touch ;)
www.kvcd.net/cqmatic.exe

-kwag

vhelp 07-19-2003 08:41 PM

hi Kwag..

Thanks for the quick response :)

[quote="kwag"]
Quote:

Originally Posted by vhelp
Hi kwag.. :)
Here's cqmatic Version 0.92 Alpha. Still doesn't do prediction, but now the interface is I believe 99% finished, and with a little of my own personal touch ;)
www.kvcd.net/cqmatic.exe
-kwag

Will try out your latest update !!

Keep up the good work.
-vhelp

kwag 07-19-2003 08:42 PM

Re: This is a first!!!
 
Quote:

Originally Posted by totonho03
I just tested it with video, my next step is to do it with audio as well. (Output of headac3 to Tmpgenc audio folder, correct?)

It doesn't matter where you put it, because as long as you have a valid .tpr project saved, I will follow that ;)
That's the main reason I designed the program with this approach. Same will be with CCE and MainConcept (MCE).
You set all your parameters on the "ECL" file (CCE), and on the "*.mef" (MCE), and you have the control on the tailoring that the encoder provides. CQMatic will just automate the CQ process :)

-kwag

jorel 07-19-2003 08:44 PM

working like a charm, don't need to say!
:wink:

i got CQMatic again.

thanks.
:D

kwag 07-19-2003 08:44 PM

Quote:

Originally Posted by vhelp
hi Kwag..

Thanks for the quick response :)

Will try out your latest update !!

Keep up the good work.
-vhelp

Careful with the helicopter ;)

-kwag

kwag 07-19-2003 08:49 PM

Quote:

Originally Posted by jorel
working like a charm, don't need to say!
:wink:

i got CQMatic again.

thanks.
:D

Well, I guess the user interface (and all conditions and constraints too ) are done for now, and nobody has reported any bugs or errors. That's good :)
Now I'm on the last 5% of coding, which will really be another 95% of coding time :x :lol:
I hope my goal of finishing this by tomorrow is fulfilled, but I really doubt it :!:
Now is when the real testing begins :cool:

-kwag

vhelp 07-19-2003 08:56 PM

@ Kwag..

Progress..

You latest update is working fine, including your animating button hehe :wink:

-vhelp

kwag 07-19-2003 08:58 PM

Quote:

Originally Posted by vhelp
You latest update is working fine, including your animating button hehe :wink:

Gives you something to stare at, after a couple of beers during long encodes :mrgreen:

totonho03 07-19-2003 11:40 PM

Thanks for your response Kwag. However, my scriptproblem came back again, I am so frustrated with it. I am really beginning to believe that I have something wrong with my set up. Not wanting to clutter this thread with my problem, I have posted my request for help within the Avisynth area.
Thank you again

Totonho03

black prince 07-20-2003 04:59 AM

@totonho03,

totonho03 wrote:
Quote:

Thanks for your response Kwag. However, my scriptproblem came back again, I am so frustrated with it. I am really beginning to believe that I have something wrong with my set up. Not wanting to clutter this thread with my problem, I have posted my request for help within the Avisynth area.
Thank you again

Totonho03
I had the same problem and uninstalled and re-installed avisynth 2.52.
Everything is working again. Seems from time to time (what a curse),
avisynth 2.5.2 needs re-installing, especially when installing another
codec as I reciently have done. Tok still has problems for me no matter
what I do. So far, CQmatic is just what I need :)

-bp

jorel 07-20-2003 07:54 PM

today i did some more tests with CQMatic,
more or less 398f0093872ff times.

all is ok, no problems.
:D

the best:
CQMatic will be better and better!
:wink:

Avalon 07-21-2003 12:27 AM

When will come your next version?

kwag 07-21-2003 03:03 AM

First official BETA released!
 
I'm very pleased to announce the first working version of CQMatic :)
Version 0.92 BETA 1 http://www.kvcd.net/cqmatic.exe
*** Please *** note that prediction is still very flaky :!:
Other than that, the program should run a complete cycle of prediction, and then either exit after prediction, or do a full encode. Depends if you selects "Full Encode" Or "Prediction Only" "toggle" button.
The program supports CQ AND CQ_VBR modes ONLY :!:

Todo:
* Add timer to log. To keep track of prediction, encoding times, etc.
*Check MIN, MAX CQ boundaries. Right now, the program doesn't check MIN CQ or MAX CQ, so It may go wild on some weird sources :!:
* Verify prediction accuracy
* Add user precision selection
* Add log file on disk


Notes:
TMPGEnc Project file must be saved as "text" file. CQMatic will not read TMPGEnc's propietary project files.
You must make sure that you save the project without source range selection, and "Cut editing" cleared (or reset). Normally, that is the default. But if you have done source editing, make sure you clear the list, and "Uncheck" source range. If you don't, CQMatic will run, but TMPEG will abort because of errors.
CQMatic was tested with TMPGEnc version 2.520. It should work with versions 2.513 ( and possibly with earlier version, down to around 2.58 )
CQMatic can be used to make KVCDs, SKVCDs, KDVDs, VCD, SVCD, DVD, etc, because you have full control of all parameters on the encoder. So anything configurable in TMPGEnc is now CQmatic'ized (:lol:), either MPEG-1 or MPEG-2

Please report bugs or anomalies on the "CQMatic Bug Reports" thread.

Enjoy :)
-kwag

TLTw 07-21-2003 04:04 AM

trying out CQMatic right now :bugeyes:

I dont frequent this forum as often as i should, but everytime i come here it just keeps getting better and better all the time, always something new to learn here :)

shouts out to the krew who work so damn hard here to produce the BEST video on 1 80 min cdr around...

TCC 07-21-2003 04:20 AM

@kwag

Will you be making some sort of guide or instructions on how to use/setup CQMatic for newbies or for those that have been out of the loop for quite some time :?: http://www.digitalfaq.com/archives/i.../2003/07/1.gif

kwag 07-21-2003 04:30 AM

Quote:

Originally Posted by TCC
@kwag

Will you be making some sort of guide or instructions on how to use/setup CQMatic for newbies or for those that have been out of the loop for quite some time :?: http://www.digitalfaq.com/archives/i.../2003/07/1.gif

If you know how to use TMPEG, you can use CQMatic :)
CQMatic is tightly coupled to TMPEG's project file. So after you set up TMPEG, and you have all your options set, just run CQMatic and load your project file, movie minutes, and average bitrate for your target. That's all :)
I forgot to mention, that because CQMatic doesn't load .dv2 or .avs files ( only .tpr files ), there are no limitations to it's use :!:
That is, anything that can be processed with TMPEG, will be automated by CQMatic. So you don't need AviSynth, or other frameserving programs if you don't want them :!: ( But as always, I suggest to use AviSynth, because you'll get the the best filters available ;) )
As for a guide, I believe Avalon just posted a message saying that he is doing one :D

-kwag

Avalon 07-21-2003 06:29 AM

Jeep and i'm finished!

Go for it!!!!!!!!!!!!!

:arrow: Avalon's CQMatic Guide (English)

ezysk 07-21-2003 08:44 AM

Curious to know,how it will compare to Tok.

kwag 07-21-2003 11:22 AM

Quote:

Originally Posted by ezysk
Curious to know,how it will compare to Tok.

It's a complete different approach to ToK.
ToK will process .avs and avi files only, but then, it's more complete in the sense that it will also process audio and the mux your files. On the other hand, the MPEG-1 and MPEG-2 generation are more strict, because if you want to create, say a DVD for PAL, you have to edit the "video.en1" files by hand, and then process with ToK.
CQMatic, relies on the encoder features, so once you set up TMPEG to whatever you want to create, CQMatic simply automates the process to find optimal CQ ( Well, once I finish it :lol: )

Edit: And I forgot to mention, that CQMatic accepts project files for both CQ and CQ_VBR ;)

-kwag

bigggt 07-21-2003 06:57 PM

OK having some problems,kind of lost.

When i use cqmatic it starts to do a full encode no matter if i pick full encode or prediction.

i made my script per usual then opened tmpge loaded my avs and set all the settings and then saved tmpge text project.

OPen cqmatic open project selected saved text project,put 81 in minutes and 1240 as average bitrate.

What am i doing wrong,am i suppossed to but a sampler line in my avs script

PLease help :D

Thanx

J-Wo 07-21-2003 08:11 PM

Thanks for the email about this program Kwag! (I'd like to think it was a personal one and not some automated thing because I'm a forum member :wink: )

I have one important question though. What should we be setting our MAX and MIN video bitrate at? Traditionally it's been 2500 and 300 respectively, but in one of your latest threads in the File Prediction forum, you suggest a MAX of 2000 and a MIN = 0.57*(avg bitrate). So does it matter what we put in there, will CQmatic automatically change it since you ask to input the avg bitrate? Just a bit confused on this one!

kwag 07-21-2003 09:04 PM

Version 0.92 BETA 2 is up :!:
www.kvcd.net/cqmatic.exe

Changes:
Added: Boundary check not to go below CQ of 1 or above CQ of 90 ;)
Fixed: Avoid eternal looping trying to find CQ, by inserting "trigger" high/low CQ check point markers, and avoid re-entry of "Under" and "over" previous tried CQ values.
Added: When pressing cancel, now you get: "Are you sure you want to abort the process?" Y/N Box ;)
Fixed: MANY File prediction algorithm adjustments. Now let's see if it's better ;)

-kwag

kwag 07-21-2003 09:08 PM

Quote:

Originally Posted by J-Wo
Thanks for the email about this program Kwag! (I'd like to think it was a personal one and not some automated thing because I'm a forum member :wink: )

It was a global personal message :D
Quote:


I have one important question though. What should we be setting our MAX and MIN video bitrate at? Traditionally it's been 2500 and 300 respectively, but in one of your latest threads in the File Prediction forum, you suggest a MAX of 2000 and a MIN = 0.57*(avg bitrate). So does it matter what we put in there, will CQmatic automatically change it since you ask to input the avg bitrate? Just a bit confused on this one!
Keep the MAX at 2,000 and MIN = 0.57*(avg bitrate) ( Or average - 43% ) The one easier for you ;)
CQMatic doesn't touch your project settings. Data in = data out ( Or trash in = trash out :mrgreen: )

-kwag

kwag 07-21-2003 09:16 PM

Quote:

Originally Posted by bigggt
What am i doing wrong,am i suppossed to but a sampler line in my avs script

Remove all file prediction stuff from your script. CQMatic uses it's own file prediction ;)

-kwag

bigggt 07-21-2003 09:22 PM

heres my script

Quote:

## DLL Section ##
#
LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp.dll")
LoadPlugin("C:\Filters25\unfilter.dll")
LoadPlugin("C:\Filters25\undot.dll")
#
####

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

## Main section and static filters ###
#
AviSource("C:\MY Movie.avi")
#
undot()
Limiter()
asharp(1, 4)
BicubicResize(496, 318, 1/3, 1/3, 8, 0, 560, 304)
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 >= SwitchThreshold ? \
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) ")

#
#
#

AddBorders(16, 81, 16, 81)
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####
when i load it it encodes 116189 frames but the video is actually just the sample

another thing is when i save my tpr file without source range checked everytime cqmatic opens tmpge the source range is checked 8O

J-Wo 07-21-2003 09:23 PM

Quote:

Originally Posted by kwag
Keep the MAX at 2,000 and MIN = 0.57*(avg bitrate) ( Or average - 43% ) The one easier for you ;)

Perfect, that's what I wanted to know! I really think you should edit your first post to include this because I doubt everyone knows that's the "in" thing to do now. :wink:

BTW, v0.92 beta 2 doesn't work at all! Nothing happens when I execute the EXE file. I see a dos window box flash briefly and that's it. 8O :!:

kwag 07-21-2003 09:29 PM

Quote:

Originally Posted by J-Wo

BTW, v0.92 beta 2 doesn't work at all! Nothing happens when I execute the EXE file. I see a dos window box flash briefly and that's it. 8O :!:

The upload was corrupted. Download it again. Sorry ( Blaim M$ ftp client :x )

-kwag

kwag 07-21-2003 09:35 PM

Quote:

Originally Posted by bigggt
when i load it it encodes 116189 frames but the video is actually just the sample

116189 frames, that's not a sample, that's the complete movie 8O
Quote:


another thing is when i save my tpr file without source range checked everytime cqmatic opens tmpge the source range is checked 8O
That's the way it works :)
CQMatic takes charge of TMPEG ;)

The way I set the sample files, for example if your movie's name is boon.m1v, after the CQ is found, the sample is renamed to boon.m1v-Sample and the encoded movie as boon.m1v
So you can keep your samples around, although you'll probably get a headache watching the CQMatic high speed sample ;)

-kwag

kwag 07-21-2003 09:46 PM

Just to let everyone know that I just finished running CQMatic 0.92 BETA 2 on 5 movies (Prediction only ) to verify accuracy:
The Boondock Saints, Count of Monte Cristo, K-Pax, K19 and Sum of all fears, and ALL hit the CQ with less than .1% difference of the CQs I had calculated manually :mrgreen:
These 5 movies were previously encoded, and all were <2% final size compared to the video stream information in MovieStacker.
This were NTSC movies, so I need some PAL feedback :!:

-kwag

J-Wo 07-21-2003 10:23 PM

okay kwag, giving beta 2 a whirl... it's just finished the prediction cycle for an xvid movie I have. Even tho it was super widescreen the CQ was 49.25... anyway I'll see what the results are like in the morning.

BTW I just realized, how does CQMatic know how much to save for audio size? In its beta stage is it hardcoded for 128kbps only or what?

kwag 07-21-2003 10:34 PM

Quote:

Originally Posted by J-Wo

BTW I just realized, how does CQMatic know how much to save for audio size? In its beta stage is it hardcoded for 128kbps only or what?

CQMatic doesn't know anything about audio. That's why you need MovieStacker or another bitrate calculator. Once you set MovieStacker with your audio bitrates, the video average bitrate is automatically calculated. Also if you set the number of target CDs, etc, the average will also change. So CQMatic only needs to know the average bitrate and the movie time. Everything else is Auto(CQ)Matic ;)

-kwag

Avalon 07-22-2003 01:42 AM

Quote:

It was a global personal message
Great note!!!!!

OK! I'm YOUR PAL MAN!!!! If I finished with my now running movie I'll test Your new beta 2 Version...

Let's see how it works now...

kwag 07-22-2003 01:54 AM

Quote:

Originally Posted by Avalon
Quote:

It was a global personal message
Great note!!!!!

OK! I'm YOUR PAL MAN!!!! If I finished with my now running movie I'll test Your new beta 2 Version...

Let's see how it works now...

I'll try to release BETA 3 no later than tomorrow night. Just with revised prediction, and some minor glitches ( if I find any :!: )
I only had one movie that "looped" for a longer time than usual, before finding the correct CQ. As far as the CQ it's finding, it's VERY precise :D
At least on NTSC material. I don't know about PAL results though :?

-kwag


All times are GMT -5. The time now is 11:19 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.