View Full Version : AVS plus 5.1 audio channels to WMV
buzzqw
5th December 2006, 13:55
Hi all !
i had successfully implemented the wvc1 encoder into automkv but i have a problem with audio
my application work through avisynth both for video and audio.
a typical avs look like
movie = mpeg2source("movie.d2v")
audio = NicAC3Source("audio.ac3")
movie=lanczosresize(movie,640,480)
return audiodub(audio,movie)
in this way the audio will be 5.1 and the wmcmd.vbs parameter are (for audio, i cut out the video part):
-a_codec wmapro -a_mode 0 -a_setting 192_48_6
in this way the cscript.exe goes crazy and crash.
BUT if downmix (either with NicAC3Source("audio.ac3",2) or by adding audio=getchannel(audio,1,2) the encoding goes fine without a problem (same command line but 192_48_2).
i tryed even with directshowsource (using ffdshow as decoder) but the problem is the same
Any tips ?
BHH
zambelli
5th December 2006, 21:27
Surely you mean -a_setting 192_48_6_24, right? 192_48_6 is not a valid setting.
buzzqw
5th December 2006, 22:33
the _24 could be omitted... since is default ?
and anyway with or without for me isn't working... cscript (ver 5.6) crash (tryed with directshowsource (ffdshow) and with NicAC3Source)
i tryed even with 1 pass encoding, no way
i tryed with makeavis (from ffdshow package), now way
other suggestion ?
thanks for your interest !
BHH
zambelli
6th December 2006, 04:00
the _24 could be omitted... since is default ? other suggestion ?
Perhaps the 6ch output is not in a format that WME9 expects. For example, WAVE_FORMAT_IEEE_FLOAT output support was only added in Avisynth 2.57.
buzzqw
6th December 2006, 13:56
ok, got it, thanks.
in that case i need to process multichannel with directshowsource or even the nicac3source is enough ?
BHH
zambelli
6th December 2006, 21:30
ok, got it, thanks.
in that case i need to process multichannel with directshowsource or even the nicac3source is enough ?
I believe WME9 is expecting this audio media type when using 6ch or 8ch audio from an AVI file:
Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 6ch 4608Kbps
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: 1
bTemporalCompression: 0
lSampleSize: 12
cbFormat: 40
WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 22 (extra bytes)
WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}
Is this what you're getting out of Avisynth? You can verify by playing it back in Media Player Classic and checking the pin properties of the audio renderer input pin.
buzzqw
6th December 2006, 23:04
ok, i had installed avisynth 17/09 build and also update directshowsource.dll to latest beta
my pin is
- Connected to:
CLSID: {79376820-07D0-11CF-A24D-0020AFD79767}
Filter: Default DirectSound Device
Pin: Audio Input pin (rendered)
- Connection media type:
Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 6ch 4608Kbps
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: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40
WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 22 (extra bytes)
WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}
pbFormat:
0000: fe ff 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 þÿ..€»...Ê......
0010: 16 00 10 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q
- Enumerated media type 0:
Set as the current media type
- Enumerated media type 1:
Unknown
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Stream {E436EB83-524F-11CE-9F53-0020AF0BA770}
subtype: MEDIASUBTYPE_None {E436EB8E-524F-11CE-9F53-0020AF0BA770}
formattype: FORMAT_None {0F6417D6-C318-11D0-A43F-00A0C9223196}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 230400
cbFormat: 0
ffdshow is used as decoder
the script: i tryed both nicac3source and directshowsource (both on ac3 and vob file)
with this script
movie = mpeg2source("movie.d2v")
audio = NicAC3Source("audio.ac3")
OPT_AllowFloatAudio=True
return audiodub(audio,movie)
cscript crash
if i substitute the
audio = NicAC3Source("audio.ac3")
with
audio=directshowsource("audio.ac3")
crash again
NOTE both script play nicely on windows media player
even this scrip
movie=directshowsource("test.vob",audio=false)
audio=directshowsource("test.vob",video=false)
cause a crash
this is the paramenter of audio encoding
-a_codec wmapro -a_mode 0 -a_setting 192_48_6_16 or _24 don't change a thing...
while encoding in -v_mode 0 (cbr with wvc1)
on last even this simple script
directshowsource("test.vob")
crash... :(
i will be glad to be of any support to resolve the problem
BHH
zambelli
6th December 2006, 23:58
crash... :(
i will be glad to be of any support to resolve the problem
Does the crash happen if you disable ffdshow as audio decoder? You shouldn't need an audio decoder for PCM audio.
If you have Visual Studio installed, could you run this under a debugger and get a call stack on the crash?
buzzqw
7th December 2006, 09:54
if i disable in ffdshow (audio part) "Uncompressed" (the latest one in list) i am UNABLE to play those avs
link http://img224.imageshack.us/img224/6981/pinpr9.th.png (http://img224.imageshack.us/my.php?image=pinpr9.png)
... and i am unable to "Debug"... my knowledge of programming are quite limited :(
BHH
sjchmura
8th December 2006, 17:29
Can Visual Studio Beta 1 load an Avs file that has the video and audio dubbed
zambelli
8th December 2006, 20:43
Can Visual Studio Beta 1 load an Avs file that has the video and audio dubbed
I'm not sure I understand your question. What is this related to?
buzzqw
9th December 2006, 11:03
@Can Visual Studio Beta 1 load an Avs file that has the video and audio dubbed
for me is only crash on wmse
movie=mpeg2source(movie.d2v")
#audio = nicac3source("fixed1.ac3") #result don't change using nicac3source
audio = directshowsource("fixed1.ac3")
audio=ConvertAudioTo32bit(audio) #tested with or without
OPT_AllowFloatAudio=True #tested with or without
return audiodub(audio,movie) # @Zambelli this mean dubbed
BHH
bond
9th December 2006, 11:43
moved
zambelli
9th December 2006, 19:56
@Can Visual Studio Beta 1 load an Avs file that has the video and audio dubbed
for me is only crash on wmse
Sounds like somebody made a leap from Visual Studio to WME Studio Edition. Talk about a non-sequitur. ;)
buzzqw
9th December 2006, 20:33
ops... my brain had translate visual studio to wmse.. sorry
but i doubt that a RAD could load a avs... :p
I have a request for Microsoft/Zambelli: is possible to have an "normal" audio encoder (.exe) that accept piping as NeroAACEnc.exe ?
the same could be done with Windows Media Video, for not using cscript.exe/WMCmd.vbs ?
EDIT: obviusly must be possible to mux audio and video...
thanks a lots
BHH
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.