PDA

View Full Version : /h command switch not working as expected?


kypec
28th June 2007, 14:14
I have bunch of old AVI files I captured long time ago with these characteristics
http://ukazto.com/img/Capture1-xa21.png
I want to extract audio tracks from them. I have ACM codec (hacked M$ MPEG-4) installed and when I run the following:
T:\VirtualDub\vdub.exe /h /i T:\scripts\save_wav.vcf "D:\video.avi" "D:\video.wav"
with save_wav.vcf script being
VirtualDub.Open(VirtualDub.params[0]); //open input AVI file
VirtualDub.audio.SetMode(1); //set audio mode to Full processing
VirtualDub.SaveWAV(VirtualDub.params[1]); //save output WAV file
everything goes fine until the very end of file where an error message appears
http://ukazto.com/img/Capture2-3jt1.png

I do not need to get rid of that error, just to prevent it from being shown when one launches vdub via CLI.
Apparently /h switch is not working for me in this case, does anybody know why? :confused:

Dark Shikari
29th June 2007, 04:51
Try using Vdubmod, it has solved some of the problems I've had with SaveWav in various cases.

kypec
29th June 2007, 08:40
:thanks: for VirtualDubMod tip, it works great although I had to change my script to kind of dynamic one
because VDM doesn't accept parameters passed to script as latest versions of VD do :(

Now I run batch command with parameters
T:\scripts\extract_audio.cmd "video.avi" "audio.wav"
extract_audio.cmd contains
@echo off
setlocal

set script=T:\scripts\named.vcf
del %script%
echo //VDM script > %script%
echo VirtualDub.Open(%1,0,0); //open input AVI file >> %script%
echo VirtualDub.audio.SetMode(1); //set audio mode to Full processing >> %script%
echo VirtualDub.SaveWAV(%2); //save output WAV file >> %script%

T:\VirtualDubMod\VirtualDubMod.exe /h /x /s"%script%"

endlocal

Dark Shikari
29th June 2007, 19:49
:thanks: for VirtualDubMod tip, it works great although I had to change my script to kind of dynamic one
because VDM doesn't accept parameters passed to script as latest versions of VD do :(

Now I run batch command with parameters
T:\scripts\extract_audio.cmd "video.avi" "audio.wav"
extract_audio.cmd contains
@echo off
setlocal

set script=T:\scripts\named.vcf
del %script%
echo //VDM script > %script%
echo VirtualDub.Open(%1,0,0); //open input AVI file >> %script%
echo VirtualDub.audio.SetMode(1); //set audio mode to Full processing >> %script%
echo VirtualDub.SaveWAV(%2); //save output WAV file >> %script%

T:\VirtualDubMod\VirtualDubMod.exe /h /x /s"%script%"

endlocal
Now that is a fun hack: generating a virtualdub script using a batchfile! :p

kypec
30th June 2007, 08:36
Now that is a fun hack: generating a virtualdub script using a batchfile! :p Funny or not, it allows me to put a lot of other stuff like WAV normalization, AC3 encoding through Aften right there -> in the same CMD batch :cool: