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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 31st January 2014, 06:38   #1  |  Link
shakana
Registered User
 
Join Date: Jan 2014
Posts: 4
Using Global Variables & ScriptClip

Sample Code
function a(bool isGoodFrame)
{
goodFrame = isGoodFrame ? current_frame: goodFrame
c = Subtitle(String(goodFrame))
}

global goodFrame = 0
source = avisource("testclip.avi")
ScriptClip(source, "a(isGoodFrame)")
ConditionalReader(source, "dataFile.txt", "isGoodFrame", false)

In short, this sample code reads a file indicating if a frame looks good or not. It sets goodFrame to the frame number of the last good frame.

How do I get goodFrame to hold its value across frames. It always gets set back to 0.
shakana is offline   Reply With Quote
 

Tags
conditionalreader, global variables, scriptclip

Thread Tools
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 08:12.


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