5 Replies Latest reply on Jul 25, 2006 10:30 AM by Newsgroup_User

# video duration in miliseconds

hi

i wana convert miliseconds into timing rate

means i m getiting video duration into miliseconds like 80711 miliseconds i want to convert these miliseconds in to timing rat e like this 01m:20s

80711 miliseconds = 1mint:20seconds
plz tell me how
tell me the script of this convertion
• ###### 1. Re: video duration in miliseconds
look at framestoHMS function in lingo help, it's exactly what you need

hth

--
-----
Ned
-----
• ###### 2. Re: video duration in miliseconds
Assuming that the video duration has been assigned to a variable called
videoDur and sent to the following handler:

on ConvertToTimeFormat videoDur
totalSec = videoDur / 1000
mins = totalSec / 60
secs = totalSec mod 60
minStr = "0" & mins.string
secStr = "0" & secs.string
minStr = minStr.char [minStr.length - 1..minStr.length] & "m:"
secStr = secStr.char [secStr.length - 1..secStr.length] & "s"
timeStr = minStr & secStr
return timeStr
end

call it like this

videoTime = ConvertToTimeFormat (videoDur)
--
Craig Wollman
Word of Mouth Productions

phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com

"farhanakhan" <webforumsuser@macromedia.com> wrote in message
news:ea505o\$okb\$1@forums.macromedia.com...
> hi
>
> i wana convert miliseconds into timing rate
>
> means i m getiting video duration into miliseconds like 80711 miliseconds
> i
> want to convert these miliseconds in to timing rat e like this 01m:20s
>
> 80711 miliseconds = 1mint:20seconds
> plz tell me how
> tell me the script of this convertion
>
>

• ###### 3. Re: video duration in miliseconds
Thanks Ned, you could have stopped me before I wasted 4 minutes of my time
;)

--
Craig Wollman
Word of Mouth Productions

phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com

"farhanakhan" <webforumsuser@macromedia.com> wrote in message
news:ea505o\$okb\$1@forums.macromedia.com...
> hi
>
> i wana convert miliseconds into timing rate
>
> means i m getiting video duration into miliseconds like 80711 miliseconds
> i
> want to convert these miliseconds in to timing rat e like this 01m:20s
>
> 80711 miliseconds = 1mint:20seconds
> plz tell me how
> tell me the script of this convertion
>
>

• ###### 4. Re: video duration in miliseconds
LOL ! sorry ;)

--
-----
Ned
-----
• ###### 5. Re: video duration in miliseconds
No problem. I learned something new.

--
Craig Wollman
Word of Mouth Productions

phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com