I'm trying to add a logo/watermark to my video with avisynth (via megui). This is my current script:
However I keep getting the following error:Code:LoadPlugin("D:\Program Files\Program Inst\MeGUI_2507_x86\tools\remapframes_5F25_dll_20050826\RemapFrames.dll") a2=ImageReader("X:\Diadem\logotest.tiff") a3=ImageReader("X:\Diadem\logotest.tiff",pixel_type="RGB32").ShowAlpha(pixel_type="RGB32") Overlay(a2,mask=a3)
AviSynth script error:
ImageReader: error 'Could not open file' in DevIL library
reading file X:\Diadem\logotest.tiff
I'm quite new to avisynth so I could be overlooking something but any help I could receive would be most appreciated.
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 13 of 13
Thread
-
-
It looks like you're opening the tiff file correctly. So there may be something about the file that ImageReader() doesn't like. Does your tiff file have an alpha channel?
Your script has another problem -- it never opens a video file on which to overlay the logo. So the Overlay() won't work.Last edited by jagabo; 5th Feb 2015 at 08:02.
-
-
Yes.
Simplify your script to see if you can isolate the problem. Reduce it to only:
Code:ImageReader("X:\Diadem\logotest.tiff")
Code:ImageReader("X:\Diadem\logotest.tiff", pixel_type="RGB32")
Maybe you should upload the tiff file so someone can analyze it.
No, you don't have to repeat it. The line wasn't in your script so I mentioned that you needed to actually open a video before you could overlay onto it. -
Gave that a go but sadly kept receiving the same error.
Here is the logo if anyone could take a look: http://zee-dot.com/logotest.tif -
One thing to note: your file has the extension tif. But your script specifies tiff.
-
A lot of programs don't like your tif file. Have you tried another format? Like png? bmp?
-
-
Code:
LoadPlugin("D:\Program Files\Program Inst\MeGUI_2507_x86\tools\remapframes_5F25_dll_20050826\RemapFrames.dll") a1=DirectShowSource("X:\Diadem\Subs\150204T-ARA.mp4") a2=ImageReader("X:\Diadem\logotest2.bmp") a3=ImageReader("X:\Diadem\logotest2.bmp",pixel_type="RGB32").ShowAlpha(pixel_type="RGB32") Overlay(a1,a2,mask=a3) LoadPlugin("D:\Program Files\Program Inst\MeGUI_2507_x86\tools\ffms\ffms2.dll") FFVideoSource("X:\Diadem\Subs\150204T-ARA.mp4", fpsnum=25, fpsden=1, threads=1) #deinterlace #crop #resize #denoise LoadPlugin("D:\Program Files\Program Inst\MeGUI_2507_x86\tools\avisynth_plugin\VSFilter.dll") TextSub("X:\Diadem\Subs\T-ARA CNY Greetings 150204 on Mango TV.ass", 1)
-
Here's the problem: whenever you don't specify a named video stream the name "last" is used instead. So Overlay() is creating a stream called last from a1, a2, and a3 . Then you call FFVideoSource() without naming the stream. So a new stream is created called last, throwing out the previous one (the one with the logo). Finally, TextSub() draws text onto last (the new one). If you get rid of the ffVideoSource() line you will get your logo and subtitles on the original video.
Generally, ffVideoSource() is more reliable and accurate than DirectShowSource(). So I would replace DirectShowSource() with ffVideoSource() in the second line. -
Thanks for the explanation!
Sadly the change made no difference. However I found a different script which finally and thankfully is working well for me.
Leaving it here if it can help anyone with issues similar to mine:
VIDEO=DirectShowSource("video")
IMAGE=ImageSource("logo")
Overlay(VIDEO, IMAGE, mask=IMAGE, opacity=1, x=10, y=10)
Thanks a lot again jagabo!