Hey there. Sorry i'm so late posting this, but i've been swamped with way too much stuff to do, and I forgot,(basically I got a new dirt bike) So, now that i've found some time in front of the puter, i'm here ta dish out episode 11's AVC tip. Merging seperate audio and video sources.
So what we have thus far is this:
directshowsource("C:\Documents and Settings\pod2peer\Desktop\test\test.avi",fps=xx.xx)
autocrop(0)
bilinearresize(xxx,xxx)
What we are now going to do is seperate the audio and video. In this case we're going to assume we are using a .d2v source file created with dgindex. You can still use directshowsource if you have an avi source and a seperate audio you'd like to use, but be sure that the video doesnt have any audio on it.
Now, in order to make AVS accept a video file with a .d2v extension, we have to use a diffrent command instead of directshowsource. the command were going to use is "mpeg2source", and beacuse a .d2v file doesnt contain any audio in it, we are going to use the extracted audio file that dgindex gave us when it created the .d2v file.
Now beacuse we are using a seperated audio and video source, we need to let AVS know that it needs to merge them back together for playback, and in order to do that, we need to let it know which of our files is audio, and which is video, and we also need to inform it what our filters are going to be used on. Try saying that three times real fast.
OK, so in order to let AVS know what it needs to know, we are going to enter two simple commands in front of our existing commands. They are:
Video=
and
Audio=
Simple huh? So now our script should look something like this:
Video=mpeg2source"C:\Documents and Settings\pod2peer\Desktop\test\test.d2v")
Video=autocrop(video,0)
Video=bilinearresize(video,xxx,xxx)
audio=DirectShowSource("C:\Documents and Settings\pod2peer\Desktop\hg\testaudio.ac3")
A couple things to notice that are diffrent in this new command line structure.
First, you'll notice that we are now using the .d2v file extension instead of the .avi, and that we are no longer usinf the "fps=" command at the end of the video source command line. This is beacuse we arent using .avi, were using .d2v, and the lack of "fps=" is beacuse .d2v file extensions dont need to have the fps parameters defined, AVS can read thoes all by itself. Also you'll notice that the audio is labeled as a .ac3 file, this is beacuse dgindex, when ripping a dvd, will extract the audio as .ac3. Now sometimes it will dish out a .wav file, for that, you simply use the .wav extension at the end of the command line instead.
Another thing to notice, is that now, inside each command, where we enter in our value's, you will see an audio or video inserted in along with the commands, this is to further assist AVS in showing what it needs to do with these commands. If you don't enter in the correct audio or video for your audio or video command, then AVS wont know what to do with that command, and will send you a warning message asking what that command means.
Now that we have told AVS that we have seperate audio and video sources, we want to tell it to merge it all together in one complete video. For this we use the "walla" command, and it looks a bit like this:
walla=audiodub(video, audio)
return walla
What this is telling AVS is to use the walla filter to merge the audio and video in the audiodub tag. You put in the "return walla" command to close out the command. So now our latest AVS script should look like this:
Video=mpeg2source"C:\Documents and Settings\pod2peer\Desktop\test\test.d2v")
Video=autocrop(video,0)
Video=bilinearresize(video,xxx,xxx)
audio=DirectShowSource("C:\Documents and Settings\pod2peer\Desktop\hg\testaudio.ac3")
walla=audiodub(video, audio)
return walla
You should be able to copy and paste that to your notepad if your confused, and then simply change the path to the correct spot on your hard drive where the audio and video files are located, and of course, if you filenames are diffrent, you change thoes as well.
I'm not gonna delve into episode 11 much this week, mostly cause I think i've taken up enough page space already, and if you really wanted to know what it was about, you'd simply listen, (and of course vote for us at www.podcastalley.com). Well, see ya all round these part for the episode 12 update, you all have a good week, and thanks for listening to the show. -CJ