I have videos I would like to process to remove x secondes at their beginning. Since I have around 140 videos I started to write a script to do so but... it does not work !
My present script is :
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetEditMode(1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(15,1,1);
VirtualDub.video.SetRange(600000,290000);
VirtualDub.video.SetIVTC(0, 0, 0, 0);
VirtualDub.video.SetCompression(0x6376736d,0,8000,0);
VirtualDub.video.SetCompData(4,"SwAAAA==");
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();
As you may note I also change framerate and I compress the video.
My command-line is:
"C:Program FilesVirtualDub-1.10.4VirtualDub.exe" /s "C:Users...framerate.vdscript" /c /b "C:Users...video" "C:Users...output" /r /x
This allows me to process all videos in "C:Users...video" folder and to save them in "C:Users...output" folder.
Framerate change and compression work perfectly but not the trimming !!!
The puzzling thing is that when I open one of the video in VDub then i load the script it actually defines a range and processes it exactly as I want !!!
An additional question is how I could define specific starts for each video files (I may change the script opening each file setting range, closing it and have a routine to change range according to each file - not sure it is possible in a script and I don't know how to do so but I didn't check yet).
Any help would be very much appreciated !
Xavier
question from:
https://stackoverflow.com/questions/66052558/script-for-virtualdub-to-cut-videos 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…