quicktime question

Discussion in 'Mac Programming' started by BabaG, Feb 11, 2010.

  1. BabaG macrumors member

    Joined:
    Jan 5, 2007
    #1
    i'm finding that quicktime looks at avi files in a manner different from that used by windows and third party apps. can someone point me to resources like forums where i might find people specifically working with programming for quicktime. i need to ask some questions.

    i have some avi files, very large ones, in which the frame rate is set incorrectly. there is a utility for windows which allows for resetting this info in the file header and does not require a rerendering of the entire file. at 400+gb, this is a good thing. problem is that on the mac, qt player and final cut pro both ignore this reset and show the original frame rate. obviously this info is either stored elsewhere than the header and qt is getting from this other source, or it is deriving the frame rate from some kind of formula using additional or other criteria.

    i'd like to understand how the way qt looks at these file's frame rate info differs from the way windows and third party apps look at it in hopes of finding a renderless solution to changing the frame rates in these files, one that would be recognized by qt and fcp.

    thanks,
    BabaG
     
  2. fernandovalente macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #2
    I see you got no answer. Try asking on the Apple Mailing Lists.

    http://lists.apple.com/
     
  3. BabaG thread starter macrumors member

    Joined:
    Jan 5, 2007
    #3
    thanks fernandovalente. i did just that and did get an answer there from
    jan e schotsman who makes a great little app called JES deinterlacer.

    ok. so, here's the solution. came from jan e. schotsman, maker of jes
    deinterlacer. great utility. everyone should have it.

    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 number, 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
     

Share This Page