Jump to content

AAC Audio Passthroufh


jmccl069
 Share

Go to solution Solved by jmccl069,

Recommended Posts

Would it be possible to implement AAC audio pass through in Emby Theater or Emby in general?

 

My receiver supports multi channel AAC but any file with AAC audio is only detected as stereo through Emby Theater.

 

When I play the file directly from a USB through my receiver it is properly decoded and plays in full surround sound.

 

I have many AAC encoded files with multi channel sound that I would like to play properly through Emby without having to change the audio.

Link to comment
Share on other sites

Guest asrequested

is there even such a thing as aac passthrough? i thought it will always show pcm on the receiver.

Well, it's kind of semantic. The receiver will decode everything to PCM, whether you bitstream or not. Not all receivers support AAC. So mostly it needs decoding before transport.

 

But yes, mpv can bitstream AAC.

 

I think in this case, windows may not be configured correctly. So when it gets decoded, it's getting reduced to stereo. In my case, I make mpv encode it to AC3. Then it gets bitstreamed as AC3.

 

If he's using the store app, then it's almost certain that windows isn't configured, correctly.

Edited by Doofus
Link to comment
Share on other sites

Guest asrequested

And heads up, Luke. If someone has a 5.1 AAC audio track, and is using optical. It won't work. Optical won't support that bandwidth. If they want to keep the 5.1, they'll need the AC3 encoder.

Edited by Doofus
Link to comment
Share on other sites

Where did you get the app from?

 

It's the Windows X64 version. Downloaded from the website, not Windows Store.

 

Also, make sure that windows audio is configured in accordance with your speaker arrangement

 

No matter what I configure my windows audio to (2ch, 5.1ch or 7.1ch), the audio is passed through as whatever my windows setting is. When I play the file from a USB plugged directly into the receiver (Sony STR-DA5800ES) it decodes the audio correctly (see attached picture).

 

5bad84f240158_MultiAAC.jpg

 

One other question, though. Are you using HDMI or optical?

 

HDMI to the receiver. I have a 7.1 speaker setup.

 

Thanks for your help.

Link to comment
Share on other sites

Guest asrequested

Ok, so there're two ways you can go. I can show you how to bitstream AAC, or I can show you how to have it converted to AC3, and be bitstreamed that way. 

 

Here's the difference. If you bitstream AAC, that means all AAC will be bitstreamed. 2 channel AAC, too. If you choose AC3 encoding, it can be configured to only encode a set number of channels. For instance. It can be configured to only encode audio streams with 3 or more channels, and not encode stereo. The AC3 encoding can be applied globally, meaning all non-bitstreamed audio (not just AAC) with that many channels will be encoded. It can also be applied as a profile, and be specific to the codecs that you choose.

 

I may be over-explaining this :)

Link to comment
Share on other sites

Guest asrequested

OK, so you need to make an mpv.conf. Follow this guide. Then add this as the first line

audio-spdif=aac

That should give you what you want.

Edited by Doofus
Link to comment
Share on other sites

OK, so you need to make an mpv.conf. Follow this guide. Then add this as the first line

audio-spdif=aac

That should give you what you want.

 

No joy I'm afraid. It bitstreams DTS/ACS/etc but AAC still comes out as 2 channel.

Link to comment
Share on other sites

Guest asrequested

No joy I'm afraid. It bitstreams DTS/ACS/etc but AAC still comes out as 2 channel.

 

That's weird. Hopefully you made the logging entry. Can you attach the log?

Link to comment
Share on other sites

Guest asrequested

You appear to be playing an mp3

[   0.135][v][lavf] Found 'mp3' at score=1 size=2048.
[   0.135][v][lavf] Found 'mp3' at score=25 size=4096.
[   0.136][d][cache] request seek: 0 <= to=962013 (cur=4096) <= 962141  
[   0.136][d][cache] request seek: 0 <= to=0 (cur=962141) <= 962141  
[   0.137][d][ffmpeg/demuxer] mp3: Skipping 0 bytes of junk at 835.
[   0.151][d][ffmpeg/demuxer] mp3: max_analyze_duration 500000 reached at 522449 microseconds st:0
[   0.152][v][lavf] avformat_find_stream_info() finished after 32768 bytes.
[   0.152][v][demux] Detected file format: mp3 (libavformat)
[   0.152][v][cache] blocking for STREAM_CTRL 6
[   0.152][v][cplayer] Opening done: http://192.168.1.2:8096/emby/Audio/52abde37fe3952fdca35f9e501e4ffc5/universal?UserId=65e68cadb09346b881a8bcf44d10c0c1&DeviceId=Vanessa&MaxStreamingBitrate=140000000&TranscodingContainer=ts&TranscodingProtocol=hls&AudioCodec=aac&api_key=d35fed199a9849e7bdb976f76d29c292&PlaySessionId=1538104256552&StartTimeTicks=0&EnableRedirection=true&EnableRemoteMedia=true
[   0.153][v][cplayer] Running hook: ytdl_hook/on_preloaded
[   0.153][v][lavf] select track 0
[   0.153][i][cplayer]  (+) Audio --aid=1 (mp3 2ch 44100Hz)
[   0.160][v][ad] Codec list:
[   0.160][v][ad]     mp3float (mp3) - MP3 (MPEG audio layer 3)
[   0.160][v][ad]     mp3 - MP3 (MPEG audio layer 3)
[   0.160][v][ad] Opening decoder mp3float
[   0.165][v][ad] Requesting 1 threads for decoding.
[   0.165][v][ad] Selected codec: mp3float (MP3 (MPEG audio layer 3))
[   0.165][v][af] User filter list:
[   0.165][v][af]   (empty)
[   0.165][v][cplayer] Starting playback...
[   0.166][v][af] [in] 44100Hz stereo 2ch floatp
[   0.166][v][af] [userspeed] 44100Hz stereo 2ch floatp
[   0.166][v][af] [userspeed] (disabled)
[   0.166][v][af] [convert] 44100Hz stereo 2ch floatp
[   0.166][v][ao] Trying audio driver 'wasapi'
[   0.166][v][ao/wasapi] requested format: 44100 Hz, stereo channels, floatp
Link to comment
Share on other sites

It’s definitely AAC 5.1 so there’s something going on in the background... I’ll have to have a bit more of a poke around under the hood...

 

Thanks

Link to comment
Share on other sites

Guest asrequested

The videos that I have with 5.1 AAC, work just fine. When you play, is it direct playing? And just to confirm, you have an HDMI from the PC to the receiver, and you're not using ARC?

Link to comment
Share on other sites

Doofus,

 

Thanks for your help.... It is very much appreciated....

 

It might take me a couple of days to look into it... back to work... school holidays and stuff...

Link to comment
Share on other sites

  • 1 month later...
JoshuaAJones

OK.  See if this makes sense to anyone.  I'm pretty sure that it is an ET bug but...

Currently loaded with 3.5.3.0 and 3.0.3 and my main HTPC runs both on W10 connected to my AVR through HDMI

 

I was having problems playing back videos with AAC audio... it would play all of the surround through L&R but no center, rear, or sides (although you could hear a little voice, if it echoed in the room they were in).

I first noticed it the other night while trying to watch TWD... audio out.  Played directly with MPC-HD... fine.

Checked settings on Windows and 7.1 with the rest of the audio properties looked fine.  Played the little tones with no problems.

Checked all my settings in ET/Audio and I have passthrough activated on all and have it setup for 7.1, as well.

Played Big Bang Theory (which has AC3 audio) and the AVR clicked over into Dolby Digital and played perfectly.

As I'm troubleshooting back and forth, going into and out of settings, back to home page, etc., I get a little tired of listening to the theme songs play over and over and go into Settings/Display and disable them.

Now, the problem has corrected itself.  Everything plays perfectly.  No problems at all.

Thinking the problem fixed itself, I reactivate theme music... L/R only again.  I toggle back and forth and, for some reason, Theme Music is jacking up AAC playback.

I try playback through my laptop (with theme music activated)… plays fine.

I go through my settings, activate all the passthroughs, and change the Audio profile to 7.1 (it was set to AUTO as, even though my laptop obviously only has 2 speakers, I sometimes plug in the surround sound headphones)… L/R only.

Go to 5.1... bad.  Stereo or Auto... good on the laptop.  On the HTPC, everything gets processed through the AVR so most streams get fully expanded no matter what speaker configuration I choose.

 

So, here's where I'm at with my testing.

I used the following files to test:  TWD (AAC 5.1) and GotG2 (AAC 7.1)  [NOTE: GotG2 did not have a theme song so I copied TWD theme into it's folder]

Theme/Auto - TWD (5.1) / GotG2 (7.1)

Theme/Stereo- TWD (5.1) / GotG2 (7.1)

Theme/5.1- TWD (L/R) / GotG2 (L/R)

Theme/7.1- TWD (L/R) / GotG2 (L/R)

No Theme/Auto- TWD (5.1) / GotG2 (7.1)

No Theme/Stereo- TWD (5.1) / GotG2 (7.1)

No Theme/5.1- TWD (5.1) / GotG2 (7.1)

No Theme/7.1- TWD (5.1) / GotG2 (7.1)

 

My conclusions are:

Theme music is, for some reason, bugging my AAC playback, if set up to output in 5.1 or 7.1 BUT ONLY if the folder contains a theme song (before adding the theme to GotG2 folder, everything played perfectly).

Disabling Theme Music or going with Auto (or Stereo) corrects (bypasses) the problem... as does deleting the theme music completely.  If it doesn't play, there is no problem.

Somewhere between playing the MP3 and playing the AAC, a problem occurs.

Also of note... this just started happening.

 

Thoughts?

Link to comment
Share on other sites

Guest asrequested

Have you configured windows audio for 7.1? If not, mpv will downmix to whatever windows audio is configured. AAC isn't bitstreamed, there is no setting for that in the UI. So mpv will just decode it to raw audio (PCM) and at that point, it will apply it to the windows audio config. If you don't want to do that, you can use the ac3enc mpv config, to encode to AC3 and then it will be bitstreamed as AC3.

Link to comment
Share on other sites

JoshuaAJones

Windows is configured correctly.

The problem only recently started and, in my opinion, it has to be the latest version of ET.

As for now, I've disabled theme music and everything is working fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...