Log in

View Full Version : how to overlay a video on a video


adrianmak
4th November 2006, 23:42
I used After Effect (AE) to create OP karaoke effect of an anime.

Then I used avisynth to trim and overlay function to overlay the karaoke to original anime

This is my avisynth script
avisource("anime_raw.avi")
karaoke=avisource("karaoke.avi")

trim(0,999)+trim(1000,1030).overlay(last,karaoke,mask=sign.showalpha())+trim(1031,0)

When I opened the script in VDM, it returned an error
Script error: Invalid arguments to function "overlay"

stickboy
4th November 2006, 23:57
I used After Effect (AE) to create trim(1000,1030).overlay(last,karaoke,mask=sign.showalpha())You're passing three clips to Overlay:
1. The result of Trim(1000, 1030)
2. 'last', which happens to be the result of AVISource("anime_raw.avi").
3. karaoke

Pick two.

Probably you meant:
Trim(1000, 1030).Overlay(karaoke, mask=sign.ShowAlpha())which is equivalent to:
Overlay(Trim(1000, 1030), karaoke, mask=sign.ShowAlpha()).