Log in

View Full Version : Help with .stats file (start-end credits)


Movie Maniac®
12th April 2003, 01:21
Hi
I wrote a stats reader, and you can see my post in the development section of this forum. http://forum.doom9.org/showthread.php?s=&threadid=50295

What I would realy llike to know is how to distinguish wether a frame is a "credit" frame or not.

Searching this forum, I'v only found this informations:

#define NNSTATS_KEYFRAME (1<<31)
#define NNSTATS_BFRAME (1<<30)

that should be read from the quant

#define NNSTATS_SKIPFRAME (1<<29)
#define NNSTATS_PADFRAME (1<<28)
#define NNSTATS_DELAYFRAME (1<<27)

that should be read from the dd_v

Searching he internet I've found only this page:

http://edu.bnhof.de/pipermail/xvid-...ary/001910.html

wich was wrote by Koepi!

No informations are available about credit frames, or let's say I wasn't able to find them. Please help me, I need only this information to complete my work. Any link to any documentation about this question is wellcome!

Thanks for your attention

P.S. Another technical question, if I can. Does have any sense to insert a key frame in the stats file just by pushing a button (e.g. like your stats editor does?), or it is better not do do it?
That's becouse some guys told me not to do this becouse otherwise the keyframe inserted this way wouldn't be coded correctly. Is that right? (I think no, since you implemented this function in you r app).

NiTroGen
12th April 2003, 02:19
First of all, there is nothing special about credit frames. No credit information is stored in the stats file. You just see the smaller frame size, because of the higher frame compression.

About the frame information, read this thread (http://forum.doom9.org/showthread.php?s=&threadid=43372) to find out more on how to identify them. (I've already sent you some Visual Basic code "copy-pasted" from Stats Viewer and you are still confused! Why?) Also, the b-frame bit #30 is in dd_v NOT in quant!!!

PS. I think that when inserting a keyframe, you should also increase the frame size, too. You don't want extra compression on that frame. Of course it is difficult to know the size of the frame if it would be stored as a keyframe, but setting it to the value of the maximum frame size you have found in the stats file should be OK. There won't be a noticable difference in the final avi size. Does everybody agree with me? :)

Movie Maniac®
12th April 2003, 08:08
Originally posted by NiTroGen
First of all, there is nothing special about credit frames. No credit information is stored in the stats file. You just see the smaller frame size, because of the higher frame compression.

So, there's no way to know which are the credit frames, apart from making an hypothesis on the frame size? Is that true? If so I think it should be only a matter of personal decision :(, and that's not good (I mean it's difficult to implement a function that way)

About the frame information, read this thread (http://forum.doom9.org/showthread.php?s=&threadid=43372) to find out more on how to identify them. (I've already sent you some Visual Basic code "copy-pasted" from Stats Viewer and you are still confused! Why?) Also, [b]the b-frame bit #30 is in dd_v NOT in quant!!!

Sorry, I'm not confused. The only problem is on credits frames, I can correctly recognise Bframes and all the rest. I simply made a mistake copying my code. I know that the Bframe 30 bit is in the dd_v, but it has to be "compared" with the 31 in the quant :D

PS. I think that when inserting a keyframe, you should also increase the frame size, too. You don't want extra compression on that frame. Of course it is difficult to know the size of the frame if it would be stored as a keyframe, but setting it to the value of the maximum frame size you have found in the stats file should be OK. There won't be a noticable difference in the final avi size. Does everybody agree with me? :)

Definitely this is what I will do! Perhaps I should study Koepi's stats reader behaviour in cases like this.

Thanks a lot Nitrogen!!! You've been of great help.

P.S. I don't know if somebody noticed this, but it seems that Koepi's stats reader seems to be one frame ahead of what it should be. Is it true? I mean it shows details about frame 784 as they were about frame 785 :), is it a little bug? Or what?

JimiK
12th April 2003, 09:09
Why don't you read the Credit information from the registry? Of course, that only works for your actual encode. So if you want to use it later, maybe you should save the info to an extra file. The registry key is: WORKSPACE\HKEY_CURRENT_USER\Software\GNU\XviD. At least on my system ;)
Best regards,
JimiK

Movie Maniac®
12th April 2003, 11:59
Thanx for your help, but I know how to read the credits settings from the registry. The question is:
if i distribute my app, this function will work only with the last compression, and not with any stats file. That is why I was tryin' to understand wether it's possible to gather this info from the stats file or not.
But seems not :(

Bye