Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Apple Final Cut Pro Legacy QT calculation – Converting frames to milliseconds, coding question

  • Ariane Fisher

    March 18, 2011 at 6:51 pm

    If there’s an app, plug-in or anything for it… well that would be awesome. I feel no need to re-invent the wheel, especially with the impending possibility of a complete QT rewrite and this all getting thrown out. It’s also possible that QT is not the right software to use for this. No desire to touch flash.

    I know there are platforms like Kaltura out there that manipulate video online, but they don’t meet my needs for several reasons. I’m ok with doing the java manipulations, it’s finding the correct frame number in the first place, that is my issue. I can’t figure out how QT knows where it’s at within a movie.

    From reading the java scripting for QT manual, I know this “must” be possible. Also, from seeing QT accurately reinterpret the duration in ms to frames, I know there must be some consistent calculation involved. I think I’m getting close, but I need to understand the underlying mathematics behind QT. What a geek I am!

  • Ariane Fisher

    March 18, 2011 at 7:46 pm

    Aha! Thank you so much. Even though I’ve spent hours on the Developer site, I somehow missed this page. Easy to do when you’re frustrated. I believe I should be able to find my answers there. Well, hopefully.

    Are there forums for developers as well? I don’t want to be the newbie on there asking the dumb questions. Hopefully mine are technically challenging enough to merit posting there. 🙂

  • Rafael Amador

    March 18, 2011 at 7:55 pm

    [Ariane Fisher] “[Doug Beal] “you have 20 seconds which is 480 frames at true 24 fps”

    When you say true 24fps, do you mean 24 frames/1.001seconds, or do you mean 24.0000 frames per second? This media is 24/1.001 out of camera.”
    If I’m not wrong, only some very high end digital video cameras makes “True 24” (although it seems that some new prosumers camcorders like the SONY Nex does).
    When we are talking on video cameras, p24 means p23,98.
    rafael

    http://www.nagavideo.com

  • David Heidelberger

    March 18, 2011 at 8:32 pm

    I don’t know if there’s a Quicktime developer forum, but there’s definitely a mailing list.

    Have you looked at the TimeScale property? I’m certainly not an expert on it, but I’m pretty sure Quicktime uses that to calculate times, and I know it can often be inadvertently set to something that doesn’t really make sense based on the actual frame rate.

    – David

  • Doug Beal

    March 18, 2011 at 9:42 pm

    I assume 24 for a framebase. a constant to give me a framecount or to convert between TC and frames when I need to know. As Bouke says frames are integers. If I’m posting a 30 sec spot to some broadcast delivery platform in NTSC land I know I need to have exactly 900 frames. My numbers are based off the frame base (30) with the result in frames being an integer.
    In some color correction software TC is frame based and to locate or push shots out for VFX and conform time needs to be dealt with frame based and also whether frame counts start from 1 or zero. The integer result allows me to play fast and loose with the math

    Now formats and frame rates for aquisition through delivery are a different ballgame and the precision and sync is critical.

    Doug Beal
    Editor / Engineer
    Rock Creative Images
    Nashville TN

  • Rafael Amador

    March 18, 2011 at 11:40 pm

    [Doug Beal] “I assume 24 for a framebase. a constant to give me a framecount or to convert between TC and frames when I need to know”
    That is OK if your time-base is true-p24. That doesn’t happens on any video standard.
    That is film.

    [Doug Beal] “If I’m posting a 30 sec spot to some broadcast delivery platform in NTSC land I know I need to have exactly 900 frames.”
    Sorry but I don’t understand this.
    May be because I’m in PAL-land but I’m hearing since almost 30 years that the NTSC time-base is 29,97fps. Up to mi numbers, for an NTSC 30 secs clip, you need 30 x 29,97 frames.

    [Doug Beal] “As Bouke says frames are integers.”
    Frames are integers and seconds are integers, but your data base is not an integer. You will never get an integer when you divide frames/time or time/frames. In this case you end up with a periodic number: 1,001001001001…
    rafael

    http://www.nagavideo.com

  • Ariane Fisher

    March 19, 2011 at 1:04 am

    I’ll probably take this discussion onto the developer’s forum. Do you guys want me to post my findings here? Or does no one care about the advanced mathematical vagaries of Quicktime? On an up note, I may have figured out the mismatched sync of audio and video when importing xmls. Or is that old news?

  • Keith Pratt

    March 19, 2011 at 3:58 am

    Please do post your findings.

    I’m not sure if your questions have been answered via that Quicktime Developers link, but here are a few pieces for the puzzle…

    24, 23.98, 23.976 and 24/1.001 can all mean the same thing, depending on who you’re talking to.

    Quicktime as a player may well play video at a frame rate that syncs with the display refresh rate. If you have a 60Hz display attached, it may well speed up your 24/1.001 video to 24.

    The route to Quicktime’s stated duration of 20.228 seconds would seem to be:
    20 seconds and 5 frames of video at 24fps = 485 frames
    485 x (24/1.001) = 20.228

  • Ariane Fisher

    March 19, 2011 at 4:11 am

    Holy crap on a stick, Keith! You did it! Excuse my phraseology and extreme beer consumption! That’s all I was looking for. I knew it was simple. Thank you!!!! That is extremely handy as well, because I quickly realized that i had let my developer membership lapse and didn’t feel like paying $99 for a simple question. Any idea why the mediainfo QT metadata would show 20.288 rather than 20.27? Or am I pushing my luck? You saved me soooo much reading through the copious pages of developers manuals I downloaded tonight. I’ll probably read them anyway though.

    I’ll let you know if I get the audio sync issue sorted as well. That should be worth a few virtual beers.

  • Doug Beal

    March 19, 2011 at 4:56 am

    Sir If you will allow me to help you understand this.
    900 frames is a 30 sec spot in NTSC in any digital delivery standard/spot delivery service. no part frames no need to be concerned about subcarrier frequency and the relationship between electrical frequency.
    I have no idea what happens to the stray milliseconds at the end of the TV day.
    If I’m mastering a spot to be delivered to the companies that distribute commercials they are 900 frames for 30 second spots and 1800 frames for 60 sec spots.
    There is no real world measure for milliseconds in video it’s frames whether the frame rate is fractional as it is in Japan/North America and MPAL Brazil or integer frame rate for you PAL folks.
    Now I could be doing audio for video and want to delay a track to fatten it out and be using milliseconds but there is no way when I’m cutting video someone is gonna tell me to go to frame 34.9 and make an edit. I can process using field rendering but any edit will be frame based.
    Thus even though SD broadcast NTSC is approx 29.97 frames/per/second I cannot submit a 30 sec spot of 899.1 frames. I don’t know of an edit system that can do that. Also my submission would be rejected
    Does that make sense to you?

    Doug Beal
    Editor / Engineer
    Rock Creative Images
    Nashville TN

Page 3 of 5

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy