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. |
20th January 2016, 20:01 | #1 | Link |
Registered User
Join Date: Jan 2016
Posts: 5
|
Script watermark animated
Hello,
I am looking for a script that allows me to display an animated image (either gif, png, etc.) to capture or encoded via avisynth. I happened to insert a watermark in this forum grace can be so thanks to you I will. Sincerely younger |
22nd January 2016, 03:01 | #2 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
There's ImageSourceAnim, but it does not work as far as I can tell.
If anyone has got an animated GIF to load with this or any other Avisynth filter, please tell me how you did it. I would load the GIF in VirtualDub and save it as AVI. Save in RGB mode as "uncompressed" or using a lossless codec such as Huffyuv, Lagarith, UTVideo or MagicYUV. (If GIF is odd-sized, crop it to a width & height divisible by 2 before saving to AVI) You can even do transparency, IF there is one color that you can say is transparent. You may have to edit the GIF to make the "transparent" palette index color show a unique color after it's been converted to RGB32. Code:
## background (your source here) V=ColorBars.AmplifyDB(-12) #return V.Info ## RGB32 ## animation source: A=AviSource("bravo-2.avi").Loop ## create transparency mask: transparent_color=$00FFFF ## cyan M=A.ResetMask \ .ColorKeyMask(transparent_color, 1, 1, 1) \ .ShowAlpha #return M ## set animation speed: A=A.AssumeFPS(5).ConvertFPS(V) ## overlay animation over background, lower right corner: x=V.Width-A.Width-16 y=V.Height-A.Height-16 Layer(V, A.Mask(M), level=257, x=x, y=y) |
22nd January 2016, 03:13 | #3 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
Edit: ImageSourceAnim works on the file above . Last edited by Reel.Deel; 22nd January 2016 at 03:15. |
|
22nd January 2016, 03:26 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Earth would not work for me either with ImageSourceAnim, nor would this animated gif:- http://forum.doom9.org/showthread.ph...66#post1754166
LWLibavVideoSource worked OK with both. EDIT: What was your script, dont work for me. EDIT: Did you download the Devil Lib from somewhere ? (think there is a newer one)
__________________
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; 22nd January 2016 at 03:33. |
22nd January 2016, 03:44 | #6 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
LWLibavVideoSource FTW! Thank you!
http://avisynth.nl/index.php/LSMASHSource Code:
LoadPlugin(P + "LSMASH_Source\rev785\AviSynth\LSMASHSource.dll") LWLibavVideoSource("bravo-1.gif").Loop Last edited by raffriff42; 22nd January 2016 at 03:47. Reason: loop |
22nd January 2016, 03:44 | #7 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
__________________
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; 22nd January 2016 at 03:47. |
|
22nd January 2016, 19:32 | #11 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Sorry cadet51, your English is not too good and probably nobody is quite sure what you are saying.
This is what I think you say:- Quote:
Quote:
############################ You need to post an example of the script that you tried, and also would be good if you can post your gif on eg SendSpace.com or MediaFire.com so people can see what is wrong. I know that this is an "English Only Forum", but I think it would be not out of order for you to provide Additional text in your own language (but you must first provide the English). .
__________________
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 ??? |
||
22nd January 2016, 21:43 | #12 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Am unlikely to be of any further assistance, I keep getting DEP (Data Execution Prevention, XP32) error message relating to
Windows Explorer. Only recently did system reinstall, nothing much more than Video related (and compilers) installed. Going to re-install system again now. Bye for now.
__________________
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 ??? |
23rd January 2016, 04:36 | #13 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
EDIT Hope the system comes together StainlessS. Last edited by raffriff42; 23rd January 2016 at 04:38. |
|
28th January 2016, 15:59 | #14 | Link |
Registered User
Join Date: Jan 2016
Posts: 5
|
Hello,
Sorry for my English not good but I'm French. The script works well but rendering my logo does not fit all. Example: Logo avi Logo with ShowAlpha Video=DirectShowSource("D:\00042.m2ts",Audio=false,Fps=23.976) Video=Assumefps(video,23.976) logo=LSMASHVideoSource("D:\furax.mp4") logoT=LSMASHVideoSource("D:\furax.mp4",format="RGB32").ShowAlpha(pixel_type="RGB32") P1 = trim(Video,0,90) P12 = trim(Video,91,335) P2 = trim(Video,334,0) OL1 = Overlay(P12, logo ,x=(P12.Width() - logo.Width() - 20), y=(P12.Height() - logo.Height() - 960), mask=logoT) Video2=P1 + OL1 + P2 video2 =lanczosresize(video2,1920,1080) ConvertToYV12(Video2) Log without ShowAlpha Video=DirectShowSource("D:\00042.m2ts",Audio=false,Fps=23.976) Video=Assumefps(video,23.976) logo=LSMASHVideoSource("D:\furax.mp4") logoT=LSMASHVideoSource("D:\furax.mp4",format="RGB32") P1 = trim(Video,0,90) P12 = trim(Video,91,335) P2 = trim(Video,334,0) OL1 = Overlay(P12, logo ,x=(P12.Width() - logo.Width() - 20), y=(P12.Height() - logo.Height() - 960), mask=logoT) Video2=P1 + OL1 + P2 video2 =lanczosresize(video2,1920,1080) ConvertToYV12(Video2) As you see, the red becomes clear that I want the black background. Thanks for your help. Last edited by cadet51; 28th January 2016 at 16:28. |
28th January 2016, 22:26 | #15 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Your Logo source does not have a true Alpha channel. An alpha channel should look something like this:
(which I created in a paint editor from your image by converting to grayscale and manipulating video levels) Assembling your image, with my Alpha mask, gives this result: EDIT working script example: Code:
Video=DirectShowSource("D:\00042.m2ts",Audio=false,Fps=23.976) Video=video.Assumefps(23.976) logo=DirectShowSource("E:\furax-Fade2.mp4") logoT= logo.ConvertToY8.Levels(21, 1.2, 64, 0, 255, coring=false) ## FAKE MASK FROM LUMA P12 = Video.trim(91,335) OL1 = Overlay(P12, logo, \ x=P12.Width-logo.Width-20, \ y=P12.Height-logo.Height-20, \ mask=logoT) return OL1 Last edited by raffriff42; 16th March 2017 at 23:25. Reason: (fixed image links) |
2nd February 2016, 23:10 | #17 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
My suggestion will work with MP4 or anything else - as long as there is a color that can be set as the "transparent" color. In the case of your sample, the transparent color was Black. After manipulating your image to get a fake "mask" or "transparency" clip (where white=opaque and black=transparent), I used the following script:
Code:
Last=(some video source) ## animation source: A=ImageSource("FG.png", pixel_type="RGB32").Loop ## foreground image OR VIDEO M=ImageSource("M.png", pixel_type="RGB32").Loop ## "mask" image OR VIDEO ## set animation speed (animated GIF only) #A=A.AssumeFPS(5).ConvertFPS(V) ## overlay animation over background, lower right corner: x=V.Width-A.Width-16 y=V.Height-A.Height-16 Layer(V, A.Mask(M), level=257, x=x, y=y) If you obtained your animated logo from a competent artist, he or she should be able to provide you with a matching "mask" or "alpha channel" clip. |
|
|