Log in

View Full Version : dwRate and dwScale values question


BabaG
18th February 2010, 20:46
are there standard values that should be used for dwRate and dwScale
to get a frame rate of 24fps in an avi file?

i recently was looking into this and was directed to the utility 'avifrate'
as something that would let me set the frame rate for my files directly in
the file header. i find, though, that this is derived from a formula based
on entries in the two field for dwRtae and dwScale.

how do i know what to change these values to as there are many
combinations that would yield a value of 24?

thanks,
BabaG

mariush
19th February 2010, 02:34
You need just Virtualdub.

open virtual dub, it has a hex editor inside in the menu, open the video in the hex editor and select from the Edit menu "Enable field assist" and then click on "RIFF chunk list" from the same menu.

The values are in "AVI stream header" so once you select them with the mouse you can edit the hexadecimal values. Use calc.exe from windows to convert decimal to hexadecimal. You can use any combination, as long as it gives you the fps you want.

See picture below:

http://savedonthe.net/image/533/vdub.png

In my case it's 0x61A8 / 0x03E8 or 25000 / 1000 but you can also change it to 25/1 or first byte in the set of 4 for denominator 01, rest 00 and for numerator , first byte 19 and rest 00

Be careful as there are usually 2 stream headers, one for audio and one for video, see the FOURCC above and the stream type before you edit - hint.. "vids" tells you it's information for the video stream and "XVID" tells you the fourcc for the video stream.