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 3rd September 2018, 21:19   #1  |  Link
preludium975
Registered User
 
Join Date: Aug 2018
Posts: 12
fillmargin

I want to fillmargin in a specified range. How can I do that?

I tried this, but this isn't working. :/

Code:
fill=last.fillmargins(0,0,5,0)
ConditionalFilter(last, fill, "SceneType", "<", "1")
ConditionalReader("X:\deadpool\intro.txt", "SceneType")
intro.txt:
Code:
type int
default 0

R 75 577 1
The full script is here: link


This is applying the fillmargins on all frames.

Last edited by preludium975; 3rd September 2018 at 21:20. Reason: spelling fix
preludium975 is offline   Reply With Quote
Old 4th September 2018, 13:48   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
preludium975,

This works I guess. [perhaps you just could not see it working, or expected something else like LetterBox]

Code:
# Stack Overhead Subtitle Text, with optional FrameNumber shown.
Function TSub(clip c,string Tit,Bool "ShowFrameNo",Int "Col"){
    c.BlankClip(height=20,Color=Default(Col,0))
    (Default(ShowFrameNo,False))?ScriptClip("""Subtitle(String(current_frame,"%.f] """+Tit+""""))"""):Subtitle(Tit)
    Return StackVertical(c).AudioDubEx(c)
}

Colorbars(Pixel_Type="YV12").Letterbox(10,10,10,10,Color=$FF0000).KillAudio
#Uncomment One of below lines
fill=last.Letterbox(40,50,60,70).Subtitle("LetterBox",align=5,size=48)
#fill=last.fillmargins(40,50,60,70).Subtitle("Filled",align=5,size=48)

ConditionalFilter(last, fill, "SceneType", "<", "1")
ConditionalReader("Intro.Txt", "SceneType")
Return TSub("Source",True,$0000FF)

/* Contents of Intro.Txt
type int
default 0

R 75 577 1
*/
Works fine on specified frames here.

EDIT: For any Wiki Editor, above script is excellent example for any/all FillMargins/LetterBox/ConditionalReader/ConditionalFilter on Wiki.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 6th September 2018 at 12:58.
StainlessS is offline   Reply With Quote
Reply

Tags
conditionalfilter, conditionalreader

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 12:56.


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