View Full Version : Animated logo with Avisynth
andy_blah
9th February 2009, 13:44
I want to burn an animated logo into a video file. My first problem is that when I open this script in VirtualDub (for testing purposes, I actually encode my videos in H.264 with MeGUI):
video = DirectShowSource("opening.avi").ConvertToRGB32
logo = ImageSource("%04d.png", start=1, end=9, fps=2, pixel_type = "rgb32")
logo = ChangeFPS(logo, 29)
Layer(video, logo, x=600, y=0)
And I see the video, and the logo displays, but it only shows one image from the sequence. The images are from 0001.png to 0009.png (will increase in number as I use those 9 images just for testing). Any way to fix this?
Thank-you in advance
Gavino
9th February 2009, 14:33
Presumably what you see is the last frame of the logo?
You need to loop the logo clip:
logo = ImageSource("%04d.png", start=1, end=9, fps=2, pixel_type = "rgb32").Loop()
andy_blah
9th February 2009, 14:50
Thank-you for the reply
I see just the first frame of the of the logo. Now that I placed that loop, that first frame appears every 4 seconds, so I suppose that it can't read the next 8 frames, can somebody tell me why and how do I fix this?
Alex_ander
9th February 2009, 14:58
Do the framerates of your video and logo match?
andy_blah
9th February 2009, 15:20
The video is 29.970, saw that error in my script and fixed it, but still the problem doesn't seem to be fixed @.@
kemuri-_9
9th February 2009, 16:44
be sure that all the .png images you're loading from are the same resolution,
avisynth doesn't support variable height/width videos.
Gavino
9th February 2009, 16:47
Perhaps there is a problem with files 0002.png to 0009.png or they are completely transparent.
Check that the logo clip is being created properly by adding 'return logo' at the end of your script (replacing 'Layer(...)').
andy_blah
9th February 2009, 21:54
be sure that all the .png images you're loading from are the same resolution,
avisynth doesn't support variable height/width videos.
I think this is what caused the problem, will do the proper logo to see if it works, if it doesn't work, I can try WarpEnterprise's Corona image loder. Will post again to say if it worked or not.
andy_blah
11th February 2009, 16:23
Worked!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.