I have the following script in Avisynth. It generates two frames with two subtitles. One subtitle changes the text and the second subtitle is shown in both frames, unchanged. What I need is to show the second subtitle (ABC) only in the first frame. How can I do that?
I am using Avisynth+ 3.7 on Windows 8.1 64 bitCode:BlankClip(width=640, height=360, length=1, fps=1, color=$FFFFFF) Subtitle("123", size=100, x=320, y=290, align=2, text_color=$0000ff) \ ++ Subtitle("456", size=100, x=320, y=290, align=2, text_color=$0000ff) Subtitle("ABC", size=100, x=620, y=360, align=3, text_color=$000000)
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
One way is to make 2 different frames (exclude "ABC" from the 2nd), then splice (append temporally)
Code:BlankClip(width=640, height=360, length=1, fps=1, color=$FFFFFF) Subtitle("123", size=100, x=320, y=290, align=2, text_color=$0000ff) Subtitle("ABC", size=100, x=620, y=360, align=3, text_color=$000000) a=last BlankClip(width=640, height=360, length=1, fps=1, color=$FFFFFF) Subtitle("456", size=100, x=320, y=290, align=2, text_color=$0000ff) b=last a+b
-
Thank you, it works.
But what can I do when I have 30 such frames? Some of them have a second line and some of them don't have it. Should I keep defining variables c,d,e,f etc? -
It's just one way to approach this problem. You can use other names for variables if you want to - often descriptive names can help with organization
There might be some simpler way, if you had some overlap or similar text, but none of the text is the same between your 2 frames in that example
Other options are video editors, NLE's . Many people feel it's easier to work in a GUI based NLE -
Make yourself a little function that appends a frame with two optional subs, then call as wanted:
Code:function AppendSubs(clip v, string "sub1", string "sub2") { BlankClip(v, length=1, color=$FFFFFF) Subtitle(sub1, size=100, x=320, y=290, align=2, text_color=$0000ff) Subtitle(sub2, size=100, x=620, y=360, align=3, text_color=$000000) v+last } BlankClip(width=640, height=360, length=1, fps=1, color=$FFFFFF) AppendSubs(last, "AAA", "111") # show both subs AppendSubs(last, "BBB", "") # show only the first sub AppendSubs(last, "", "333") # show only the second sub AppendSubs(last, "", "") # show no subs
Similar Threads
-
Potplayer: show frame number
By madbucky in forum Software PlayingReplies: 37Last Post: 13th Jul 2021, 13:33 -
Show frame number in avisynth preview
By pooksahib in forum Video ConversionReplies: 5Last Post: 1st Oct 2020, 01:32 -
Partial frame stab() as basis for whole frame? (Avisynth)
By lordsmurf in forum RestorationReplies: 28Last Post: 11th Sep 2020, 10:36 -
Frame-by-frame combing detection in AviSynth
By ZetaStax in forum Video ConversionReplies: 3Last Post: 2nd Sep 2019, 15:43 -
Show Frame type (I, P, B) in Avisynth
By zerowalk in forum EditingReplies: 6Last Post: 7th Aug 2019, 02:00