Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th December 2009, 18:36   #1  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 157
Spoof time of day?

I'm doing a parody of Paranormal Activity and I need a controllable way to spoof a time readout, like camcorders print on the screen.

The time should be in HH:MM:SS format. If someone points me in the right direction, I'm at least smart enough to "fast forward" through time during the clip with AssumeFPS(Faster rate).ChangeFPS(Target Framerate).

Any help with the exact commands to use, and how to adjust to the desired time would be much appreciated.
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 26th December 2009, 19:43   #2  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 157
Another problem here is it would be good to create an AVI with only the readout and transparency elsewhere. I don't want to change the already edited video; I want to manipulate the time readout at will.

Edit: Sorry about all the posts; this problem takes some thinking. Here's a more specific question:

How can I make a video with HH:MM:SS that goes through a 24 hour period (AM and PM), and has alpha only where the counter appears?

If that can be created, everything else can be done with Trim and Layer. It can even be a 1FPS video with 86,400 frames, one for each second in the day.
__________________
f=33

Last edited by NerdWithNoLife; 26th December 2009 at 20:28.
NerdWithNoLife is offline   Reply With Quote
Old 27th December 2009, 00:18   #3  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 157
I managed to do it by modifying the HoursMinutesSeconds function, and by creating a cheap mask with the clip's own greyscale image, then a bunch of trimming. The car got dirtier taking the shortcut, but I still got there!
Code:
Function AM(Clip Last)
{ # "%02.xf" for fractional seconds where:- x=0 None,1=tenths,2=hundredths,3=thousandths
	ScriptClip("""subtitle( \
	string(int(current_frame/FrameRate/3600),"%02.0f")+ ":" + \
	string((int(current_frame/FrameRate/60) % 60),"%02.0f")   + ":" + \
	string((int(current_frame/FrameRate*10000) % 600000)/10000.0,"%02.0f") + \
	"AM" \
	)""")
}

Function PM(Clip Last)
{ # "%02.xf" for fractional seconds where:- x=0 None,1=tenths,2=hundredths,3=thousandths
	ScriptClip("""subtitle( \
	string(int(current_frame/FrameRate/3600),"%02.0f")+ ":" + \
	string((int(current_frame/FrameRate/60) % 60),"%02.0f")   + ":" + \
	string((int(current_frame/FrameRate*10000) % 600000)/10000.0,"%02.0f") + \
	"PM" \
	)""")
}

slug=BlankClip(width=640,height=360,fps=1).Trim(0,-1).Loop(times=43200+3600)
AM(Slug).Reverse().Trim(0,-3600).Reverse()+AM(Slug).Trim(3600,-(43200-3600))+\
PM(Slug).Reverse().Trim(0,-3600).Reverse()+PM(Slug).Trim(3600,-(43200-3600))
Crop(0,0,100,20)
Mask(last.GreyScale(),last.Blur(1))
So there's a 24 hour clock. Sloppy coding on my part, I'm sure, but it works.
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 27th December 2009, 01:03   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Glad you found the little snippets of use. Tried your script, kinda gud.
You can change font and size etc in subtitle, dont know if you tried that.
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.