i'm trying to combine image with avi video clip.
i'm using:
- AviSynth as frame server
- AvsPmod as editor
i have:
- jpg image. width and height same to video
- avi video clip
My code main.avs
first = Import("frames/first.avs")
second = Import("frames/second.avs")
return first+second
first.avs
SetWorkingDir("U:\video")
intro_pic = ImageSource("source\images\intro_title.jpg", end = 300, fps=35)
intro_pic = audiodub(intro_pic, blankclip(last, length=300))
intro_pic = ConvertToYV12(intro_pic)
intro_pic = intro_pic.Lanczos4Resize(1024, 576)
intro_pic = intro_pic.FadeIn(100, color=$FFFFFF)
return intro_pic
second.avs
SetWorkingDir("U:\video")
frame_intro = AVIFileSource("source\MVI_0111.avi")
frame_intro = frame_intro.ConvertFPS(35)
frame_intro = frame_intro.Trim(125,760)
frame_intro = frame_intro.Lanczos4Resize(1024, 576)
frame_intro = frame_intro.FadeOut(100)
frame_intro = frame_intro.FadeIn(100, color=$FFFFFF)
return frame_intro
but i have a error
splice: The number of audio channels doesn't match
How can i solve this problem?
In avisynth, BlankClip's audio has only one channel by default (http://avisynth.nl/index.php/BlankClip) and I think that it is unlikely that an AVI file has only one audio channel. You don't specify channels number when you use blankclip, and supposing that an AVI file can not unlikely have one audio channels, you're trying to concatenate two videos with different audio channels.
You can check the number of audio channels with the function
And before append your videos, you can ensure that the channels match by using the function (http://avisynth.nl/index.php/GetChannel)