![]() |
Quote:
(I wish I would have the same "ready-made-source-el-dorado" like you have as VB user/coder ;) ) Look for accessing the dgdecode.dll in the forum.doom9.org. Doom9 had the same question related to c++ access BUT AFAIK Neuron even integrated Standard-calls for VB accessing into his dll. |
I am taking a look at dgdecode sources, but what file I need to see in detail?
|
Quote:
The "very sloppy!!!" code below is in the file "vfapidec.cpp" Code:
// Open function modified by Donald Graft as part of fix for dropped frames and random frame access. |
Thanks but I don't understand nothing. Forget it.
Now comming back to Calcumatic. Could you add a mod to calculate proportional space related to complexity. I was talking with Boulder a time ago and he did give me a spreadsheet that calculates space not only related to playing time, but also complexity evaluated for bitrate in a sample. Im working on a calculator, but think that it would be easier for you, as you have a tool developped. I want to show you some pics of my tool, then maybe you can have an idea of what I am talking about. First, a pic of my VB6 form: http://www.digitalfaq.com/archives/i.../2005/06/8.png Now only time based mod: http://www.digitalfaq.com/archives/error.gif And frame based mode (time is inherent, of course), but you need to do previous samples and know how many frames they have and how many Kbps also. http://www.digitalfaq.com/archives/i.../2005/06/9.png Also it has, as you can see, a section to calculate avg bitrate when you want to put several series chapters (almost same playing time) in one DVD. Could you do something like this in a way easier than me (for me is really hard). Thanks. |
Quote:
I mean, if you calculate a file size for X average bitrate, you will always get Y file size. I don't understand what you mean by proportional complexity, because anyway you look at it, if you calculate complexity for a piece (segment) of a movie, what are you going to do with the rest of the movie :?: :roll: -kwag |
Hi Karl :),
Actually I was going to do something similar to what Pro is refering to. Take it that you have 2 movies. They have different sizes and different average bitrare - the sources, I mean. You could go and encode them as if they were the same size and the same bitrate, that is, splitting the available media size by 2. But then you end up with 2 movies with different quality! What Pro is suggesting is that we balance the figures so that both movies end up with the same visual quality, thus occupying different space on the target media. That's what Boulder's spreadsheet is all about ;-). I was going to work on that on my own spreadsheet for HC encoder, but since I can't get HC to do some decent prediction I abandoned the whole thing... Quote:
The difference in filesize of both samples and the movie duration will tell you how how much share both movies will take up on the target media. Cheers |
Why not just take the total amount of minutes of the two movies and plot that into calcumatic. That gives an average bitrate that will work for both movies, that's what I do and it haven't failed me yet...
-Anerboda |
Quote:
http://neuron2.net/dgmpgdec/DGDecode131b1.zip Functions of the dll: openMPEG2Source_SC getFrame_SC getRGBFrame_SC closeVideo_SC Code:
Private Declare Function dll_GetRGBFrame Lib "DGDecode.dll" Alias "_getRGBFrame_SC@4" (ByVal lngFrameNum As Long) As LongSo no Info about the video architecture. So do search for a dll-parsing utility in VB which shows you the accessable functions within a dll. Then do a search on the Web on that dll to see what parameters are needed as such dll-function-parsers only do show the functionnames but not all needed parameters. Or you do access the AvisynthC.dll by using the Invoke command to send parameters for accessing Invoke/mpeg2sorce. But the worse side on that is: 99.9% of the users wont have that dgdecode including the stdcall wrapper installed, means, you have to provide it within your package, means, :arrow: GPL :!: So accessing the AvisynthC.dll will be independent from providing GPLlled Stuff in your Package. |
Quote:
Quote:
Since a high action movie ends up needing more bitrate than a low action movie, it is obvious that just splitting the target media size by 2 taking it proportionally to the movies durations is not enough. In your calculations you need to take into account the source bitrate otherwise it will fail you. Of course, if you just encode the first few frames (until you reach 5%) of both movies, you will probably get wrong figures. That's where Andrej's Slicer function comes in. It takes x% of your movie getting the frames from many different sectors of the movie. I know Karl can do that easily. Cheers |
@red: Thanks, I couldn't explain it so clearly.
@Inc: Thanks, now I see it easier to do. |
Here is the speadsheet:
http://www.saunalahti.fi/sam08/kbps_eng.xls http://www.kvcd.net/forum/viewtopic.php?p=117425#117425 |
[quote="incredible"]
Quote:
Can somebody tell me if I should release my tool with LGPL and what it means, maybe Kwag, in spanish by PM, or any other people in english. END OT |
Im not shure if a direct accessing of a compiled .dll makes you automatically forced to release rights to the outside, means releasing the sources. But I guess so, AFAIK not only the calculating engine of FitCD_to_Moviestacker was an issue but als the accessing of the warpsharp.dll for avisynth previewing.
|
Quote:
Add up the total play time of all movies, feed it to CalcuMatic, and bingo!, use the average bitrate given. :roll: -kwag |
Quote:
Err, am I missing something here :roll: The fact is, that for an X length footage on a Y target media will always yield a specified average bitrate. The longer the playtime, the lower the average bitrate for the same target. And vice versa. This has nothing to do with the sources :roll: Say you have 2, 3, 10 movie :!: The total average bitrate is what must be calculated for a particular target. If one of those movies is a high action film, and you want to increase the bitrate, one of the other movies will have to give it's bitrate, in order to accomodate the total calculated average bitrate. If not, the size of the whole will exceed the target's size. -kwag |
Quote:
|
Quote:
Analizing a sliced sample, and compare it in 2 films, applying spreadsheet maths and you will have different avg bitrate for each movie, with same visual quality result. |
@Karl
Let's try to put it simple and easy, even for me to try to explain. I want to put 2 different movies on a DVD-5. Movie A has 125 minutes while movie B has 97 minutes. Movie A is a very high action movie and movie B is a low action movie. Let's forget about if the movies are bright or dark, ok? Both movies have are anamorphic PAL 720x576 with 1 AC3 5.1 track and both AC3 tracks are 384Kbit. Now, I want both movies to look exactly as good as the other. And I mean quality ;-). Movie A is nearly 29% bigger than movie B. Let's say that a DVD-5 capacity is 4,375GB == 4480MB == 4.587.520KB. Movie A audio: ((125*60)*(384000/8 ))/1024 = 351.563KB Movie B audio: ((97*60)*(384000/8 ))/1024 = 272.813KB That's 351.563+272.813 = 624.376KB Then you have 4.587.520-624.376 = 3.963.144KB If (125*100)/222 = 56,3 and (97*100)/222 = 43,7 then: Movie A == 3.963.144 * 0,563 == 2.231.250KB Movie B == 3.963.144 * 0,437 == 1.731.894KB So, based on these figures for final encoded stream (I forgot to include calculation for the muxing...) you're telling me that both movies will end up with the same quality? I don't agree with that Karl. Or maybe am I missing something of what you're saying? Cheers |
Quote:
If you gave more bitrate to the action movie, the other movies will have LESS bitrate, and that's a fact :!: Look at this in a simple way: You have 2 movies, #1 is action and #2 is drama, each with the same average bitrate, targetting X final space. Both will look identical, sort of, depending on complexity, and will fit exactly on X space. Now, increase the average bitrate for movie #1 by 50%. What are you going to do with movie #2 :?: You HAVE to reduce the bitrate by 50% on movie #2, in order to maintain the same target size for the movies. I hope this is clear now. :roll: -kwag |
We want to distribut 2 movies in different space, not only related to movie time, but bitrate needs.
I can't explain myself better. It would be better that you take a look to the spreadsheet and see the maths and how changes related to differents inputs. |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.