PDA

View Full Version : Trying to write a simple batch script for VDubMod


mob
17th August 2007, 12:13
I've been reading the help file for VDubMod and I'm trying to create a batch script to make my life easier but I just can't figure it out even if my life depended on it... :eek:

All I need to do is take a video file (e.g.: video.avi) and replace the audio with a new audio that I have.

I'm going to start off with video.avi and newaudio.mp3 in the same folder and I want the batch file to replace audio.mp3 in video.avi with newaudio.mp3. I hope this makes sense :)

It should direct stream copy both the new audio and the video.

It sounds simple but I really can't figure this out. I normally do it manually within the program itself but this time I have 78 videos to replace audio for and it gets frustrating when you have to do that many the manual way. :p

If anyone can help me out, thanks a bunch.

mob
17th August 2007, 13:40
Here is what I have in the vcf file I wrote:

VirtualDub.Open("video.avi");
VirtualDub.stream[0].SetSource("newaudio.mp3");
VirtualDub.stream[0].SetMode(0);
VirtualDub.video.SetMode(0);
VirtualDub.SaveAVI("newvideo.avi");
VirtualDub.Close();

Although, it doesn't seem to be working. :(

P.S.: The audio is VBR MP3 (just in case that matters... and I have a feeling it does because whenever I do it the manual way VDubMod always asks me about it)

buzzqw
19th August 2007, 16:43
do all your needed operation in virtualdubmod

then don't save the new avi BUT save the job

then open the jobs file and look what is written

BHH

mob
19th August 2007, 22:05
^That is simply amazing!

Thank you so much buzzqw!

buzzqw
19th August 2007, 22:53
glad to help!

often the solutions is so easy but hidden! :)

BHH