Quantcast Bitrates: CQmatic/Calcumatic - digitalFAQ.com Forums [Archives]
  #1  
07-18-2003, 06:43 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
CQMatic Latest version -> 1.4.08
http://www.kvcd.net/downloads/CQMatic-1.4.08.exe

CalcuMatic Latest version -> 1.1.16 http://www.kvcd.net/downloads/CalcuMatic.exe

What does CQMatic and CalcuMatic look like
Here's a typical session:



Instructions and notes:
For CalcuMatic: If you want to run CalcuMatic from CQMatic, please put both files in the same directory. Then, when you click on the "Calculator" button of CQMatic, CalcuMatic will be launched.
*** TMPGEnc Project file must be saved as "text" project *** 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), and start frame set to 0 and end frame set to -1. 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 )


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

Todo:

* Add log file on disk [ Log now copied to Clipboard ]
* Done! Avoid multiple running instances on CQMatic.
* Shutdown after completion. (For version 2 )
* Done (CalcuMatic) Integrated Bitrate Calculator with CD, DVD and user specified target sizes.


Changes to 1.4.07
Added: Deep prediction option.
If this option is checked, the final size for prediction is 0.5% to wanted file size. That means that samples will target a sample size within 0.5% of wanted file size, per cycle.
If this option is not checked (default), then 2% file size precision is used for prediction.

Changes to 1.4.06
Added missing "Smartphone" resolution ( 176x )

Changes to 1.4.05
Fixed CQ_VBR issue.

Changes to 1.4.04
After prediction, a small sample is encoded with the same CQ that will be used for the full encode.
This way you can preview the sample, and that's exactly the way the full encode will look like.

Changes to 1.4.03
Minor fix.
Encoder doesn't "blink" anymore on the screen before it's minimized.
It's sent immediatey to the task bar, even before it has a chance to be displayed.

Changes to 1.4.02
A new "Minimize on run" option has been added, so the encoder is minimize during prediction runs.
This keeps the encoder out of your desktop so you can do other things instead of having to manually minimize the encoder on every run.

Changes to 1.4.01
There's now a 10 "quick step" calibration routine, prior to the prediction phases.
What this does is it figures out compression ratio from linear encoding to random encoding, which varies depending on source (frame rate/resolution/GOP, etc.) and sets internal values accordingly.
The result should be even higher precision than version 1.4.00


Changes to 1.4.00
1) Completely re-written prediction engine. Sampling now depends on movie length, so it's now dynamic. You should be able to throw anything at CQMatic, and it will know "how" to encode "whatever" material (PAL/NTSC, etc)
2) Prediction is now done in "phases". Then, using a formula and some tricks (don't ask ), it determines the correct target CQ.
3) Prediction is MUCH faster On my Pentium 4 @2.8Ghz, I am averaging a full prediction cycle in about 20 to 25 minutes minutes, on a average movie of 1 hour, 45 minutes (on linear range, CQ=~50 to CQ=~85) Below CQ=~50, you all know it takes longer, and I can't do a thing about it The first phase, in theory, should be the longest. All subsequent phases uses the previous found CQ, which is closer to final value, instead of starting every phase at CQ=60, as in previous versions. Still, you should count on about 1/5 of your total movie time, for prediction time. Still, it beats the hell out of any multipass encode
4) Removed "Override CQ" option. It's now done automagically
5) Added progress bar, to give you a visual idea where the process is.
6)The X3 option is gone, as it's no longer needed, and I also added a "seconds" field, which was really needed for small encodes.

Note:
The way this new prediction engine works, every final run will give a different but very close to final file size, because of the way the movie is randomly encoded for prediction.
There is still a possibility that one day your result will be over or under the 2% of your wanted file size. It can happen, due to the way CQ is handled in TMPEG. It's not liner, and finding a 100% CQ value in some cases could take several hours of prediction. So it's not practical to try and reach that accuracy in software. Maybe one day TMPGEnc will have a constant linear curve, and then all problems will be solved.
In the mean time, If this happens and you get an under/over file size, just run CQMatic again, and most probably your new result will be on target on the next run.



Changes to 1.3.10
1) Forced X1 (standard. X3 disabled) prediction, until further optimized with new algorithms I'm studying.
2) Bumped version to 1.3.10, reflecting changes that it's now compatible with TMPGEnc Plus 2.524 (2.524.63.181) and should also be compatible with previous 2.5x versions.

Changes to 1.2.06
Added: 224x176

Changes to 1.2.05
Added: Smartphone resolutions: 160x120, 208x240, 240x320

Changes to 1.2.04
Added: Resolutions 480x240(28, 528x240(28, 544x240(28, 704x240(28, 720x240(28

Changes to 1.2.03
Added: Standard prediction ( X1 ) or High Precision (X3) selection.
X3 will take a sample size three times larger, so CQ prediction will take three times longer than using the standard (X1) option.
This option (X3) should give much higher accuracy than previous versions of CQMatic.

Changes to 1.2.02
Fix: Version 1.2.01 would try to find CQ up to 100. Corrected this on 1.2.02, and now goes up to a max of 90, as in previous versions.

Changes to 1.2.01
Added: Cleared "Audio Source" field, to overcome TMPGEnc bug.
Anything you enter in the audio source field will be automatically erased, to ensure proper operation of TMPGEnc.

Changes to 1.2.00
Added: Bitrate calculator button now launches CalcuMatic, if found in the same directory.

Changes to 1.1.12b
Added: After CQ is found, it now displays: Final CQ value is XX.XX
Clearer than showing "Last CQ, Current CQ".

Changes to 1.1.12a
More sampling changes.

Changes to 1.1.12
Internal. Not released.

Changes to 1.1.11
Sampling changes. Should be more accurate that 1.1.10.

Changes to 1.1.10
Fixed: Sampling was not following "120" samples for any given time frame.
Version 1.1.09 was not released. It was used for internal testing.

Changes to 1.1.08
1.1.08b Disabled "Cancel" button when not running.
1.1.08a CQ values are now 2 decimal places instead of 4.

Changes to 1.1.07
Fix: Minor math error.
Caused sporadic repeated CQ values to be re-tested.
Now prediction is even faster than 1.1.06, with the same final CQ value.
Added: CQ is now displayed with four decimal points, instead of two.

Changes to 1.1.06
Added: Dynamic sampling, depending on movie time. Far more accurate that 1.1.04.
Changed: Deleted "Interlace Source" option. Now taken care automatically.

Changes to 1.1.05
Internal version. Not released.

Changes to 1.1.04
Added: Internal prediction factors now taken into consideration, depending on the project resolution.
Valid resolutions are:
352x240(28
352x480(576)
480x480(576)
528x480(576)
544x480(576)
704x480(576)
720x480(576)
Any other resolution will not be processed
A warning message will be issued by CQMatic if you try to process any another resolution.

Changes to 1.1.03
Changed: Returned sampling to one snapshot for every minute of material, @1 second per snapshot.
High sampling in TMPEG produced false output size for prediction.
Theory != practice

Changes to 1.1.02

Changed: Sampling is now extremely fine grained.
12 samples per minute at 0.08333 second per window width. This renders CQMatic useless with MPEG-4 CODECS, because of the awful "seek" functions in those CODECS.
For MPEG-1 and MPEG-2 sources, it works just fine.
Added: Interlaced hack, to take into consideration some factors when the source is interlaced. The "Interlaced Source" check box automatically detects if the source is interlaced, by reading the project file. If you are using an external deinterlacer, then you must manually check this option. But ONLY if the source is interlaced!
Added: "Override Default CQ" option. Default is unchecked, which means that CQMatic will use it's own starting values for prediction. If you "check" this option, then whatever CQ value you set in your project file will be used by CQMatic.

Changes to 1.1.01
Fixed: Ensured that CQ never goes below or above "fence" values.
Fixed: Minor precision calculation error.
Added: Cycle counter. So you know the number of prediction loops made.
Added: Bitrate calculator icon. Calculator functionality to be integrated in version 2.0

Changes to 1.1.00
Complete prediction redesign.

Changes to 1.05.00
Fixed: MANY MANY prediction adjustments. It should now be more accurate on "MPEG sources"
AVI (DivX, XviD sources are NOT RECOMMENDED!
Prediction is VERY unreliable, because of the MPEG-4 CODECS.
Fixed: Buttons are now "disabled" (Grayed out) when CQMatic is busy.
Added: Prediction now takes into consideration frame rate of source. So it should be more accurate that previous versions.

Changes to 1.04 Release
Fixed: Added code which was included in 1.02, but was left out on 1.03! CQMatic would stay in a loop (under some conditions) when CQ was found.

Changes to 1.03 Release
Added: Avoid multiple running instances of CQMatic.

Changes to 1.02 Release
Fixed: Correction to code that clobbered CQ_VBR MAX bitrate on .tpr file.

Changes to 1.01 Release
Fixed: Corrected bug when source was MPEG-2, and 3:2 pulldown was selected. Would cause first compression test phase to be skipped.

Changes to 1.0 Release
Turbo pass of input source to determine compressibility. Used for internal factor calculation. First pass takes ~1 minute, followed by regular prediction cycles.

Changes to 1.0 RC-5
Fixed: Avoid continuous "bumps" in CQ, when dealing at very low CQ values out of linear scale.
Fixed: Small cosmetic button alignment.

Changes to 1.0 RC-4
Added: Heuristic scale bump, when changes in CQ don't result in a notable file size difference (specially in CQ_VBR)
Fixed: B Spoilage changed to 20 instead of 0.
Fixed: No more "Index" error messages, after processing and manually running TMPGEnc.
Fixed: Dressed up log.
Fixed: CQ_VBR is now fully functional.

Changes to 1.0 RC-3
Added: Date/Time and timestamps to log.
Fixed: Copying log to Clipboard was always appended, instead of clearing previous. Now it works correctly.

Changes to 1.0 RC-2
Corrected: (Again!) out of boundary CQ values. Hope that problem is over now
Added: For prediction start phase, CQ is now automatically set to a minimum of 55 and a maximum of 75. This is used for internal prediction calculations.

Changes to 1.0 RC-1
Fixed:
No more looping trying to find CQ Now you can see the "zeroing in" on target after each pass, which should hit the target much faster than BETA 7 (the last beta of 1.0 branch)
So when you see the CQ difference = 0.X, where X = below 0.25, you know you're close to the end of the prediction


Added:
Now you can double click anywhere on the Log window, and you'll get a message: "Clear contents of Clipboard, and Copy Log to Clipboard? Yes/No
So you know what to do

Changes to 1.0 BETA 6

Fixed: Cleared some variables that were clobbered when running CQMatic more that once, without exiting.
Added: Exit condition when last CQ = next CQ

Changes to 1.0 BETA 4 and 5
Fixed: Would run one additional (unnecesarry) pass if CQ was set to 90.

Changes to 1.0 BETA 3
Fix: Corrected loop bug from BETA 2.
Add: Slight prediction factor correction.

Changes to 1.0 BETA 2
Corrected a stupid logical bug, which would loop on some CQ values, and repeat indefinitely.
Edit: Bug is still present. Working on it

Changes to 1.0 BETA 1
Complete redesign of "zeroing in" algorithm on CQ. Previous versions would re-iterate on old low/high values, and sometimes would take for ever to hit target. Now CQ is found much faster (less iterations, that is).

Changes to 0.92 BETA 2a
Fixed math bug ( Thanks tigger )

Changes to 0.92 BETA 2
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. Still not working 100%
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
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-18-2003, 06:59 PM
conquest10 conquest10 is offline
Free Member
 
Join Date: Dec 2002
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
ooh...ahh...
how will it work exactly?
  #3  
07-18-2003, 07:17 PM
vico1 vico1 is offline
Free Member
 
Join Date: Sep 2002
Location: USA
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Holy-Moley... ...(he sez, drooling on keyboard)


*******************************
The Devil`s always.....in the Details!
  #4  
07-18-2003, 07:24 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts


we're waiting!
  #5  
07-18-2003, 07:35 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
To give you a little idea, this is the way it works:
Instead of having the program tightly coupled with all parameters built-in, CQMatic will be "loosely coupled". What does that mean It means that you set all your parameters in your .avs (as usual) and then load your .avs in TMPEG (also as usual), and you verify that you have TMPEG set the way you want. Your bitrates, your favorite template, etc.
Then you save your TMPEG project file, and BINGO, CQMatic will process your project file, find CQ, and encode in a similar way as ToK and acp. The only thing you have to set CQMatic is the time of the movie (in minutes) and the average bitrate (from Moviestacker), and hit "Execute"
This way, there are no limitation in the program, because you set ALL your parameters and setting directly in TMPEG CQMatic will just find the correct CQ, and then encode your movie. That's it.
Just keep in mind that I'm heavily working on it. I don't have an idea when I'll have a beta, but the way I usually work , expect a beta before the end of the week

-kwag
  #6  
07-18-2003, 07:41 PM
totonho03 totonho03 is offline
Free Member
 
Join Date: Apr 2003
Location: Fallston, MD. USA
Posts: 419
Thanks: 0
Thanked 0 Times in 0 Posts
kwag_donga:

The answer to my prayers eh???????

Looks veeeeeeery good

Totonho03
  #7  
07-18-2003, 09:11 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
@ Otto:
CQMatic is the answer for our prayers!


@ Kwag:
want beta tester?

i can' t wait...
  #8  
07-18-2003, 09:24 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Hey kwag,
How big is going to be this file (CQmatic) i want to know if ill be able to download it to a flopy.
  #9  
07-18-2003, 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
Quote:
Originally Posted by ovg64
Hey kwag,
How big is going to be this file (CQmatic) i want to know if ill be able to download it to a flopy.
Less than 20KB

-kwag
  #10  
07-18-2003, 09:43 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Quote:
Originally Posted by kwag
Quote:
Originally Posted by ovg64
Hey kwag,
How big is going to be this file (CQmatic) i want to know if ill be able to download it to a flopy.
Less than 20KB

-kwag
Super Duper
  #11  
07-18-2003, 09:55 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
Quote:
Originally Posted by jorel
@ Kwag:
want beta tester?

i can' t wait...
Here's CQMatic version Version 0 Alpha, which doesn't do a thing
http://www.kvcd.net/cqmatic.exe
But you can start to get a feel of what to expect.
Put the mouse over the buttons, enter some values and press "Execute". Click on "Open Project" and Settings", etc.

Have fun playing, but just playing only

-kwag
  #12  
07-18-2003, 10:10 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Quote:
Here's CQMatic version Version 0 Alpha, which doesn't do a thing
Yes, the best thing is that it has no bugs.
  #13  
07-18-2003, 10:15 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
Quote:
Originally Posted by ovg64
Quote:
Here's CQMatic version Version 0 Alpha, which doesn't do a thing
Yes, the best thing is that it has no bugs.
Well, if you catch one, let me know
The best things come in little packages

-kwag
  #14  
07-18-2003, 11:32 PM
vico1 vico1 is offline
Free Member
 
Join Date: Sep 2002
Location: USA
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Sweet lookin little app...very much in keeping with the
KISS principle. (as far as GUI is concerned)

By the way...love the .exe icon...
(now...where have I seen that before... )...VERY apropos.


*******************************
The Devil`s always.....in the Details!
  #15  
07-19-2003, 12:18 AM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ who ?

Forgive me.. I'm slow for some reason I must have missed something
here.

What's acronym for KISS ??

EDIT: keep it short and simple - dahhrr..
-vhelp
  #16  
07-19-2003, 01:45 AM
Bud Bud is offline
Free Member
 
Join Date: Apr 2002
Location: Hawaii
Posts: 241
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Bud
Keep It Simple Stupid --->KISS

Bud
  #17  
07-19-2003, 03:22 AM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag..

I take it, you're developing this app under C++ ??
And, are you planning on tying this to other apps ??

Thanks,
-vhelp
  #18  
07-19-2003, 03:24 AM
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
Version 0.1 Pre-Alpha uploaded

**** NOTE **** The program will create a file "cqmatic.conf" in the directory where you run cqmatic.exe. Just so you are aware of that. The file just keeps the full path to your TMPGEnc executable. The file will be created the first time you click on settings, and select your TMPEG executable. No need to click on settings afterwards. It does an "Auto save", so you don't even need to bother with a "Save" button
Here's what I've done so far:
Full test of input/output mechanisms.
Idiot proofing input fields ( ). Should only accept numeric characters.
If you click on "Settings", you can now select your TMPGEnc executable, and it will be launched when you click execute.
"Execute" button should morph to "BUSY!" when encoder is launched
When "Cancel" is pressed, process should abort, and "BUSY!" button should return to "Execute!'. If TMPEG is running, you must exit it manually, because I have no control of TMPEG (or really any external program!)
When process is encoding, you can click the "BUSY!" all you want, and only a single instance of TMPEG should be running. So you can't launch a second instance ot TMPEG.
If either of the fields "Movie time in minutes" or "Average bitrate" are blank or 0, you should get a warning message.
If all this works, tomorrow I start to make the first functional version, which will be 0.1 ALPHA. No more Pre-Alpha

Link is the same as previous: www.kvcd.net/cqmatic.exe

Edit: The application is a multi-threaded program, so I would like to know if it behaves correctly in different operating systems ( WinXP, 2000, 9x, ME )

-kwag
  #19  
07-19-2003, 03:32 AM
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
Quote:
Originally Posted by vhelp
Hi Kwag..

I take it, you're developing this app under C++ ??
If you can find a C++ compiler that can do what I'm doing in 13KB, let me know
Quote:
And, are you planning on tying this to other apps ??
I don't think so. It will probably grow into a full blown application with time (I hope )
It depends how good it works, and if it does, then I'll turn on the "MCE" and CCE" options

-kwag
  #20  
07-19-2003, 04:34 AM
syk2c11 syk2c11 is offline
Free Member
 
Join Date: Jun 2002
Posts: 290
Thanks: 0
Thanked 0 Times in 0 Posts
How do we find the average bitrate? KVCD/KDVD template only have Max and Min. Do you calculate the average manually = (Max + Min)/2 ?
Closed Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
Bitrates: CQMatic and CalcuMatic now Open Source! kwag Video Encoding and Conversion 18 07-12-2008 06:13 AM
Bitrates: Latest CQMatic/CalcuMatic epuleda Video Encoding and Conversion 2 05-25-2006 09:54 PM
Bitrates: CQMatic/CalcuMatic Continued... kwag Video Encoding and Conversion 125 12-30-2005 11:55 PM
Bitrates: CQMatic/Calcumatic? Blubear Video Encoding and Conversion 6 07-17-2004 08:53 PM
Bitrates: Success (CQMatic & CalcuMatic) jorel Video Encoding and Conversion 10 10-25-2003 08:00 PM

Thread Tools



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