Blaze_Heatnix
23rd June 2010, 22:46
I am using this script:
AVISource("videofile.avi")
function counter(clip clip, int n)
{
n = n / clip.framerate()
min = int(n / 60)
mins = string(min)
mins = min < 10 ? "0" + mins : mins
n = n - min * 60
sec = int(n)
secs = string(sec)
secs = sec < 10 ? "0" + secs : secs
ms = string(int(1000 * (n - sec)))
ms = strlen(ms) < 2 ? "0" + ms : ms
ms = strlen(ms) < 3 ? "0" + ms : ms
time = mins + ":" + secs+ ":" + ms
clip.subtitle(time, x=410, y=440, font="chickenscratch aoe", size=28, text_color=$ffffff, halo_color=$000000, first_frame=131, last_frame=18159)
}
scriptclip("counter(current_frame)")
It works just fine, but I want the timer to start at about 00:04:000 in the video. The time starts counting from there, but the time shows 00:04:000 when it starts and I want it to start counting from 00:00:000 when 00:04:000 comes up in the video. How do I do that?
AVISource("videofile.avi")
function counter(clip clip, int n)
{
n = n / clip.framerate()
min = int(n / 60)
mins = string(min)
mins = min < 10 ? "0" + mins : mins
n = n - min * 60
sec = int(n)
secs = string(sec)
secs = sec < 10 ? "0" + secs : secs
ms = string(int(1000 * (n - sec)))
ms = strlen(ms) < 2 ? "0" + ms : ms
ms = strlen(ms) < 3 ? "0" + ms : ms
time = mins + ":" + secs+ ":" + ms
clip.subtitle(time, x=410, y=440, font="chickenscratch aoe", size=28, text_color=$ffffff, halo_color=$000000, first_frame=131, last_frame=18159)
}
scriptclip("counter(current_frame)")
It works just fine, but I want the timer to start at about 00:04:000 in the video. The time starts counting from there, but the time shows 00:04:000 when it starts and I want it to start counting from 00:00:000 when 00:04:000 comes up in the video. How do I do that?