Quantcast KVCD Predictor - digitalFAQ.com Forums [Archives]
  #1  
11-18-2002, 11:41 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
I've been working on it and have most of it done, just need to implement the various "Get this from there..." functions. Here's a screengrab to whet your appetites:



You can expect the first release today .
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
11-18-2002, 11:49 AM
vico1 vico1 is offline
Free Member
 
Join Date: Sep 2002
Location: USA
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Wow...That looks GREAT!
Kudo`s to you, and all that put in the work!...





***************************************
They can put a man on the moon,
but they still can`t put a tin pan in a microwave.......UNKNOWN
Reply With Quote
  #3  
11-18-2002, 01:40 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
Beautiful
You could calculate the audio file size automatically, by just dividing the number of frames by frame rate. That will give you total number of seconds. Then the user just selects audio bit rate ( 128, 160, 192, etc. ), and multiply bit rate by seconds, etc to get audio file size automatically
Anyway, that looks AWESOME

-kwag
Reply With Quote
  #4  
11-18-2002, 02:27 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Then the user just selects audio bit rate ( 128, 160, 192, etc. ), and multiply bit rate by seconds, etc to get audio file size automatically
I was going to do that, and then I thought "what if they're using VBR?" but I guess none of the templates call for that. I'll implement it now .
Reply With Quote
  #5  
11-18-2002, 03:47 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 SansGrip
... and then I thought "what if they're using VBR?"
When DVD players support VBR MP2 audio, then we'll do a audio file prediction formula, just like we did for video
Same principle. Different samples at different time intervals

-kwag
Reply With Quote
  #6  
11-18-2002, 05:01 PM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
When DVD players support VBR MP2 audio, then we'll do a audio file prediction formula, just like we did for video
Same principle. Different samples at different time intervals

-kwag
I don't think that's necessary... there are not a whole lot dvd players to support that, and you don't save a lot of MBytes with VBR sound anyway...
__________________
j3llyG0053
Reply With Quote
  #7  
11-18-2002, 05:53 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, it's the moment you've all been waiting for . Here's KVCD Predictor 0.1 (and source code), ready for you all to pound on.

Please read the accompanying documentation. It's pretty easy to install, but you will need the .NET runtime if you don't have it already. There's a link in the readme.

I've established it's fairly well-behaved and doesn't seem to crash unexpectedly or get drunk and insult the in-laws, but I've not done extensive testing on the actual algorithm and the results it produces. This is where you guys come in . Feed it as many values as you can think of, work out the result by hand and see if it matches what KVCD Predictor comes up with. Do some encodes with its recommended sample size and see if the final encode will really fit on that number of CDs.

Bear in mind it uses the exact length of the CD, which can be calculated with the following formula:

bytes = seconds * 75 * 2324

where seconds is, obviously, 60 * minutes, or 4800 for an 80 minute disc. Thus an 80 minute disc holds precisely

4800 * 75 * 2324 = 836640000 bytes

Also be aware that any reference to "megabyte" or "kilobyte" means 1048576 bytes and 1024 bytes respectively, so that if Windows Explorer says your audio file is 95.6mb, that's the value you enter. The 1024/1000 difference does not effect the final calculation, which is all done in bytes anyway (if you don't know what I'm talking about you can ignore this whole paragraph).

In this version the "Get movie length from source file..." option doesn't work, because it's going to be a lot more complicated than I imagined (for programmers amongst you, I have to learn how to write a managed C++ class to access the Video for Windows framework. Any hints appreciated ). I'm going to work at it though, and hopefully it'll be ready for 0.2.

So, pound away. Use it and abuse it and let me know what happens. It's likely some tweaking will have to be done, but that's what an alpha release is for.

Have fun .

P.S. Kwag -- could you please mirror the binary package for those who can't access my site at the moment?

Edit: Removed links to old versions.
Reply With Quote
  #8  
11-18-2002, 06:04 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Oh, and by the way, feel free to suggest better names .
Reply With Quote
  #9  
11-18-2002, 06:12 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 SansGrip
P.S. Kwag -- could you please mirror the binary package for those who can't access my site at the moment?
Mirroring in the next five minutes
I'll post a note in the "What's Happening" section and on the main page.

Thanks
-kwag
Reply With Quote
  #10  
11-18-2002, 06:25 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
I'll post a note in the "What's Happening" section and on the main page.
Excellent. I'm very eager to hear some feedback .
Reply With Quote
  #11  
11-18-2002, 07:02 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
Main page at www.kvcd.net updated.
Mirrors updated.
"Whats Happening" updated.


-kwag
Reply With Quote
  #12  
11-18-2002, 07:50 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Great job SansGrip!

One thing I notice is the est. sample size is ~24mb less than 800mb and multiples thereof with scale factor @ 1.0

i'm using this formula:
MPEG size = ((Total frames/Framerate)/100) * (MPEG sample file size * scale factor)

again, good work and sorry if my math is wrong!
-ren
Reply With Quote
  #13  
11-18-2002, 07: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
Hi SansGrip,

I just tested the program, and the audio calculation is perfect, but not the video. My #frames is 173097 / 23.976 / 100 = 72.195. My audio at 128Kbps, selecting one CD of 80 minutes, gives 112MB. That is correct.
Now for the video. 800 -112 = ~688MB for video. That's the estimated size. So if we reverse the formula: 688 / .95 / 72.195 = 10.03MB for the sample size, but the program calculates 8.87MB.

-kwag
Reply With Quote
  #14  
11-18-2002, 08:15 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi SansGrip,

Quote:
Microsoft .NET Framework Software Development Kit
The Microsoft .NET Framework Software Development Kit (SDK) includes the .NET Framework, as well as everything you need to write, build, test, and deploy applications using the .NET Framework, including documentation, samples, and command-line tools and compilers. If you want to distribute the .NET Framework with your application, you will have to download the .NET Framework Redistributable in addition to the SDK.

The .NET Framework SDK runs on:

Microsoft Windows NT® 4.0
Microsoft Windows® 2000 (Service Pack 2 recommended)
Windows XP (Windows XP Professional is required to run ASP.NET)
(Note: Windows Millennium Edition and Windows NT 4.0 Terminal Server are not supported.)
Get the .NET Framework SDK from MSDN Downloads.

Note: If you have already installed Microsoft Visual Studio® .NET, you do not need to install the .NET Framework SDK separately. Visual Studio .NET includes the SDK.
KVCD file predictor needs .NET to run and the above quote is from Micro-
soft. So myself and others will not be able to use your fine program.
I use Win ME.

-black prince
Reply With Quote
  #15  
11-18-2002, 08:19 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
@rendalunit & kwag

Yep, you're right. Here's 0.1a .

(In case you're curious, I was adjusting the media size to compensate for the system stream, which is what you do for bitrate calculation but evidently not file size prediction . I just took it out and did a couple of tests and reversing the result manually seems to be correct now.)

@black_prince

The SDK (Software Development Kit) requires Windows 2000/XP, but the actual framework (the runtime libraries) work on the other versions too. You should be able to find a link to it on that page I provided -- if not, you can get it through Windows Update (or here for the English version) and I'll fix the link in the doc.

Edit: Removed links to old version.
Reply With Quote
  #16  
11-18-2002, 08:42 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
Hi SansGrip.

Almost!, it's still a little low. The result for the example I posted above, should give a sample size of 10.03MB. But the result is now 9.03MB

-kwag
Reply With Quote
  #17  
11-18-2002, 08:44 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
HAlmost!, it's still a little low. The result for the example I posted above, should give a sample size of 10.03MB. But the result is now 9.03MB
I'm really living up to my nickname tonight . I'll look at the source and try to figure out what I did wrong...

Edit: I'm multiplying by the scaling factor instead of dividing. 0.1b coming up .
Reply With Quote
  #18  
11-18-2002, 08:59 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Here's 0.1b, which should now produce the correct results...

At least, on kwag's test data it produces 10 -- not 10.03 -- which, after stepping through the code, is actually the more accurate value given that an 80-minute CD isn't quite 800mb (it's more like 797mb).

Hopefully this is the last update tonight .

Edit: Removed links to old version.
Reply With Quote
  #19  
11-18-2002, 09:04 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
BINGO *** Jack Pot ***, you hit it right on the nose
Updating mirror now....

Edit: ... Done!

-kwag
Reply With Quote
  #20  
11-18-2002, 09:10 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
...which leads me to the question, should there be a facility for specifying a custom CD size, for those who like to overburn?

Also, wouldn't it be more logical and intuitive for a "scale" factor to be multiplicative? That is, instead of dividing by 0.95, multiplying by 1.05?

Also, @kwag, what do you think of the idea in the readme of some kind of formula to give a guess as to a good CQ/bitrate for producing a sample of the desired size? Too difficult?
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
KVCD Predictor-0.1b download? hansolh960 Video Encoding and Conversion 1 01-03-2012 01:58 PM
KVCD Predictor or Manual Prediction vhelp Avisynth Scripting 12 08-08-2004 02:59 AM
KVCD Predictor? FlavioMetal Conversão e Codificação de Vídeo (Português) 0 12-16-2003 08:52 AM
Kvcd Predictor DKruskie Avisynth Scripting 4 05-14-2003 06:44 PM
KVCD Predictor is out! kwag Video Encoding and Conversion 0 11-18-2002 06:25 PM

Thread Tools



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