PDA

View Full Version : scripts for editing audio


CodeGen
29th March 2009, 09:25
Hi

Im not sure if this is the correct place to post this but here goes.

I have a .ts file that contains h264 video and ac3 audio. I am trying to cut out some ads from this and currently i am demuxing and indexing with dgavcdec109 then using a .avs script to trim() the segments i want to encode.
avs:
AVCSource("H:\tv-caps\\out.dga")
leakkerneldeint(order=1,threshold=8)
Crop(4, 4, -4, -6)
LanczosResize(624, 352)
Trim(2460, 14365) + trim( 19643, 30273) + trim (35937,46841 )

This works fine and produces the avi that i want. The issue I have is trying to get the audio from the original ac3 with the correct cut segments. I am trying to use a .vcf script and running it within virtualdubmod. It seems to get the first range point of 2460 but then doesn't hit any other segments, it just encludes all the rest of the audio. Is this possible the way I am trying to do it?



manualCUT.vcf :

VirtualDub.Open("H:\\tv-caps\\Cutting.avs","",0);
VirtualDub.stream[0].SetSource("H:\\tv-caps\\out.dga PID 19a 3_2ch 48KHz 384Kbps DELAY -525ms.ac3",0x00000203,0);
VirtualDub.stream[0].SetMode(0);
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(2460, 14365);
VirtualDub.subset.AddRange(19643, 30273);
VirtualDub.subset.AddRange(35937, 46841);
VirtualDub.stream[0].Demux("H:\\tv-caps\\out.dga PID 19a 3_2ch 48KHz 384Kbps DELAY -525ms_CuttingMANUAL.ac3");



I am using this avs script called within the .vcf script.
cutting.avs:
AVCSource("H:\tv-caps\out.dga")
leakkerneldeint(order=1,threshold=8)
Crop(4, 4, -4, -6)
LanczosResize(624, 352)


Thanks for the help and any suggestions.