Setting movie rate

I can not find how to set a movie’s rate. It used to be via the rate property for a movie but that seems to have disappeared. Anyone got any clues?

Well, on the long run, you may want to move and use MBS Plugins with QTKit or AVFoundation.

Christian,

I am a MonkeyBread user and have been looking at your Quicktime plugin. The problem for me is that it no clearer how to do it. Can you give me some specific directions how to use your plugin to achieve what I want. My research has led to two values, timescale and timevalue but no clear understanding of how these relate to frame rate, which is what the rate property used to set, I presume. I could understand framerate, I don’t understand timescale and timevalue and how they interact. The Xojo documentation is little help and could use some more detailed examples in this area.

I need a user to be able to move a slider and have the movie rate increase or decrease accordingly.

bobj

The rate of a movie is the current playback speed. 0 is stopped, 1 is playing. -1 is playing backwards. And if you use 2 or 3 it’s faster.

Timescale defines how many time units you have per second. That’s the resolution you have to position image frames on the time line. Typically it’s 600. The timevalue is now a time value of a movie frame.

Now if timescale is 600 and you have first frame at timevalue 0 and second frame at timevalue 20 and third on timevalue 40, than you have 30fps there.

Be aware that time distance between frames can be variable.

I’m a guru at this…
I’m using the quicktimeMBS plugin,

I use it mainly with soundfiles loaded in with movies - but it’s the same concept.

use this code

dim f as FolderItem
dim amov as movie
f=GetOpenFolderItem("")
if f <> Nil then
amov=f.OpenAsMovie
if amov=nil then
msgbox “This sound file is possibly corrupted and the we cannot load it”
exit function
end if
amov.RateChangesPreservePitchMBS=true
movieplayer1.Movie=amov
movieplayer1.Width=436
movieplayer1.rate=1 '0.5 plays at half speed, 1 plays at normal speed, 2 plays at double speed
end if

hope that helps :slight_smile:
Seann

I’m also using the Xojo, and I thought it might break with the new release - but it all works like it should (I’ve even been using editablemovie with no hangups!

Sean,

thanks for your example. I also use the Rate property but noticed on moving to Xojo that is now deprecated. So I am looking for its replacement but can’t find anything. Hence my question to this list and further questions to Christian.

ciao

bobj

Christian,

that’s very helpful thank you. But it begs the question, so which MBS plugin call is used to set the playback rate? I can’t find anything and neither is there anything that I can find in the Xojo manuals.

bobj

Well, it might be depreciated - but it still works (I remember the noteplayer being depreciated and similar threats)