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 14th March 2011, 16:46   #1  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
global variable within ScriptClip?

Hey,

In short, I'd like to store an information into a variable within the ScriptClip environment and query the variable at a (much) later point in the script.

A little longer explanation: in a video the first 10,000 frames are different (softer), so need different treatment. In the middle of the script, I do a Trim(), trimming down frames from both the beginning and end of the video, and after the Trim() command I have to apply a filter to the first segment (what remained from the originally 10,000 frames after trimming).

What I had in mind was this (rough example):

Code:
  ScriptClip("""
	arethesecredits=(current_frame<10000)?true:false
  """)
  ...
  Trim(2654,128609)
  ...
  <lots of scripting here>
  ...
  (arethesecredits == true ) ? Sharp(1.0) : Blur (0.25)
It turned out it doesn't work. Not even with putting the last line into another ScriptClip().

I know there are theoretical roundabouts to this, such as applying the filter before the trimming, or do everything within one ScriptClip() command, but in this case these wouldn't really work in the practice. Modifying the script to achieve this simple thing would make my life difficult as hell.

Does anyone know how to implement the original idea? It'd be very-very helpful to me.
zee944 is offline   Reply With Quote
 

Tags
scriptclip, variable

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 19:46.


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