Wednesday, September 22, 2021

#1 2010-06-25 05:09:54 am

jimmy09
Member
Registered: 2010-06-25
Posts: 4

quicktime frame cut

Hi all,

maybe a stupid question, but i cant find a solution yet

i like to cut in an apple script with frames, like i do in miliseconds,

    set time_scale to time scale
        set i to time_scale * 792.2994
        set o to time_scale * 812.5988
        select at i to o
        trim

is there a command to set i and o in frames instead of the time?

thx jim

Offline

 

#2 2010-06-25 07:30:44 am

McUsr
Member
From:: Southern Norway
Registered: 2010-04-07
Posts: 1776

Re: quicktime frame cut

Hello.

I think you have to convert time to frames your self, which shouldn't be to much of a job, unless you are doing this in some app that support frames in its dictionary.

I think you would know that you could use something like this to get at the next frame:
Pseudo!

set thisFrame to prevFrame + Truncate ( (new time in millisec - old time in millisec) / ( framerate * 1000))


The framrate denotes of course the number of frames per second.
Best regards

McUsr

Last edited by McUsr (2010-06-25 07:31:29 am)


Mercurial vcs is a joy to use for scripting.


Filed under: Frame Rate

Offline

 

#3 2010-06-25 08:12:56 am

jimmy09
Member
Registered: 2010-06-25
Posts: 4

Re: quicktime frame cut

Hi,

i have the exact frame in and out I calculate this in the i and o in seconds,
but quicktime has a problem with the time in seconds, i noticed sometimes it drops the last frame sometimes not.
but i have to be exact with my trim .... so it would be easier for me to use the frames, because i have the exact in and out. seems there is no command for use frames instead of seconds?


Thx Jim

Offline

 

#4 2010-06-25 08:40:45 am

McUsr
Member
From:: Southern Norway
Registered: 2010-04-07
Posts: 1776

Re: quicktime frame cut

I only have quick time standard edition:

The dictionary states that you move the frame by steps.

But the "Document Specification" in Quick Time Player Suite of  the dictionary operates with a byteRate per second,
Maybe you have to go as deep as calculating frames per second by (nr of bytes per frame / bytes per second).

This should be a pretty popular scripting topic. I believe there must be some published results of this somewhere.

Forums, Mailing lists etc. and maybe a guide to scripting it as well.


I'm sorry I cant help you with this. But There should some documentation somewhere.

Best Regards

McUsr


Mercurial vcs is a joy to use for scripting.


Filed under: QuickTime

Offline

 

#5 2010-06-25 08:53:57 am

jimmy09
Member
Registered: 2010-06-25
Posts: 4

Re: quicktime frame cut

Thx a lot for your help!!!

tried to search the forum, but nothing comes up which helps .... so i started this post....maybe someone knows how to deal with ...lets wait and see

again thx for your help!!


Jim

Offline

 

#6 2010-06-25 10:29:21 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11749
Website

Re: quicktime frame cut

Hi,

you have to calculate the time by given framerate, duration and time scale.
Search the forum for framerate, you'll find some sample code


regards

Stefan

Offline

 

#7 2010-06-28 05:11:08 am

jimmy09
Member
Registered: 2010-06-25
Posts: 4

Re: quicktime frame cut

StefanK wrote:

Hi,

you have to calculate the time by given framerate, duration and time scale.
Search the forum for framerate, you'll find some sample code


Hi,

so that is what i was afraid off, there is no way to use a frame count from an FinalCut xml in apple script
the only way is to calculate the frames in time, which i was already doing, am i right here??

but i wasnt happy about it, like i said, the quicktime is sometimes 1 frame shorter....dont know if this is a quicktime bug or not.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)