AC3 films - Static Noise on ATV2
#16
Don't expect a fix - the amps of the devs are working of course Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#17
Hrm. I know it's not just me. Would be happy to help in any way I can... Devs got the code open, might as well try, right?

Oh, and I have two of the Meridians, so I know it's not a one-off problem.
Reply
#18
Code for the iOS part of the new AudioEngine is here:

https://github.com/xbmc/xbmc/tree/master.../CoreAudio

especially here

https://github.com/xbmc/xbmc/blob/master...HALIOS.cpp

I totally think there is a issue with some amps - but how to solve if its not reproducable? Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#19
Ok, I guess I'm getting my hands dirty. I haven't compiled/run shit in ages, so I might need some help in that regard (provided I can even get to the point of suggesting changes.). Hurray open source (now I wish I'd paid more attention in CS Wink)
Reply
#20
So who is familiar with the AC3 header spec, the code above that Memphiz linked (the 2nd link) and can let me bounce ideas off them without clogging this thread?
Reply
#21
Don't everyone jump at once!

Ok, after more digging here's where I am.

The Meridian will show me what format it thinks is coming thru. When playing an AC3 film via xbmc it shows AC 3/2.1 which is correct, however, (and here's where I'm guessing) there must be some flag that isn't set in either the first frame, or all frames coming down the wire. I'd love to be able to do ac3 frame captures to see for myself. I guess in the meantime I'll turn debugging on.

I know that the flags for AC3 are present in every frame that goes out the back, but is it possible that either byte order or signed vs unsigned is playing a role here?

The Meridian has a few operating modes. DTS, DD, PCM. I believe it needs to see a flag set in order to move itself from PCM to DD or DTS (there's an audible relay click when this occurs). So while it can recognize that the inbound bitstream is AC3, for whatever reason it's not kicking to the right mode. I'm going to go search my DVD library for a DTS encoded soundtrack to rip and see if I'm having the same problems. Will report back.
Reply
#22
Ok, update:

I decided to stick with only testing mkv files as created by makemkv.

I took Clear and Present Danger as my source since it was the first in my collection I found with DD and DTS. I ripped both streams into mkv and here are the results:

ATV (living room) connected to Marantz SR7200: DD: Detected DD and played fine. DTS: Detected DTS and played fine
ATV (Theater room) connected to Meridian 561: DD: Detected DD but plays only static. DTS: Detected DTS and played fine.

In the theater, when I switch from DTS to DD while the film is playing, there is no reaction from the Meridian. In other words, the DTS light stays on, it just goes silent. This again leads me to believe that just as before when playing back an AC3 stream there is some flag that the processor is not getting and hence not switching to DD decode. Next step, debug log.
Reply
#23
you are not alone - i'm following your posts Smile
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#24
Ok, I've logged it all. No surprises. Both logs look similar. Here's a patebin to both:

Living-room: http://pastebin.com/6fJqyPjL
Theater-room: http://pastebin.com/qKMjYkqc

As you can see, xbmc correctly identifies the two audio streams and calls them out by name at open time.

Here's the DTS initialization:

T:117645312 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback 15:34:49 T:130162688 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(67968000.000000, 0) 15:34:49 T:130162688 NOTICE: Creating audio device with codec id: 86019, channels: 2, sample rate: 48000, pass-through 15:34:49 T:130162688 INFO: AudioRendererFactory: not a explicit device, trying to autodetect. 15:34:49 T:130162688 DEBUG: RemoveActiveDevice - Removing device 2 15:34:49 T:130162688 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 4 15:34:49 T:130162688 DEBUG: RemoveActiveDevice - Removing device 0
15:34:49 T:130162688 DEBUG: CIOSCoreAudioDevice::SetupInfo: Remote/IO Output Stream Bus 1 Format [lpcm] Mixable 2 Channel 16-bit Signed Integer (48000Hz)
15:34:49 T:130162688 DEBUG: CIOSCoreAudioDevice::SetupInfo: Remote/IO Input Stream Bus 1 Format [lpcm] Mixable 2 Channel 16-bit Signed Integer (48000Hz)
15:34:49 T:117645312 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:34:49 T:130162688 DEBUG: CIOSAudioRenderer::Initialize: Renderer Configuration - Chunk Len: 2048, Max Cache: 196608 (1024ms).
15:34:49 T:130162688 INFO: CIOSAudioRenderer::Initialize: Successfully configured audio output.
15:34:49 T:130162688 DEBUG: CIOSAudioRenderer::Initialize - Channels: 2 - SampleRate: 48000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough 1 - audioDevice: Default Output Device
15:34:49 T:130162688 DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
15:34:49 T:108249088 DEBUG: CDVDPlayer::HandleMessages - player started 1
15:34:49 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:2 dts:67985000.000000 to get to start point at 68018000.000000

Here's what switching to DD looks like:

15:35:17 T:108249088 NOTICE: Opening audio stream: 2 source: 256
15:35:17 T:108249088 NOTICE: Finding audio codec for: 86020
15:35:17 T:108249088 DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Opening
15:35:17 T:108249088 INFO: CDVDAudioCodecPassthroughFFmpeg::SetupMuxer - Trying to setup spdif muxer
15:35:17 T:108249088 INFO: CDVDAudioCodecPassthroughFFmpeg::SetupMuxer - spdif muxer ready
15:35:17 T:108249088 DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Opened
15:35:17 T:108249088 NOTICE: Creating audio thread
15:35:17 T:108249088 DEBUG: CDVDPlayer::SetCaching - caching state 2
15:35:17 T:108249088 DEBUG: demuxer seek to: 95425
15:35:17 T:108249088 DEBUG: SeekTime - seek ended up on time 95295
15:35:17 T:108249088 DEBUG: demuxer seek to: 95425, success
15:35:17 T:142925824 DEBUG: Thread CDVDPlayerAudio start, auto delete: 0
15:35:17 T:142925824 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
15:35:17 T:117645312 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
15:35:17 T:142925824 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:2 dts:95295000.000000 to get to start point at 95425000.000000
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:2 dts:95212000.000000 to get to start point at 95425000.000000
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:1 dts:95232000.000000 to get to start point at 95425000.000000
15:35:17 T:117645312 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
15:35:17 T:117645312 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:1 dts:95242000.000000 to get to start point at 95425000.000000
.
.
.
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:1 dts:95408000.000000 to get to start point at 95425000.000000
15:35:17 T:117645312 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
15:35:17 T:117645312 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(95429000.000000, 1)
15:35:17 T:108249088 DEBUG: CDVDPlayer::HandleMessages - player started 2
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:2 dts:95345000.000000 to get to start point at 95429000.000000
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:2 dts:95379000.000000 to get to start point at 95429000.000000
15:35:17 T:108249088 DEBUG: CheckPlayerInit - dropping packet type:1 dts:95424000.000000 to get to start point at 95425000.000000
15:35:17 T:142925824 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(95434000.000000, 0)
15:35:17 T:142925824 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
15:35:17 T:142925824 INFO: AudioRendererFactory: not a explicit device, trying to autodetect.
15:35:17 T:142925824 DEBUG: SetActiveDevice - SetActiveDevice from 4 to 2
15:35:17 T:142925824 DEBUG: RemoveActiveDevice - Removing device 4
15:35:17 T:142925824 DEBUG: RemoveActiveDevice - Removing device 2
15:35:17 T:142925824 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 4
15:35:17 T:142925824 DEBUG: RemoveActiveDevice - Removing device 0
15:35:17 T:142925824 DEBUG: CIOSCoreAudioDevice::SetupInfo: Remote/IO Output Stream Bus 1 Format [lpcm] Mixable 2 Channel 16-bit Signed Integer (48000Hz)
15:35:17 T:142925824 DEBUG: CIOSCoreAudioDevice::SetupInfo: Remote/IO Input Stream Bus 1 Format [lpcm] Mixable 2 Channel 16-bit Signed Integer (48000Hz)
15:35:17 T:142925824 DEBUG: CIOSAudioRenderer::Initialize: Renderer Configuration - Chunk Len: 2048, Max Cache: 196608 (1024ms).
15:35:17 T:142925824 INFO: CIOSAudioRenderer::Initialize: Successfully configured audio output.
15:35:17 T:142925824 DEBUG: CIOSAudioRenderer::Initialize - Channels: 2 - SampleRate: 48000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough 3 - audioDevice: Default Output Device
15:35:17 T:142925824 DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
15:35:17 T:108249088 DEBUG: CDVDPlayer::HandleMessages - player started 1
15:35:17 T:108249088 DEBUG: CDVDPlayer::SetCaching - caching state 0
15:35:17 T:117645312 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:35:17 T:142925824 DEBUG: CDVDPlayerAudio:: Discontinuity - was:95444181.750000, should be:95434000.000000, error:-10181.750000
15:35:17 T:142925824 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
15:35:18 T:117645312 WARNING: Previous line repeats 1 times.
15:35:18 T:117645312 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:35:18 T:142925824 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available


What is the difference between IsPassthrough 1 and IsPassthrough 3?

Since both ATV's are doing the same thing, and since one processor works and one doesn't, I can only conclude that the ac3 stream is malformed in some way coming from xbmc and that the Marantz "figures it out and does the right thing" while the Meridian doesn't.
Reply
#25
I had the same problem too, but lived with it. Maybe now the devs can fix it? Wink I'll try to do a debug-log over the weekend. But how to do this with the plex-client on ATV2 (not in XBMC)?
(2012-01-02, 15:00)Solo0815 Wrote: After some testing i found out that my ATV2 is playing AC3 from Plex-MediaServer AND my Reciever is switching to AC3. So no HW-fault.

After that i loaded XBMC (same ATV2 Settings) and played the same file over SMB. Now the Reciever is switching to AC3, too (for the first time in ATV2XBMC), but no sound and stuttering movie. The same file plays smooth with ananog-sound output.
And yes, i tried "16-bit" AND DolbyDigital "On" and "Auto" in Lowtide.
If I should provide a debug log, pls let me know.

Maybe the XBMC-Devs can ask the Plex-Guys how they put out "correct" AC3? Rolleyes
---
(2011-11-06, 18:58)Solo0815 Wrote:
qwerter18 Wrote:Hi,
In ATV2-Menu I put

DolbyDigital .... ON
Audio Output ... 16 Bit
HDMI Output ... Auto (only option I have)

In XBMC -> System -> Options -> System -> Audio-Hardware:

Audio Output ....... Optical/Koaxial
Speaker .............. 5.1
Volume Downmix ... NO
-Reciever Capable AC3 .... YES
-Reciever Capable DTS .... YES
Audio Output Device ... Default (only option)
I have exact the same settings, but can't get my reciever to switch to 5.1DD. Tried several times and movies. All i hear is a crackling sound over HDMI from my TV. DD-Reciever is still 2.0PCM. Sad
Optical Cable and DD5.1 from old XBMC (Xbox1) is working fine.
Thx
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#26
We can't fix it based on logfiles output since the boo boo happens in the receiver.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#27
@avoops

Your logs seem to come from Eden. Could you try with Latest nightlies if the issue is still there with the new AudioEngine?

Beside that most of you seem to have a wrong imagination of how things are working. XBMC is not injecting any flags or header packets or so.

It works as follows for passthrough:
1. Set the output interface to 2 channel 48000Hz with 2Bytes per Sample.
2. Push the raw AC3 or DTS data into the audio device as requested from iOS (so iOS tells us it wants 30 samples and we give em the next 30 samples).

There are no bits involved here. We don't know what apple does for making it work - but imo all this real handshaking/passthrough stuff is either part of iOS itself or these mentioned flags have to be in the raw data stream which we don't touch. I'm not really into it though.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#28
(2012-07-20, 11:02)Memphiz Wrote: We can't fix it based on logfiles output since the boo boo happens in the receiver.
So you don't need my logfile anymore?
Just tested a PVR-Build from here: the same Problem.

Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#29
Yes you got me right.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#30
You (or anyone else) won't fix it? I mean: Plex puts out "correct" AC3 (for my reciever) Wink, why not XBMC?

I just tested the Plex-Client for the ATV2: AC3 is fine, but I cant get logging to work Sad BTW: Direct Streaming (no transcoding) is enabled in the Plex-Client. What's the difference between "DirectOutput" in XBMC and in Plex?
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply

Logout Mark Read Team Forum Stats Members Help
AC3 films - Static Noise on ATV23