How to find the frames-per-second of a Quicktime movie using Applescript?

Is there a way to find out the real-time "frames per second" of a Quicktime movie?
The only Applescript movie properties in Quicktime which I have found to be useful are "duration" and "time scale". The real-time duration of the movie in seconds is found by dividing "duration" by "time scale".
But "time scale" only sometimes relates to any real time property. In some cases it does (2500 = PAL 25 fps, 2997 = NTSC 29.97 fps) but for many other movie types I've opened (DivX, flv, mp4 etc) the "time scale" is often reported as "600" even though the Quicktime movie inspector window will report a frame rate of 25, 29.97, 15 or some other number.
Where does the Quicktime movie inspector window extract the FPS from, and is it possible to extract that same number, or calculate the real-time FPS of a Quicktime movie using Applescript only?
Thanks.

Thanks for this but unfortunately it only works for some movie types. For .dv .flv and .divx movies, this script correctly calculates the FPS. But for .mpg .mp4 and .m4v it does not.
For .mpg movies I tested, the count of frames was always 1, so clearly the FPS calculation is always wrong.
For the .mp4 and .m4v movies I tried, the FPS was always reported as 43, regardless of whether the actual FPS was 25 or 29.97. In all cases the count of frames was incorrect.
A bug in Quicktime?

Similar Messages

  • How to Find the Frame by Fillcolor

    Hi All,
    How to find the Frame by its fillcolor?
    I tried the following method but it doesn't work.
    app.findTextPreferences.fillColor = app.swatches.item("Red");
    And
    app.findTextPreferences.fillColor = app.activeDocument.swatches.item("Red");
    Thanks in advance
    Ramkumar

    Sorry.
    i used findObjectPreferences but i wrote it wrong.
    Regards,
    Ramkumar

  • How to find the list of existing tables in a schema using DB link?

    Hi
    I know how to find the list of existing tables in a schema using the following query
    SQL> select * from tab;
    but, how to list the tables using a DB link?
    For Example
    SQL> select * from tab@dblink_name;
    why this doesn't work?
    Pl advice me
    Thanks
    Reddy.

    ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
    The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link?

  • How to find the CMYK,RGB color value in Illustrator CS3 using Javascript

    Hi,
    I want to find the color space of an raster item. I can able to get its color space using
    app.activeDocument.rasterItems[0].imageColorSpace
    if i found it To be CMYK color space, i need to find its value to know which color is present in the document.
    Thanks in advance,
    Poovili

    People have asked that before & I don't actually know. It seems pretty likely it's in the SDK somewhere though. I'd try searching the API folder for phrases that might relate to this and then investigate.

  • What is the most Frames Per Second NI-CAN can do?

    My goal is to send 1000 Frames per Second on my CAN bus using the NI-CAN PCI 2 slot card I have.  However the closest I have been able to do is 666 frames per second.  This is sending 8 frames every 12 MS using an edited readmult example.  Is there a way to do this with writemult?  Or is there a hardware limit that I am trying to go past?
    What can I mess with to get more frames?  Increase Baudrate?  Decrease the size of the frames?  (I've tried both of those)
    Other questions that should probably go in other posts  (Frame API):
    Is there a way to send/read the frames at the bit-level?  I have found ways to manipulate Arbitration ID, Remote Frame, Data Length, and Data, but there are several other bits in a frame.
    Is there a way to send a bad frame, one that would raise/cause an error frame?

    Yes, I did break 1,000 Frames Per Second.  I got up to 1,714 and 1,742 using two different methods.  This is at 250 kbps, if you used 500 or 1 Mbps, you could get more frames.  If you have 125 kbps, you might not be able to break 1,000 Frames per Second.
    ncWriteMult is the key.  You can load 512 frames in a queue at a time.  I would put 256 on at a time and check to see if there was less than 256 frames left in the queue and if there was, load it up, that way the queue would never be empty.  I went about it 2 ways, one was using ncGetAttribute to determine space left, and that got the faster method, however, I was also trying to read the messages to verify that it worked, and I had problems with logging every frame.  It would also send the first 40 ncWriteMults quickly, as if the queue it was filling was much larger than 512.
    The other way, was using trial and error to determine how many MS to sleep before writing the next batch of 256 frames.  There are variables outside of my control that determined the time it would take and it would vary a few ms.  I wanted a stable environment that could send forever without filling the queue so I went with a value that would wait 2 or 3 ms, depending on conditions before writing again.  The value I used was 142 ms, I think.  Your Mileage May Vary.
    There is also a way to do some error handling that I did not try to utilize.  Instead of the process crashing, there is a way to tell it to wait if this error is returned.  That might be the best way for me to implement what I wanted to do, but I was assigned another task before I tried to get that to work.
    There is a timing element in ncWriteMult's documentation I didn't look into very much, but that would space the frames out and could send 1,000 frames a second evenly distributed, instead of sending them as quickly as possible, wait some ms then send another batch.
    If anyone could link us, or provide some code snippets of the error handling, or proper usage of ncGetAttribue, or some way to read faster, that would be greatly appreciated.

  • How to find the current CAN BUS Utilization in Labview?

    Hi,
    I want to detact the Current CAN BUS utilization. Can any body suggest for that?

    This question would probably be better suited at the Automotive Networks section.
    http://forums.ni.com/t5/Automotive-and-Embedded-Networks/bd-p/30
    Even so I've never seen a LabVIEW implmenetation for NI-CAN or XNET that actual measured bus load.  Which is a little odd because the test panels in MAX have this feature.  For me I usually put another node on the bus and measure it this way as a test.  But if I wanted to know what it is from a VI the best that I know of is you can calculate it.  There is a VI burried that does the math for you.
    This VI can calculate how long it will take to transmit a frame, and how many frames per second can be sent.  Using this information you can calclate bus load of your actual messages.
    <LabVIEW>\examples\CompactRIO\Module Specific\NI 985x\cRIO CAN Periodic Transmit\CAN Rate Calculator.vi
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Frames per second vs timecode

    Small question
    How do I get the frames per second indicator at lower left of canvas to show timecode instead?
    I have looked all over for what is probably staring me in the face.
    cc

    Preferences > Project > Display Time As, change it to "Timecode". Or, just click on the little stopwatch to the left of either the current time, or the duration.

  • How to find the missing fonts?

    hi,
    Is there any other options to find the missing fonts in a illustrator 10 file using AppleScript.
    or
    How to identify the missing fonts and missing links dialog box when opening a document through AppleScript. Suppose if i can identify in the particular file means (in batch processes), i need to neglect the particular file and open the other file in a BatchProcess.
    Regards,
    Subha

    reply as soon as possible.........

  • How to find the Commitment cost for a PM order using tables ?

    Hello all ,
           How to find the Commitment cost for a given PM order using table  .
    Thanks and regards ,
    Prem.

    Issue got resolved

  • Trying to find a camcorder that records in 60 frames per second and will upload onto  ipad2 through camera connector

    Trying to find a camcorder that records in 60 frames per second and will upload onto  ipad2 through camera connector

    Old forum discussion, message now gone, but here's the summary
    Matt with Grass Valley Canopus in their tech support department stated that the model 110 will suffice for most hobbyist. If a person has a lot of tapes that were played often the tape stretches and the magnetic coding diminishes. If your goal is to encode tapes in good shape buy the 110, if you will be encoding old tapes of poor quality buy the model 300
    Both the 110 and 300 are two way devices so you may output back to tape... if you don't need that, look at the model 55
    http://www.grassvalley.com/products/advc55 One Way Only to Computer
    http://www.grassvalley.com/products/advc110 for good tapes, or
    http://www.grassvalley.com/products/advc300 better with OLD tapes
    Or
    ADS Pyro http://www.adstechnologies.com

  • How to find the number of records per months  in cube

    Hi,
      how to find the number of records per months for my all cubes?
      Can i use the ListCube transaction to find totl number f records per cube monthwise ?
    Jimmy

    Hi,
    Here is a program to generate no of records and list of ODS and Cubes in Active version.Schedule this program in background and create a cube to load this information and schedule to the data from the file generated by the program. Schedule this all per you requirement.
    1.Copy the code into your Z<programname> from Se38.
    2.change the FILENAME in CALL FUNCTION 'GUI_DOWNLOAD' in the program to the location from where you can pick the information to load data to cube(eg Application server).
    3.Save program.
    4.Schedule the program in background as required
    5.Create cube with infoobjects to hold no of records and Infoprovider name
    6.Load this cube based on event after the program job is done.
    Hence you can report on this cube to see no of records in  CUBE or ODS in your box.
    Please find the code below.
    Cheers,
    Kavitha Kamesh.
    types: begin of itabs ,
          tabname type dd02l-tabname,
          end of itabs.
    data: itab type itabs occurs 0 with header line.
    data: counter type i.
    data: begin of itab1 occurs 0,
    tabname type dd02l-tabname,
    counter type i,
    end of itab1.
    DATA: ITABTABNAME TYPE STRING.
    DATA: LENGTH TYPE I.
    DATA: OBJECT(30).
    data: str(6) type c.
    select  tabname from dd02l into table itab where ( tabname LIKE  '/BIC/F%' or tabname LIKE  '/BIC/A%00' )
    and TABCLASS = 'TRANSP' and AS4LOCAL = 'A'.
    loop at itab.
      select count(*) from (itab-tabname) into counter.
      str = itab-tabname.
      if str = '/BIC/F'.
    LENGTH  = STRLEN( ITAB-TABNAME ).
      SHIFT  itab-tabname BY 6 PLACES LEFT.
    ELSEIf  str = '/BIC/A'.
      SHIFT  itab-tabname BY 6 PLACES LEFT.
      LENGTH  = STRLEN( ITAB-TABNAME ).
    LENGTH = LENGTH - 2.
    endif.
      itab1-tabname = itab-tabname(LENGTH).
      append itab1.
      itab1-counter = counter.
      clear itab-tabname.
      clear:  COUNTER.
    endloop.
    *********** itab1
    loop at itab1.
    write:/ itab1-tabname, itab1-counter.
    endloop.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                    =
        FILENAME                        = 'c:records.xls'
        FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = ','
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab1
    *   FIELDNAMES                      =
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • The share operation "master file" has failed. the operation could not be completed because an error occurred creating Frame 93164 (error-1). how can i find the frame?

    The share operation "master file" has failed. the operation could not be completed because an error occurred creating Frame 93164 (error-1). how can i find the frame?

    https://discussions.apple.com/thread/6219522

  • HT203477 Trying to make a Master copy. But I keep getting this The operation could not be completed because an error occurred when creating frame 2846 (error-1).How to correct it find the frame or?. I shot both 720p and 1080i also pictures Trying to do 10

    Trying to export my project as a mastercopy but keep getting error message  "creating frame 2846 error 1" I don't know what to do? do I try and find the frame and if I do how.

    I have the same error but i dont know how to thrash the render files and switch off background rendering.
    my problem is in the frame 6150 how to fix this problem. i need your help because i have to present this work for tomorrow

  • Why do I see random Frames Per Second (fps) in the QuickTime Inspector?

    Hi there could anyone help
    I opened up some DV pal footage that I captured FCP then I opened it up in quicktime.
    I problem is that in the inspetor it does not state the right fps for the clip for example 24.96, 24.98, 24.99 the clip does play at the right FPS 25. i final cut is says that the footage in 25 FPS so who am I to belive
    Any hlp would be great
    thats
    sam

    Not uncommon to have small variations in the frame rate when viewing in QuickTime Player.
    Ignore it.

  • Calculating Frames Per Second Accurately

    I tried searching the forums for suggestions or code used to calculate FPS accurately... But was ultimately unsuccessful.
    I think I have a pretty basic understanding of how it works... but I'm still left wondering if there's a better... or correct way of attacking the problem.
    What I started out doing is taken a pre-cycle time sample using System's currentTimeMillis method, followed by the main parts I'm executing in my program and then took a second time sample. I subtracted the post-cycle from the pre-cycle to get the time... and it occurred to me that the currentTimeMillis is not exactly reliable. As it says in the API, "For example, many operating systems measure time in units of tens of milliseconds," when discussing that method.
    I then noticed the nanoTime method and decided to use that.
    It quite honestly seems to work perfectly for what I'm trying to accomplish.
    I pretty much used the same steps as before.
    But now my problem is that I want to limit the amount of frames per second to 60.
    I decided that I should try using the Thread class's sleep(long millis, int nanos) method.
    It seemed like it would work... but to my dismay, it did not.
    The milliseconds, for the most part, were correctly timed... but still not always. The nanoseconds even less so... but I knew that the nanoseconds would be less reliable-I decided to use microseconds. Using microseconds doesn't even work that well.
    So I wondered if there was an even better way... maybe a more 'manual' approach to fixing my problem.
    I would greatly appreciate any input/knowledge on the matter.

    its quite simple. Windows has an API call that can set the timer precision (its all based on some interrupt interval - I forgot the precise details). This precision is system wide, so if one application does it it is immediately active for all other applications running at that time. Applications can only lower it, so if you set it to 1ms then some other application cannot force it to 5ms for example.
    Now here comes JVM bug number two.
    As said the interval differs per system - sometimes it is 10ms, sometimes it is 15ms. The JVM wrongfully assumes it is always 10ms however. Do a test: try to sleep for some time that is a multiple of 10 (without the long running thread hack active); you'll find that the precision still sucks. That is because in this specific case the JVM does NOT change the system wide timing precision. But if you sleep for any number of milliseconds that is not a multiple of 10 it will actually temporarily set the precision to 1ms.
    So the rule is: as long as one thread goes to sleep the precision is set to 1ms. When the last sleeping thread wakes up, it is reset to what it was. Then it also doesn't matter for what amount of time you make your real thread sleep as the long sleeping thread will not be sleeping for an amount that is a multiple of 10, thus forcing the precision to 1ms.
    Now say that you don't do the long sleeping thread hack and you make your own thread sleep for say 9ms, switching to 1ms precision temporarily. This behavior makes it so that sampling the passed time (before and after sleeping) can be imprecise; you'll find that most of the time you'll get sampling that matches the number of milliseconds you slept and sometimes it jumps to 10/15ms depending on the granularity of your system. This is a concurrency problem; sometimes the precision is reset before you get a chance to sample the current time.
    So to recap to give 100% accuracy with System.currentTimeInMillis(), you need to keep a thread sleeping at all time so the precision stays at 1ms.
    And then finally we come to bug #3, which is a problem in Windows itself: rapidly changing the precision (which happens when you make a single thread sleep for short intervals) can screw with the system clock. I don't know if this problem still exists in later iterations of Windows, but it is again a reason to do the long sleeping thread hack. Because this is a known issue I still call this a bug in the JVM because of the way they implemented the precision timer activation, which can trigger the problem in Windows. The command line switch mentioned in the above bug report SHOULD have fixed that... but you know, facepalm bug #4.
    But at the end of the day: even if at least 4 bugs can be named regarding precise timing in Java under Windows, the root of all evil is still the way timing is implemented in Windows itself making life too difficult for the poor JVM devs. What were the MS devs thinking at the time?

Maybe you are looking for

  • How to delete all inbox emails at once: iPod Touch 5th Gen ?

    IOS 7, iPOD Touch 5th Gen While I can delete multiple emails at once on my iPad 2 (inbox> Edit> Check  first email> Hold MOVE while unchecking first email> Release Move > (all emails stack up) then, >Trash this does NOT work on the iPod Touch 5th Gen

  • Calling jsp custom tag from jsp expression

    hi there, I have a problem calling oracle(or any other) custom tag from inside a jsp expression.(i.e.)embeding <jbo:tagname...> into <%......%>. For example: I need to get the value of a jsp parameter, but the parameter name is dynamic (retrieved fro

  • Restore from cold backup (rac server)

    Hi All, Oracle version : 10g OS : SunOS dixie1 5.10 Generic_118855-36 i86pc i386 i86pc I am having cold backup of RAC server (2 nodes), I want to restore from cold backup. The problem is that : when i performed the cold backup using rman at that time

  • Regarding SLD

    i have added new business system in SLD................ now pls.tell me the step.......to import it integration directory.......................

  • Cannot change desktop background picture to my own photos

    Hi, in desktop & screen saver I cannot change the desktop background image to any of my own (iphoto) pictures, it shows the list of the images and thumbnails but will only change the pic to the 'Apple' ones (nature,plants,black & white, abstract), if