I'm trying to label my video encode with a picture at a certain point. I also want it to fade in. This is the code I'm trying to accomplish that with:
global a1=last
global a2=ImageReader("D:\David\Source Material\For Encoding or Editing\DBZ Remastered\Episode 231\Ep. 231.png", pixel_type="RGB32")
JDL_ApplyRange(1350, 1553, "Overlay(a1, a2, mask=a2.ShowAlpha().FadeIn(27))")
With just Overlay itself, the FadeIn works perfectly fine but obviously, the picture is there during the whole video. When I put it in the JDL_ApplyRange method, the image stays in between the frame numbers specified but it doesn't fade in. I think that's because JDL_ApplyRange isn't compatible with things that change frames around (though I'm not sure FadeIn does so..). I tried placing FadeIn in every place possible but it doesn't work anywhere. When I applied it to the end of JDL_ApplyRange, it told me it was incompatible with it and told me to use JDL_ApplyRangeOld. But, Overlay doesn't work in that function, so, any solutions you can think of?.. Greatly appreciated, thanks.
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 19 of 19
Thread
-
-
Why was the other thread locked on Doom9?
The easiest way IMO would be to use trim() to apply the overlay in segments -
Originally Posted by poisondeathray
To be honest, I tried Trim already but couldn't figure out how to use it properly. I don't really get it... I really only started all this stuff a couple months ago. I feel sorry that you practically have to baby me. Lol, but thanks man, I really appreciate it. -
Gavino basically gave you the script in the other thread
Think of Trim() as cutting in segments, so Trim(0,100) would return a video with frames 0 to 100
Code:a1=mpeg2source("file.d2v") a2=ImageReader("logo.png",pixel_type="RGB32") a1.Trim(0,1376) ++ Overlay(a1.Trim(1377,1553),a2,mask=a2.ShowAlpha().FadeIO(27)) ++ a1.Trim(1554,0)
For some reason, the fade out isn't working with the overlay, only fade in works... I'll fiddle with it or maybe someone else knows why -
Originally Posted by poisondeathray
-
OK if you use reverse() you can use fadeIN() , and on that cut sequence reverse it again to place it in with a Trim() command and it will look like a fade out. You have to get the frame#'s exact by working backwards because the end frame is now frame 0. I'd still like to know why the FadeOUT doesn't work with the overlay, but this should work as a workaround
-
Originally Posted by poisondeathray
Code:function FadeOutX(clip c, int frames) { return c.DeleteFrame(c.FrameCount-1).FadeOut(frames) } function FadeInX(clip c, int frames) { return c.DeleteFrame(0).FadeIn(frames) }
-
I was fooling around with it while you guys were posting back and forth, and came up with a different way to do it, using the Dissolve command:
A=MPEG2Sourcempeg2source("file.d2v")
B=ImageSource("logo.png",pixel_type="RGB32",End=20 3)
X=A.Trim(0,1376)
X=Dissolve(X,B,27)
Y=A.Trim(1377,0)
X+Y
It's a 27 frame Dissolve (fade in), ending at frame number 1376 with the PNG lasting a total of 203 frames before going back to the original video. It could be made to dissolve out the same way (not needed apparently). -
Typhoon - That function is basically the same as using FadeIn or FadeOut manually, but it has to be applied to the overlay segment, not the actual video portion. The problem seems to be with all types of FadeOUT, FadeOUT1, FadeOUT2, and the "out" portion of fadeIO versions for the overlay, not the video portion
I can confirm, the reverse trick does work for the fade out, for the transparent overlayed section
manono's script looks interesting, I'll play with it in a sec.. -
Originally Posted by manono
-
Originally Posted by poisondeathray
-
Originally Posted by manono
-
This would be the "hack" using reverse() for the overlay fade out. I split it out to make it more clear for analysis
Code:a1=Mpeg2Source("file.d2v") a2=ImageReader("logo.png",pixel_type="RGB32") b1=a1.Trim(0,1376) b2=Overlay(a1.Trim(1377,1500),a2,mask=a2.ShowAlpha().FadeIn(27)) b3=Overlay(a1.Trim(1501,1553).Reverse(),a2,mask=a2.ShowAlpha().FadeIn(27)) b4=a1.Trim(1554,0) b1++b2++b3.Reverse()++b4
-
Originally Posted by Typhoon859
-
Originally Posted by poisondeathray
-
@manono - I think typhoon wants the transparent overlay to dissolve or fade, not the underlying video. It's not clear from this thread opening post what typhoon wanted, but I had the benefit of viewing the other thread, and he really should have made a better/more clear OP.... The RGB has to be 32 for the alpha channel to show through on the .png image, and the alpha needs to be called with ShowAlpha() in avisynth or the image will be 100% opaque, and the underlying video portion will not be visible behind the overlay section
I might be missing something, but I can't get your script to work either... -
Originally Posted by poisondeathray
-
Originally Posted by poisondeathray
I guess there's no need now for anyone to get it to work. But by fooling around and doing it myself I learned something that may come in handy in the future. About all I did that's not in the posted script was to resize the PNG to the resolution of my test AVI and convert the AVI's colorspace to RGB32. -
Originally Posted by manono
Similar Threads
-
FadeIn/FadeOut (Avisynth) question
By Cherbette in forum EditingReplies: 5Last Post: 20th Jan 2012, 21:27 -
avisynth - overlay fadein from transparent
By doma79 in forum EditingReplies: 12Last Post: 6th Dec 2011, 11:38 -
Compatibility issue between Cameo Grabster 200 and Vista
By nawp in forum Newbie / General discussionsReplies: 0Last Post: 8th Mar 2008, 09:12 -
Sound Card Compatibility with After Effects CS3 Issue...
By Angelus22 in forum EditingReplies: 1Last Post: 28th Oct 2007, 07:20 -
PAL + NTSC Compatibility Issue !?
By ells6363 in forum Newbie / General discussionsReplies: 7Last Post: 19th Jun 2007, 12:37