PDA

View Full Version : Someone can explain me that script ?


iron31
31st May 2002, 07:28
Hello !

This script convert out.wav in out0.waw in divx 64 vma stereo 44 khertz

This job is made at the line with "*** ??"

Someone can explain me all the parameters of this line ?

THANKS


VirtualDub.Open("E:\\Rippack\\RIPPAC~1\\Data\\black.avi",1,0);
VirtualDub.audio.SetSource("D:\\VADROU~1\\out.wav");
VirtualDub.video.SetMode(0);
VirtualDub.audio.SetMode(1);
VirtualDub.audio.SetClipMode(1,0);
VirtualDub.audio.SetConversion(44100,0,0,0,1);
VirtualDub.audio.SetCompression(353,44100,2,16,8010,372,10,"AAgAAAEAdAEAAAE="); ** ???
VirtualDub.SaveWAV("D:\\VADROU~1\\out0.WAV");
VirtualDub.Close();

Swede
31st May 2002, 08:24
Take a look at the docs, vdubs documentation (http://www186.pair.com/vdub/docs/vdscript.txt)...
Here's the section:void SetCompression(int wFormatTag, int nChannels, int wBitsPerSample, int
nAvgBytesPerSec, int nBlockAlign, int cbData, string data);

Sets the audio compression format. The first format clears audio
compression. The second and third specify parameters from a standard
Win32 WAVEFORMATEX structure:

wFormatTag Specifies an audio compression format.
nChannels 1=mono, 2=stereo.
wBitsPerSample 8 or 16 for PCM, but may vary for others.
nAvgBytesPerSec Just what it says.
nBlockAlign The size of a compressed data block.

These fields are present when using an audio compressor with
private data, opaque to VirtualDub:

cbData Size of data in bytes
data MIME BASE64 encoded data string

Usually, you will want to derive these fields by querying the compressor
or looking at job scripts VirtualDub saves, because audio compressors
tend to only accept specific values. Some, but not all, of the private
data formats are documented in MMREG.H in the Win32 Platform SDK.