Hi All,
I'am trying to get the duration in seconds of a movie file when I send it to a server.
The idea is that as soon as I send a movie file to a server a count down timer starts to run telling me how long the movies runs.
kind regards
Ivo
get movie lenght
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: get movie lenght
Hi Ivo,
1. load the movie into a (invisible) player object
2. get "the duration of player x"
3. get "the timescale of player x"
4. divide duration/timescale to get the duration in seconds
5. MOST IMPORTANT! Look up these terms in the dictionary
Like this:
...
put the duration of player "your player here..." into tDur
put the timescale of player "your player here..." into tScale
answer tDur/tScale
...
Hint:
This will only work if QuickTime is intalled on the target machine!
Best & groetjes
Klaus
1. load the movie into a (invisible) player object
2. get "the duration of player x"
3. get "the timescale of player x"
4. divide duration/timescale to get the duration in seconds
5. MOST IMPORTANT! Look up these terms in the dictionary

Like this:
...
put the duration of player "your player here..." into tDur
put the timescale of player "your player here..." into tScale
answer tDur/tScale
...
Hint:
This will only work if QuickTime is intalled on the target machine!
Best & groetjes
Klaus