PDA

View Full Version : how to split avi using vdub batch processing


koszopal
6th March 2007, 19:53
hi
i have 1 avi this avi contains 2 avi ,
this is xvid with mp3 sound (vbr)
i ve got problem with sound i can split video into 2 avis but sound
is out of sync :(
here is sample script which im using
how can i do to fix this ? :(
Could some1 help me ?
koszopal

//
// $numjobs 2
//

// $job "Job 1"
// $input "test.avi"
// $output "part01.avi"
// $state 0
// $script

VirtualDub.Open("test.avi","",0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource(1);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,0);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.stream[0].EnableFilterGraph(0);
VirtualDub.stream[0].filters.Clear();
VirtualDub.video.DeleteComments(1);
VirtualDub.video.AddComment(0x00000002,"ISFT","VirtualDubMod 1.5.10.1 (build 2439/release)");
VirtualDub.video.AdjustChapters(1);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,1000);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(0,1000);
VirtualDub.SaveAVI("part1.avi");
VirtualDub.Close();

// $endjob


// $job "Job 2"
// $input "test.avi"
// $output "part02.avi"
// $state 0
// $script

VirtualDub.Open("test.avi","",0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource(1);
VirtualDub.stream[0].SetMode(0);
VirtualDub.video.DeleteComments(1);
VirtualDub.video.AddComment(0x00000002,"ISFT","VirtualDubMod 1.5.10.1 (build 2439/release)");
VirtualDub.video.AdjustChapters(1);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(1000,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(1000,1000);
VirtualDub.SaveAVI("part02.avi");
VirtualDub.Close();

// $endjob

CWR03
6th March 2007, 22:32
I've never even heard of batch processing to split a single file. It would seem to be less trouble to return to the original DVD and encode it in two halves.

setarip_old
6th March 2007, 23:03
@kozspal

Hi!

There should be no need to script anything. Try the following:

1)Load your original (DivX-compressed or otherwise) .AVI into VirtualDub
2) Set BOTH "Video" and "Audio" to "Direct Stream Copying"
3) From the "Edit" dropdown menu, select "Set Selection Start"
4) Move slider to approximate halfway point
5) From the "Edit" dropdown menu, select "Go to next keyframe"
6) From the "Edit" dropdown menu, select "Set Selection End'
7) From the "File" dropdown menu, select "Save as AVI" - Save as a new filename (e.g. "Movie1of2.avi").
8) From the "Edit" dropdown menu, select "Set Selection Start"
9) From the "Edit" dropdown menu, select "Move to End"
10) From the "Edit" dropdown menu, select "Set Selection End"
11) From the "File" dropdown menu, select "Save as AVI" - Save as a new filename (e.g. "Movie2of2.avi").

HeadBangeR77
6th March 2007, 23:31
Me thinks he's got problem with synchronization, because VDub still doesn't support VBR MP3. ;)

I will suggest VDubMod with latest patches from 2006.

@ setarip_old:
I've always had problems with VDub both by splitting and cutting out samples, if MP3 VBR stream was present (it's treated more like video stream, not audio, or should be at least). Never had any with VDubMod and in extreme cases the ancient NanDub usually managed to do the right job. ;)

Patched version here... (http://forum.doom9.org/showthread.php?p=964351#post964351)

setarip_old
6th March 2007, 23:53
If, in fact, that does present a problem even when "Audio" is set to "Direct Stream Copy" (VirtualDub "offers" to convert the audio to .WAV, but you can choose not to do that), "kozspal" could instead use NanDub...

koszopal
7th March 2007, 11:15
@kozspal

Hi!

There should be no need to script anything. Try the following:

1)Load your original (DivX-compressed or otherwise) .AVI into VirtualDub
2) Set BOTH "Video" and "Audio" to "Direct Stream Copying"
3) From the "Edit" dropdown menu, select "Set Selection Start"
4) Move slider to approximate halfway point
5) From the "Edit" dropdown menu, select "Go to next keyframe"
6) From the "Edit" dropdown menu, select "Set Selection End'
7) From the "File" dropdown menu, select "Save as AVI" - Save as a new filename (e.g. "Movie1of2.avi").
8) From the "Edit" dropdown menu, select "Set Selection Start"
9) From the "Edit" dropdown menu, select "Move to End"
10) From the "Edit" dropdown menu, select "Set Selection End"
11) From the "File" dropdown menu, select "Save as AVI" - Save as a new filename (e.g. "Movie2of2.avi").

i know procedure but i want to do as batch job file