Dolby Digital with AAC and AC3

So I set up Plex Connect and I discovered that I can get 5.1 DD sound if the Audio is AC3 DD 5.1, but if it is AAC DD 5.1.....the Apple TV outputs to Stereo. 

 

The problem is, I encoded most of my movies with AAC 5.1 to keep them from having to transcode with iOS and ChromeCast. I guess I can go back and add the AC3 track, but is there any way to get one of these audio formats to work with both ATV3 and iOS/Chromecast without transcoding?

If on Mac, check out MP4Tools.  It can create iOS native files that include both stereo AAC and multichannel AC3.  From a little of my research, AAC 5.1 is not really a thing.  iTunes purchases with multichannel audio have two audio tracks: one in AC3 format for multichannel and the other in AAC for stereo.

That is actually exactly what I used to go back and add a 5.1 AC3 track to the files. That was relatively painless because I was able to just do a video passthrough and not reencode everything. Handbrake definitely has an AAC 5.1 setting and I use this for my iOS and chromecast playback, because they both transcode if I use AC3 tracks.

The funny thing is, Apple TV will play the AAC 5.1 track in surround sound over airplay, just not through PlexConnect. I also discovered a DVD rip I made with the Apple TV 3 setting in Hnadbrake has an AAC 5.1 track that does play in surround sound on Plexconnect. Maybe it has to do with the bit rates.

The funny thing is, Apple TV will play the AAC 5.1 track in surround sound over airplay, just not through PlexConnect.

This might just need some tweaks in the PMS based aTV profile? Maybe some additional changes to PlexConnect.

If aTV is able to replay, PlexConnect should not be the reason to drop it...

The funny thing is, Apple TV will play the AAC 5.1 track in surround sound over airplay, just not through PlexConnect.

This might just need some tweaks in the PMS based aTV profile? Maybe some additional changes to PlexConnect.

If aTV is able to replay, PlexConnect should not be the reason to drop it...

Changes in my instance of PlexConnect or in the coding of PlexConnect itself?

...the code itself.

XMLConverter.py, around line 1125 checks for the "supported" media files.

Could you please check, what PMS thinks about the movies "audiocodec"?

With loglevel=High you should find the PMS media info in PlexConnect.log, once you entered the PrePlay-screen...

The Apple TV profile in PMS has an upper channel limit set to 2 when AAC is the audio format when associated with a video.

   
     
       
     
 
You could try raising that value and restarting PMS.  I had luck modifying the profile for an entirely different problem, wherein the upper limit for ref. frames was set too low for ATV3 devices, resulting in a full transcode.  Simply raising the default from 5 to 14, for instance, allowed for transcode-free streams with nothing to change in PlexConnect.

The Apple TV profile in PMS has an upper channel limit set to 2 when AAC is the audio format when associated with a video.

   
     
       
     
 
You could try raising that value and restarting PMS.  I had luck modifying the profile for an entirely different problem, wherein the upper limit for ref. frames was set too low for ATV3 devices, resulting in a full transcode.  Simply raising the default from 5 to 14, for instance, allowed for transcode-free streams with nothing to change in PlexConnect.

What file was that in? That sounds like it may work

What file was that in? That sounds like it may work

C:\Program Files (x86)\Plex\Plex Media Server\Resources\Profiles\iOS-AppleTV.xml

On Windows at least.  

Don't forget the .1 channel, so enter a 6 (not 5).

Wow, I think that worked. I changed it from 2 to 6. I need to test with a file with only AAC 5.1 and make sure, but when i switch to the AAC 5.1 audio track it plays in surround sound. That's awesome!

Wow, I think that worked. I changed it from 2 to 6. I need to test with a file with only AAC 5.1 and make sure, but when i switch to the AAC 5.1 audio track it plays in surround sound. That's awesome!

Nope. I created a copy of the file and used subler to delete the AC3 track. It recognizes that track is AAC 5.1 through PlexConect, but it plays in stereo. I am thinking it is a PlexConnect setting now. 

I'm a little confused what actually plays aac multichannel.  Are you expecting that the ATV will decode the AAC 5.1 to PCM streams to send to the receiver as multichannel audio via HDMI? As far as I know, no receivers can actually decode AAC multichannel. 

Prior to this, I had all my BluRay rips with AAC 5.1 as the only audio track. When playing over AirPlay or Chromecast, these always triggered my reciever (Pioneer VSX-1122) to switch to PCM or Dolby Digital Surround Sound. 

This also played without transcoding on my iOS and web players.

Whenever I play and AC3 track, my Chromecast and iOS devices trigger transcoding. That is why I had the AAC format to begin with.

Yeah, I've seen other reports that the ATV is just more flexible with formats when using Airplay.  It's interesting though that the receiver would indicate a DD stream when encountering multichannel AAC.  I wonder if it actually decodes the AAC or sees the decoded PCM streams as a DD stream.

So do you know what the recommended 5.1 format would be for Chromecast? I have read (I think) that it does not decode AC3 5.1 natively.

I'm pretty sure only only DD pre-decoded (PCM streams) or AAC.  For whatever reason though, Netflix films can trigger the DD light on the receiver.  So, I'm not sure if this is an AAC stream or DD PCM stream.  For this reason, I don't use Plex and Chromecast, because of its limitation with DD.

Nope. I created a copy of the file and used subler to delete the AC3 track. It recognizes that track is AAC 5.1 through PlexConect, but it plays in stereo. I am thinking it is a PlexConnect setting now. 

Are you using HDMI or the toslink for the audio? Some time ago I've read some blog with someone mentioning that when playing 5.1 AAC via HDMI the output is 2 channel stereo, but when connected using the toslink the receiver gets a 5.1 stream. 

I am using HDMI only. 

Anyone know what XML Profile PlexConnect actually uses? When I look at the Apple TV one in the Plex Media Server, it states it is for Apple TV 2nd Gen. 

As far as I know, between aTV2 and 3 there is no difference in profile.