PDA

View Full Version : AC3 problems


wurz
2008-02-26, 09:10
Hi,

I'm having problems getting my receiver to decode AC3 when outputted from my MacBook. I have verified my receiver and MacBook work correctly as the receiver decodes AC3 just fine when I play films using VLC. When I try using XBMC, there is no sound; the receiver does not detect the AC3 signal. When played thru the MacBook's speakers I get static noise, as expected.

My Audio Output is set to Digital. I'm not sure what else to tinker with in xbmc to get this to work. Any ideas?

This is what I get in the terminal when playing an AC3 encoded film:

Applications wurz$ ./XBMC.app/Contents/MacOS/XBMC
WARNING: The XBMC_HOME environment variable is not set.
++ WARN: could not retrieve file info for `image.nrg': No such file or directory
++ WARN: can't open nrg image file image.nrg for reading
Input #0, avi, from '/Volumes/D$/Video/_Recent/Inland.Empire.avi':
Duration: 02:52:18.0, start: 0.000000, bitrate: 1128 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x336 [PAR 1:1 DAR 40:21], 25.00 tb(r)
Stream #0.1: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
Asked to open device: [S/PDIF]
Asked to create device: [S/PDIF]
Device should be digital: [1]
Channels: [2]
Sample Rate: [48000]
BitsPerSample: [16]
PacketSize: [2048]
Considering: [Built-in Output]

elan
2008-02-26, 10:15
When played thru the MacBook's speakers I get static noise, as expected.

My Audio Output is set to Digital. I'm not sure what else to tinker with in xbmc to get this to work. Any ideas?


The long answer is that I kind of cheat when doing audio passthrough. Portaudio uses an AudioUnit underneath the covers, and when doing passthrough you really shouldn't. Fortunately it seems to work well in most cases. I did read about one person having a short burst of static before the receiver said "Hey, this is encoded audio, what am I doing?"

There are a few things you can check, but it really *should* work. Run the Audio MIDI Setup application, and make sure the Audio Output settings look right for digital output. XBMC should be setting sample rate and bits per sample correctly, but you can make sure they look right. Make sure that no other programs are running that use Audio (and maybe direct your sound effects to go elsewhere). I'm sure this is obvious, but try a few different videos, if you haven't already.

That's about all I can recommend. Most people have gotten passthrough to work, so unless you have an extremely finicky receiver, there could be something wrong with your OS X settings. From the sounds you're hearing, it's trying to dump encoded digital audio out.

(And yes, it is in my longer term plans to rewrite the passthrough code, but it doesn't seem like a high priority now because the vast majority of people are seemingly able to use it perfectly.)


-elan

wurz
2008-02-26, 23:44
Thanks for the reply...still not having any luck. it seems the settings in Audio MIDI Setup change automatically when an app outputs to digital. If I tinker in there xbmc tends to hang when playing a film. The settings match what's in the terminal output anyhow.

Sometimes if I pull the optical cable out and in I get the static noise thru my receiver, and then it drops. Was thinking about the "Passthrough Outpt Device" setting in Audio Hardware. This is currently on S/PDIF, but you can enter anything. Should I have it so it matches my audio ouput device name in OSX?

Don't think my receiver is particularly fussy...it never complained with xbmc on the xbox!

elan
2008-02-26, 23:49
Sometimes if I pull the optical cable out and in I get the static noise thru my receiver, and then it drops. Was thinking about the "Passthrough Outpt Device" setting in Audio Hardware. This is currently on S/PDIF, but you can enter anything. Should I have it so it matches my audio ouput device name in OSX?

Hearing static means that encoded digital output is being sent. If your receiver isn't able to lock onto it, it means that either the stream is being compromised (by a sample rate conversion, e.g.) or that your receiver is really picky about the stream and somehow using the AudioUnit is breaking things.

-elan

fatez
2008-02-26, 23:55
Hey man!

I've the same problem with my MiniMac Intel.

VLC and AC3 sounds good, but Qt or OsXbmc sounds linke a "trrrrrrr"




i'm no happy :(

elrod
2008-02-28, 21:15
I'm still trying to get my HD .mkv files to run. From what I understand it works in most cases, except mine... I'm no expert in coding or anything, just an advanced end-user. Like all the others, VLC runs perfect sound, but XBMC doesnt.
Here are my specs:

2Ghz Intel Core 2 Duo MacMini
1GB RAM

running video from an old G4 server.

XBMC version 0.1.4

and the link to my log:
xbmc.log (http://www.roderique.nl/XBMC/xbmc.log)

Albo
2008-02-28, 21:31
I'm still trying to get my HD .mkv files to run. From what I understand it works in most cases, except mine... I'm no expert in coding or anything, just an advanced end-user. Like all the others, VLC runs perfect sound, but XBMC doesnt.
Do you have any other apps running when trying to play these files? i found that if iTunes was active, I'd get static from mkvs playing in XBMC. As soon as I quit iTunes, the digital sound would pass through to my receiver just fine.

elrod
2008-02-28, 21:50
No I'm not running any other apps. Just XBMC.
It's hooked up with an optical cable to my Creative Inspire 5.1 receiver.

When playing .mkv files through VLC they just play fine, when I play the same from within XBMC, no sound at al (with digital set as output, when set to analog video starts playing faster and still no sound)

When I play from vlc in my MacBook, everything plays fine as well, but when I play video from within XBMC I just get noise...

fatez
2008-02-29, 10:03
Confirmed!

On my Minimac intel 2ghz, AC3 with OSXBMC doesn't work :/


PS: With VLC -> yes

iordonez
2008-02-29, 10:35
Try setting this:

Open Applications/Utilties/Audio MIDI Setup

Select Properties for: Built-in Output
Then Select: Format 48000.0 Hz

That's what I had to do with Perian to get AC3 working and the setting I currently have for XBMC. Also make sure you are using an optical Audio cable...

fatez
2008-02-29, 10:39
No way for me!

I've tryed the "5 pass" Method but in my system doesn't work.


And yes, i've an optical cable infact with VLC AC3's divx sound good in 5.1

iordonez
2008-02-29, 10:43
No way for me!

I've tryed the "5 pass" Method but in my system doesn't work.


And yes, i've an optical cable infact with VLC AC3's divx sound good in 5.1

Sorry not sure what the "5 pass" method is. Did you set your format to 48000.0 Hz? When you restart your computer does the Format stay the same? Also make sure you are changing for Audio Output not Input (it's on the right, not left... gives you same options)

fatez
2008-02-29, 10:59
5 Pass Method :

http://www.cod3r.com/2008/02/the-correct-way-to-enable-ac3-passthrough-with-quicktime/


But doesn'work for me.

VLC yes
QT no
XBMC no

Did you set your format to 48000.0 Hz?
Of Course.

When you restart your computer does the Format stay the same?
No

Also make sure you are changing for Audio Output not Input (it's on the right, not left... gives you same options)
Of Course.


but no way for me.

fatez
2008-02-29, 15:42
@ Eduo

Hey Eduo, if u have time, can u implement the AC3 Passthrough like VLC applications? Some people have this problem... (becouse Ac3 doesnt' work in any way)

very very 10x

consumption
2008-02-29, 17:25
I have the same problem on my macbook pro. If I play an ac3 file through xbmc I get the "trrrr" sound. If i play the file through qt / vlc it plays fine. Is this because I am not passing the sound through to a receiver and using the built-in sound card?

Albo
2008-02-29, 18:42
Hey Eduo, if u have time, can u implement the AC3 Passthrough like VLC applications?
This is already available with OSXBMC, and the majority of users have no issues.

fatez
2008-02-29, 19:12
But why doesen't work in my machine? And why doesn't work in some others machine?

This is my log :

http://www.2shared.com/file/2916751/8c4cdbfc/xbmc.html


And this is my midi setup:

http://img221.imageshack.us/img221/236/dolbyum2.png (http://imageshack.us)

Albo
2008-02-29, 19:17
I don't know, but the fun part is trying to find out!

Albo
2008-02-29, 19:44
Your MIDI setup looks identical to mine. What receiver are you using?

elan
2008-02-29, 20:27
One person was sending digital output to the SA-CD port of his receiver; I'm not saying you're doing this, but the receiver definitely plays a role. I would be the first to suspect my code, but since so many people are having success, my temptation would be to look elsewhere. Narrow the problem down by using different videos, different inputs, and yes, different receivers.

-elan

fatez
2008-02-29, 21:35
Hey but there is a mistake:


Why with VLC can i play divx in 5.1 in same receiver?


I've a Creative DD5.1 5500 and repeat.. with same OS, same divx i have DD5.1 only with VLC.

Why VLC can shift in 5.1 mode out?

Where is the mistake in my system?

Please help me/us to find this mistake

elan
2008-02-29, 22:28
Then I'd probably say that either:

* Your receiver is picky, and the stream we send out isn't "official" enough.

* There's something wrong with your audio settings.

I've already discussed how we do things a bit differently than VLC. That doesn't seem to matter for most people, but it could definitely be improved.

-elan

iordonez
2008-02-29, 22:37
I'd tend to agree, considering the fact that you can't seem to get it working with QT/Perian either. If you can, try plugging it into another receiver. That will at least help you narrow things down a little bit. VLC's AC3 support is much more mature than most other OS X projects that I've come across thus far.

Then I'd probably say that either:

* Your receiver is picky, and the stream we send out isn't "official" enough.

* There's something wrong with your audio settings.

I've already discussed how we do things a bit differently than VLC. That doesn't seem to matter for most people, but it could definitely be improved.

-elan

fatez
2008-03-01, 01:42
I don't have any other receiver :(


But is true, in my case, to set "Passthrough Output Device" in "S/PDIF" ?

I have a MiniMac with optical calbe... (s/pdif is the digital output?)


10x a lot e sorry for my/us questions

fatez
2008-03-03, 19:39
No luky for me..

I've changed the receiver but the problem isn't solved.


Is this a problem for Mac Intel users?


How can i resolv it?


Plz guuru.. i'm desperated :(

elan
2008-03-03, 21:49
It works fine for lots of people. I'm sorry I don't really know what I can suggest except the standard resetting of preferences/reinstalling of things.

The fact that you've changed the receiver probably means it's a software issue on your Mac, something that's influencing the audio stream the way we do things vs the way that VLC does things.

The passthrough audio device shouldn't matter, you can leave that alone, just make sure that AC3 and DTS passthrough are enabled, and that the audio output mode is digital. At this point you should hear the static/hiss of encoding digital audio if all is set correctly in XBMC but your receiver is not able to decode it.

-elan

iordonez
2008-03-04, 01:43
I'm out of answers besides backup your data and fresh install OS X on your computer. It's a little odd that both Perian and OSXBMC won't output AC3 Audio. If you want to do a re-install do the following:

1) reinstall OS X
2) Immediately load XBMC before other programs
3) Test if AC3 output works

If it does work start re-installing your software, testing XBMC ever couple of installs to make sure it still works.

This would rule out any other applications/settings that may have been set and are breaking XBMC.

elan
2008-03-04, 07:45
You could also try creating a new user. That would ensure that at least the user settings were reset.

-elan

elrod
2008-03-04, 14:58
I haven't thought of using a new user account for it, will try when I get back home..sound logical and hopefull, will post my progress tonight.

Thanx guys

fatez
2008-03-04, 18:59
No luky for me.

I tryed to create an new account.. but no dolby digital.
I've reinstall OSX Leopard and no audio in 5.1


I do not undestand why with QT and osxbmc the passthrought doesen't work.

Repeat : The same file avi+AC3 works right with VLC so i can say that my receiver is working fine.

Osxbmc use a different code/library respect VLC?
Can You inject the vlc's code into ur project plz?


PS: i've tried 2 different receiver. The first is a Creative inspire 5500 the second is a newest YAMAHA!


pls if u can, inject the vlc code

elrod
2008-03-04, 20:49
Alas, no luck for me either, I used a new account on the MacMini, no audio
I then tried using my Macbook, on both my normal and a new account no sound. I'm guessing it's my receiver.
Will try and find one tomorrow.

Funny thing is my Creative Inspire 5500 (same as Fatez) has three audio options: stereo, Dolby Digital and Dolby ProLogic. but when playing though XBMC only stereo or Dolby ProLogic can be accessed.
When playing in VLC only stereo and Dolby Digital are available. Setting VLC's Audio Device to encoded, the input switches to Dolby Digital automatically.

My guess is that the Creatvive Inspire just can't handle the stream it's given.

elrod
2008-03-04, 20:54
maybe we should start a list of receivers that work wonders and the ones that just don't work.

spiderlane
2008-03-04, 20:59
In case it's of any interest to anyone, my Denon AVR-2805 works perfectly with AC3 audio.

fatez
2008-03-04, 21:04
maybe we should start a list of receivers that work wonders and the ones that just don't work.

elrod.. i do not want to buy an other receivers.
Mine works fine with VLC.

I thinks it's only a software problem.

elrod
2008-03-04, 21:22
elrod.. i do not want to buy an other receivers.
Mine works fine with VLC.

I thinks it's only a software problem.

Me neither, but it might help others later on when they are going to buy one.
In the meantime lets just hope it gets fixed in the future..

iordonez
2008-03-04, 22:26
Me neither, but it might help others later on when they are going to buy one.
In the meantime lets just hope it gets fixed in the future..

Yeah it is an issue that can be fixed, how easy that is and how important it is would be up to the developers. Like Elan said there will probably be a rewrite of the AC3 passthrough code at some point.

My Denon AVR-587 picked up the Dolby Digital Signal right up and does the same with DTS.

In the mean time open up a bug ticket, put in your receiver information and make sure to leave an E-mail address. At least you will know that a ticket has been opened and it is on the radar.

fatez
2008-03-04, 22:37
Sorry... but i don't know how can i open a new tiket.
I hope that elan can read this post and recode/fix the ac3 passthrough


and now it's time to movie mode on!

elrod
2008-03-05, 20:00
The blog has some good news!!

fatez
2008-03-05, 22:35
Sorry but i don't understand ... this problem can be solved or must i buy a new decoder?

elan
2008-03-05, 23:30
Sorry but i don't understand ... this problem can be solved or must i buy a new decoder?

You'll be able to use XBMC in Analog mode, until the new audio code gets written.

-elan

fatez
2008-03-05, 23:55
Thanks a lot!

Ur the best!

hook
2008-03-19, 00:39
Up

XBMC Release 0.1.7, nothing fix for AC3 passthrough?

For DTS passthrough no problem.

iordonez
2008-03-19, 00:52
There is nothing in the release notes relating to either AC3 or DTS passthrough changes.

fatez
2008-03-19, 01:51
:(

Ezrem
2008-03-20, 02:41
For the record, I too am having the same issue with DTS passthrough with my Core 2 Duo 2.0 Mini.

I do at least get a lot better audio quality in analog mode vs the old 1/8" Mini-to-RCA cable I used before, but digital gives me a signal error on my receiver.

I'm using a Sony STR-DA2100ES. I have been throwing the idea of picking up an HDMI-switching model around in my head for a while now, but I would really rather avoid it if possible.

As with the others, VLC AC3 passthrough works fine for me.

fatez
2008-03-21, 18:41
up


:°(

elan
2008-03-21, 21:52
The issue is known, the solution is known, the only problem is prioritizing all the work. Right now Python and VFS are higher priority. If anyone else wants to take a stab at it, contact me (serious inquiries only, please) and I'll point you in the right direction.

-elan

fatez
2008-04-02, 20:53
The issue is known, the solution is known, the only problem is prioritizing all the work. Right now Python and VFS are higher priority. If anyone else wants to take a stab at it, contact me (serious inquiries only, please) and I'll point you in the right direction.

-elan

Hi elan,

any news for us?


thanks a lot :)

elan
2008-04-02, 21:42
any news for us?

It's on the roadmap now :) Check http://dn-0.com/xbmc-trac/roadmap (the raw audio bug is scheduled for 0.7 at the moment. Enough votes (i.e. registered comments) can move the priority of bugs/features around.

-elan

fatez
2008-05-16, 14:11
priority still remaining in low mode :(

Ezrem
2008-07-31, 17:39
Are there any plans to address this issue by the XBMC team now that PLEX has forked out (and still doesn't work)?