Log in

View Full Version : Why is my audio listed as 5.1?


abyss616
24th May 2010, 00:01
This is the first time I've used avisynth since I upgraded my computer to Windows 7 a month ago. I used the following process numerous times without this issue. I'm trying to take footage captured using my Hauppauge HD-PVR, edit it in virtualdub using an avs script and convert to DVD.

This is the script I'm using:

LoadPlugin("DGAVCDecode.dll")
LoadPlugin("MPEG2Dec3.dll")
Loadplugin("FDecimate.dll")
LoadPlugin("BT709ToBT601.dll")
LoadPlugin("UnDot.dll")
DirectShowSource("NewOrleans-TampaBay.TS")
FDecimate(rate=23.976,threshold=1.0)
LanczosResize(720,480)
BT709ToBT601()
UnDot()

Once I import the script into VDub or into AVStoDVD, the audio is listed as 5.1 channels when it was captured in stereo. MediaInfo lists the original .ts file as stereo.

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 2
Format profile : LC
Muxing mode : ADTS
Duration : 34mn 34s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Video delay : -50ms
Stream size : 31.7 MiB (1%)

So why is the audio listed and being saved as 5.1 when it is clearly stereo? TIA.

Gavino
24th May 2010, 01:03
Perhaps your decoder for AAC audio (ffdshow?) is set up to always deliver 5.1 output.

abyss616
24th May 2010, 01:31
I didn't have ffdshow installed so I did. The mixer in the ffdshow audio decoder was set up for 7.1 surround which is what I have. I imported a file and lo and behold, the audio was listed as 7.1. I changed it to 'same as input' and we're back to just two channels. Will that have any effect on any audio or video files I play in the future?

Gavino
24th May 2010, 18:09
Will that have any effect on any audio or video files I play in the future?
Yes, I imagine so.
The thing is that ffdshow is geared towards playing as well as simply decoding, so it has the possibility to apply all sorts of filters to the decoded stream. Great when you want it, but it can cause confusion when you use it in a decoding context where you just want the raw output.

You probably need to set up separate ffdshow configurations for 'playing' and 'decoding' and switch between them as required. Perhaps an ffdshow 'expert' can comment further.

abyss616
25th May 2010, 00:50
Well so much for that. After working before, despite any changes to the mixer in ffdshow, audio is always listed as 5.1 in VDub. Any other suggestions?

Guest
25th May 2010, 01:08
Can you post a small stream sample?

abyss616
25th May 2010, 01:22
Do you want an original ts file? I know that they are stereo.

Guest
25th May 2010, 02:13
Yes, the original TS stream.

abyss616
25th May 2010, 02:20
http://www.mediafire.com/?zhzdj0ghcmy

Guest
25th May 2010, 02:37
The source is indeed stereo AAC.

I do not use ffdshow but rather the Sonic Cinemaster decoder. When I use DirectShowSource() and open the script in VirtualDub it shows as stereo.

abyss616
25th May 2010, 03:38
I had the 5.1 problem before I installed ffdshow. I recently upgraded to Windows 7 and did not have this problem under Vista. I used ffdshow to attempt to force stereo. It worked, albeit temporarily.

tebasuna51
25th May 2010, 09:52
You can always use a dedicated AviSynth AAC decoder if you extract previously the aac stream (eac3to).
You need BassAudio.dll (included in BeHappy package) and Bass.dll + Bass_aac.dll (from http://www.un4seen.com/ )

Then use a script like:
...
LoadPlugin("BassAudio.dll")
DirectShowSource("NewOrleans-TampaBay.TS", audio=false)
...
video=UnDot()

BassAudioSource("your.aac") #the output is 24 bit float
audio=ConvertAudioTo16bit()

AudioDub(video,audio)

abyss616
25th May 2010, 14:27
Thanks for the help, but now I get a popup anytime I try to open a file in VDub or AVStoDVD, regardless of whether it has AAC audio or not. The popup says "Bass 2.2 required" over and over again before the file finally opens. I downloaded the latest versions from those sites and placed them in my root directory where my avs files are and in the plugins directory in my Avisynth folder. I'm not even trying to load the plugin in my avs script and it gives me the error.

abyss616
26th May 2010, 01:04
Just to give a quick recap in case there is any confusion:

I'm editing video for the first time since upgrading to Windows 7 - had none of these issues in Vista
Had no third-party decoders (such as ffdshow) installed when I first started. I installed ffdshow after having problems but did not fix it.
My source files are confirmed stereo (by MediaInfo and other members) but show up as 5.1 when loaded into VDub or AVStoDVD
**This happens whether the audio in the original file is AAC or AC3 - it is not just an AAC issue**

tebasuna51
26th May 2010, 03:53
...
The popup says "Bass 2.2 required" over and over again ...
Seems you have old dll's in your AviSynth plugins folder, delete all bass*.dll, and put only last version 2.4 (from http://www.un4seen.com/) and BassAudio.dll from last BeHappy package (also v2.4).

If you want use DirectShowSource you need configure your DirectShow system properly (like Gavino say you).

abyss616
26th May 2010, 04:17
Yeah, I got the bass 2.2 problem solved. Searched for all instances of bass.dll on my computer and replaced them with the current version.

The 5.1 problem, unfortunately, still exists.

tebasuna51
26th May 2010, 12:46
With:
video=DirectShowSource("D:\Internet\Sample.TS", audio=false)
BassAudioSource("D:\Internet\Sample.TS_2.aac") #the output is 24 bit float
audio=ConvertAudioTo16bit()
AudioDub(video,audio)

I get audio PCM stereo 16 bits 48 KHz in VirtualDub.

abyss616
26th May 2010, 14:14
Every time I try to open an AVS file with "LoadPlugin("bass_aac.dll")" it gives me an error: unable to load "bass_aac.dll". I have it in my directory with all of my other dll's.

tebasuna51
26th May 2010, 15:28
Then use a script like:
...
LoadPlugin("BassAudio.dll")
You need load BassAudio.dll, AviSynth interface to use bass*.dll

Gavino
26th May 2010, 17:27
In case it's not clear what tebasuna51 is saying, you need only call LoadPlugin("BassAudio.dll"). This will then automatically load bass_aac.dll (which is a 'normal' dll, not an Avisynth plugin).

bass.dll and bass_aac.dll must be in the same folder as BassAudio.dll.

abyss616
26th May 2010, 19:04
I will try this when I get home, but what happens when you open the file using ONLY DirectShowSource (audio and video as one)? Do you get audio listed as 5.1? That's my original point - I don't know why VDub/avisynth is treating the audio this way when it is clearly only two channels. I would prefer not to demux the original file each time I want to do this since before I was able to edit without this step.

Guest
26th May 2010, 19:34
As I posted earlier, I get stereo when using just DirectShowSource() as you described.

We've told you multiple times that this will be determined by the DirectShow codec; it has nothing to do with VirtualDub.

setarip_old
26th May 2010, 19:40
@abyss616


Hi!

Just a "stab in the dark" - Do you have the "AC3 Filter" installed? If so, check the settings...

abyss616
26th May 2010, 20:17
As I posted earlier, I get stereo when using just DirectShowSource() as you described.

We've told you multiple times that this will be determined by the DirectShow codec; it has nothing to do with VirtualDub.
I understand it has nothing to do with VirtualDub b/c it shows up this way in other applications - there's something else on my computer that's causing this, I just don't know what it is and why I'm asking you guys for help. Per my original post, using DirectShowSource on my Vista installation did not cause this problem. Tweaking ffdshow (as was suggested earlier) did not help and there were no other decoders installed, other than the default, before ffdshow was installed. How else can I tweak the DirectShow decoder?

@setarip_old: I do not have the ac3 filter installed. The only decoder I know of that's installed is ffdshow, which is new.

abyss616
26th May 2010, 21:47
Since neuron has taken what I'm saying completely the wrong way (thank for pointing this out so kindly), I'll attempt to clarify.

The two programs I use to edit/convert video are VirtualDub (using avisynth scripts) and AVStoDVD (also using avs scripts). When I say "I don't know why VDub/avisynth is treating the audio this way", I'm not insinuating at all that it is an error with any of these programs. The programs are just the vehicle that exhibit the problem (since they are the only two that I use). Most here, myself included, believe there is something wrong with a decoder somewhere on my computer - my efforts here are trying to figure out where exactly the process is becoming borked.

My apologies if you think I'm being obtuse or difficult on purpose.

Guest
26th May 2010, 22:48
Open the source media file in GraphEdit and post a screenshot of the graph. We need to establish for certain what DirectShow decoder is being used.

abyss616
27th May 2010, 01:52
Screenshot attached

Guest
27th May 2010, 02:07
So you are *not* using ffdshow. See here:

http://www.hack7mc.com/2009/04/disable-and-replace-ms-dtvdvd-decoder.html

Some further googling may be needed for your specific scenario.

abyss616
27th May 2010, 03:32
Apparently not. I'll give this a shot. Thanks.