View Full Version : change frame rate tag in avi?
BabaG
10th February 2010, 18:13
does anyone know of an easy way to change the frame rate tag in an
avi file without having to recopy the entire file?
i've been capturing from 16mm film to an avi file at 2048x1536 so the
files are very large. the software, ic capture, is capturing from an
industrial camera with a frame rate of 10fps. the software uses this
frame rate in the avi file. problem is that i'm not actually capturing at
10fps. yes, the camera is sending at 10fps, but i'm using a trigger to
capture frames only when cleanly seated in a projector gate. that means
that my file's frame rate should have nothing to do with the camera's
frame rate. the file's frame rate should match the film's intended
projection speed, in this case, 24fps. for this reason, i need to try to
change my file's rate. the file's are huge, though, so i'd like to be able
to just change some data (in the header maybe?) to affect the change.
using the file as-is causes final cut to read the file incorrectly. the only
workaround i've come up with so faris to put it in mpeg streamclip,
output it to an image sequence at 10fps, and re-import the frames
into final cut. at 2048x1536 my file for ~1200ft of 16mm film is over
400gb. needless to say, all of this importing/exporting takes forever.
that's why i'd like to find an alternative.
thanks for any tips,
BabaG
Guest
10th February 2010, 18:50
http://www.free-codecs.com/download/avi_frame_rate_changer.htm
BabaG
10th February 2010, 18:53
thanks n2! i'll try it tonight!
edit:
and the author has an, apparently, newer version (avifrate2009) on his site:
http://www.am-softhome.com/avifrate.html
edit2:
just tried this utility and, while it did change the frame rate such that mpeg
streamclip now reads the file as 24fps instead of 10fps, both final cut pro
and quicktime player still read the file as the original 10fps.
any thoughts?
thanks,
BabaG
roozhou
11th February 2010, 04:45
i guess there is fps info stored in bitstream and qt player follows bitstream fps?
BabaG
11th February 2010, 19:41
how would i find that and change it?
StainlessS
12th February 2010, 00:24
If FPS is stored in the bitstream, then it sound like only a complete recopy will do the job.
I was curious about this, so I just tried using VirtualDub, change FPS on video menu,
and Direct Stream copy. On playing in GOM media player and Media Player, it played at
the amended frame rate, unfortunately quicktime would not play the file due to codec.
If you have a lot of these files, it might be useful just to try it on a small cut, just
mark start and end point and see if the resultant vid plays ok or not. VD is very
fast in Direct Stream copy mode, the only real problem might be disk space.
The only alternative is if you can find an "In-situ" bitstream FPS replacer.
Gud Luk :)
EDIT:- Also, VD can get rid of a lot of JUNK chunks that encoders put in an AVI file
and so recopy may actuallyreduce the size of your files a little. :)
BabaG
12th February 2010, 02:54
there exists an app called 'dumpster' for the mac which will allow for
the modification of mov header information. it's been recommended
that i save the avi as a ref movie and open it using dumpster. this
save is not a rerender and takes next to no time. when i do so, i do,
indeed, find familiar information like frame sizes and quantities along
with a host of things as yet indecypherable to me.
i have played with modifying some of the fields presented by dumpster
and have been able to modify things like frame rate and duration,
though not in a useful manner, as yet. it looks promising if i can find
the patterning of how the various fields relate to each other. if i can
find the relationships, this should make the avi files usable with just a
save to ref movie, a few minor text tweaks, and no rerendering. all of
this should be doable in little to no time, as opposed to the time it
would take to render 400+gb files. here's hoping someone can guide
me to the relationship between mov fields.
i couldn't find a way to save the dumpster output as text but i did
do a screenshot of it. it's a jpg of about 140k. would that be appropriate
to attach to this thread?
thanks,
BabaG
StainlessS
12th February 2010, 04:06
Sorry, dont know what a ref file is, but it sounds like it will again, just change the
header (which already is established not to work for you). I again suggest that
you try direct stream copying of just a minute or so of your source vid with
the FPS mod, see if that solves your problem. It sounds like what quicktime etc
is using is in the bitstream, embedded ALL the way through the 400GB vid, not just
in the header. Any quick fix that can be done without scanning all 400GB, is not
likely to work for you. IF you do the re-copy, and it works, then you know at least
that it is a possible way around your prob, it will not take that long, anyway,
mark eg 1 minute of the source (at orig FPS), do a direct stream copy, see how
long it takes and multiply by orig FPS length of source, to get an estimate of recopy
time.
Also, find a link to a site that lists many, free file hosting sites, if you register an account
with one of them, you will not have to wait for your attachment to go through moderation.
http://www.free-webhosts.com/
Gud Luk :)
BabaG
12th February 2010, 21:21
a ref file is like a frame-served file (ref for referenced). it's a pointer
to the original avi but stored in qt format.
tried saving through vdub and, oddly, qt player opens the new file and
shows it to be 24fps. final cut, on the other hand, refuses to open it now.
this, even after a simple direct stream copy.
BabaG
StainlessS
13th February 2010, 02:24
Ok, dont know what to say.
Check the re-timed VD mod is 24FPS in the header changer, also compare all other stuff
shown by the header changer, anything else changed?
Might be a good idea to attach or provide link to your screenshot, for someone more familiar
with MAC stuff. I'd like to have a look too.
Never tried this but, have you tried creating an *.avs script on a PC, link to the clip, with
an "AssumeFPS(24.0)" in it and open over the network from your MAC. Dont know if the
MAC would accept as an AVI, or perhaps there is another program that has some kind of proxy
mode (VDUB does this) which can provide some kind of 'synthetic' AVI which might be acceptable
to your MAC. VDUB creates '*.VDR' files for frame serving, (which may not work) but it also has
another method (see proxyon.reg in VDUB frameserving, VD help, Processing, Frameserver).
Have no idea if this will work over the network, but it may be worth a try.
If not, maybe someone else with more knowledge on this could help.
Gud Luk :)
BabaG
17th February 2010, 22:24
sorry to have disappeared, StainlessS.
ok. so, here's the solution. came from jan e. schotsman, maker of jes
deinterlacer. great utility. everyone should have it if you have a mac.
make a qt ref movie from the avi.
open the ref movie in dumpster.
there are four fields to edit for duration here.
there is one other for 'sampDur'.
under 'trak--->mdia--->minf--->stbl--->stts' you'll find:
sampCnt
sampDur
sampCnt is the number of frames in the file.
sampDur is fps. mine says 60, which corresponds to 10fps.
per jan's fix, i changed that to 25, which corresponds to 24fps.
you'll notice that 24fps is 10fps x 2.4 and that 25 = 60 / 2.4.
now, we use a formula:
sampCnt x sampDur
to derive a number for duration.
the file i'm looking at now has a samCnt of 17374.
17374 x 60 = 1042440
17374 x 25 = 434350
with these numbers, we now look for four fields containing the
original value of 1042440. they are:
'mvhd--->duration'
'trak--->duration'
'trak--->edts--->elst--->Track Dur'
'mdia--->mdhd--->duration'
each of these fields should contain the value 1042440.
change that to 434350.
make sure to click in another field after you make your last
change so the value will be retained. then save.
that's it. change five text fields and the file now opens
as a 24fps file with the correct durations. in my case, making
these five text entries (takes a minute or two), saved a three
to four hour transcode. and, i have to do this dozens of times
over saving, probably, hundreds of wasted hours.
thanks to jan!
these are simple files, in my case, picture only. i can imagine
there might be additional issues with files containing audio or
additional tracks.
BabaG
StainlessS
20th February 2010, 14:41
OK, glad you sorted it out. Your explaination will I am sure help out others in the future.
Be gud :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.