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 20th June 2004, 21:33   #1  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
ShowFrameNumbers behavior

Is there a way to display the frame number in the upper right corner only?

ShowFrameNumbers either fills the entire right side with the number, or scrolls annoyingly. I just want the frame number displayed in the upper right only.

Perhaps there is a way to do this via the Subtitle command?
Cyberia is offline   Reply With Quote
Old 20th June 2004, 21:36   #2  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Method 1:
Code:
ScriptClip("Subtitle(String(current_frame), align=9)")
Method 2:
Code:
function ShowNumber(clip c, int n)
{
    return c.Subtitle(String(n), align=9)
}

Animate(0, FrameCount() - 1, "ShowNumber", 0, FrameCount() - 1)

Last edited by stickboy; 20th June 2004 at 21:41.
stickboy is offline   Reply With Quote
Old 20th June 2004, 21:49   #3  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
Sorry for being a pain. Thanks, that works but I can't display the Version simultaneously (see this thread)

Id really like to be able to do the version string and the current frame number using independent commands. I am doing this from my own GUI and want to be able to turn each one on/off without cross-checking the other option (but i'll do it if I have to).
Cyberia is offline   Reply With Quote
Old 20th June 2004, 21:55   #4  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
Ummmmm. Did the Info() command ALWAYS display the current frame number?

After using the ScriptClip command, Info() now displays the frame number and I can't make it stop.

I am aiming to be able to display Info(), the version AND the current frame number INDEPENDENTLY and/or SIMULTANEOUSLY.
Cyberia is offline   Reply With Quote
Old 21st June 2004, 01:46   #5  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Quote:
Originally posted by Cyberia
Thanks, that works but I can't display the Version simultaneously
Huh?
Code:
AVISource("foo.avi")
ScriptClip("Subtitle(String(current_frame), align=9)")
Subtitle(VersionString())
works for me... (as in the other thread, make sure you understand how implicit last works! If you've assigned clips to variables, you will need to chain your filters together explicitly!)
Code:
c = AVISource("foo.avi")
c = c.ScriptClip("Subtitle(String(current_frame), align=9)")
c = c.Subtitle(VersionString())
Quote:
Ummmmm. Did the Info() command ALWAYS display the current frame number?
Yes.

Last edited by stickboy; 21st June 2004 at 01:50.
stickboy is offline   Reply With Quote
Old 21st June 2004, 03:05   #6  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
stickyboy, thanks for your help.

I just spent a minute swearing at myself. I was using this script wondering why I could only get the last line to execute:
Code:
video=aviscript("foo.avi")
video = ScriptClip("Subtitle(String(current_frame), align=9)")
video = Subtitle(VersionString())
When it should have been:
Code:
video=aviscript("foo.avi")
video = video.ScriptClip("Subtitle(String(current_frame), align=9)")
video = video.Subtitle(VersionString())
Sorry bout that, my bad.
Cyberia is offline   Reply With Quote
Old 21st June 2004, 03:12   #7  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
At least spell my name right.
stickboy is offline   Reply With Quote
Old 21st June 2004, 03:22   #8  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
oopsie. sorry.
Cyberia is offline   Reply With Quote
Old 21st June 2004, 18:03   #9  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
One last question:

If I wanted to issue the 'font' parameter of the Subtitle command which is inside a ScriptClip command how would I do that? (ie: How do I nest quotation marks?)

Code:
video=video.ScriptClip("Subtitle(String(current_frame), font=Courier, size=16, align=9)")
This generates an error, and so does this:
Code:
video=video.ScriptClip("Subtitle(String(current_frame), font="Courier", size=16, align=9)")
Cyberia is offline   Reply With Quote
Old 21st June 2004, 18:16   #10  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
See this thread:
did you know: string containing quotes

You also can build up a string by doing things such as:
Code:
function Quote() { return Chr(34) }

MessageClip(Quote() + "Nested quotes?" + Quote() + " he asked")
Or you could avoid the issue entirely and create a wrapper function for Subtitle that always uses Courier.
stickboy 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 15:29.


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