LigH
16th April 2003, 11:55
Hi folks!
For some strange reason, some people need to add any audio stream to the AviSynth output :rolleyes: ... But the current implementation crashes VirtualDub(Mod) immediately when loading this AVS skript.
The best media player i.m.h.o. - "Media Player Classic" by Gabest - showed me the reason for this weird behaviour:
Media Player Classic could not render some of the pins in the graph, you may not have
the needed codecs or filters installed on the system.
The following pin(s) failed to find a connectable filter:
?:\*\*.avs::Avisynth audio #1
Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 0
nSamplesPerSec: 44100
nAvgBytesPerSec: 0
nBlockAlign: 0
wBitsPerSample: 16
The selected line shows the possible reason for the VDub crash: It cannot handle audio with zero channels. Therefore, I modified the snippet slightly - by adding a ConvertToMono() - to the following content:
function AddAudio(clip v1) {
v2 = Blankclip(v1,audio_rate=44100,sixteen_bit=true)
v1 = ConvertToMono(AudioDub(v1,v2))
return v1
}
And voila - VirtualDub(Mod) runs fine!
For some strange reason, some people need to add any audio stream to the AviSynth output :rolleyes: ... But the current implementation crashes VirtualDub(Mod) immediately when loading this AVS skript.
The best media player i.m.h.o. - "Media Player Classic" by Gabest - showed me the reason for this weird behaviour:
Media Player Classic could not render some of the pins in the graph, you may not have
the needed codecs or filters installed on the system.
The following pin(s) failed to find a connectable filter:
?:\*\*.avs::Avisynth audio #1
Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 0
nSamplesPerSec: 44100
nAvgBytesPerSec: 0
nBlockAlign: 0
wBitsPerSample: 16
The selected line shows the possible reason for the VDub crash: It cannot handle audio with zero channels. Therefore, I modified the snippet slightly - by adding a ConvertToMono() - to the following content:
function AddAudio(clip v1) {
v2 = Blankclip(v1,audio_rate=44100,sixteen_bit=true)
v1 = ConvertToMono(AudioDub(v1,v2))
return v1
}
And voila - VirtualDub(Mod) runs fine!