Jump to content


Photo

AAC Audio Passthroufh


Best Answer Doofus , 30 November 2018 - 01:39 AM

  1. In the folder where you made the mpv.conf, make a folder called scripts
  2. Copy the auto-profiles.lua to the scripts folder (delete the .txt)
  3. Copy this profile to your mpv.conf, make it the last entry at the bottom
[AAC to AC3]
profile-desc=cond:p["audio-codec"]==aac
af=lavcac3enc=yes:384:2

Take it for a spin!

Go to the full post


  • Please log in to reply
55 replies to this topic

#1 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 27 September 2018 - 05:33 AM

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.

#2 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 01:23 PM

Where did you get the app from?

#3 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 01:35 PM

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

#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 113963 posts
  • Local time: 01:45 PM

Posted 27 September 2018 - 01:36 PM

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



#5 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 01:52 PM

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, 27 September 2018 - 01:52 PM.


#6 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 02:18 PM

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

#7 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 02:35 PM

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, 27 September 2018 - 03:14 PM.


#8 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 27 September 2018 - 09:35 PM

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.



#9 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 10:12 PM

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 :)



#10 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 10:19 PM

My suggestion would to use AC3 encoding



#11 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 27 September 2018 - 10:21 PM

I would be happy with AAC bitstreaming. It doesn't really matter that 2 ch will be bitstreamed as well.

 

thanks



#12 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 10:24 PM

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, 27 September 2018 - 10:25 PM.


#13 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 27 September 2018 - 10:50 PM

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.



#14 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 10:52 PM

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?



#15 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 10:53 PM

Mine decodes to 5.1 PCM



#16 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 27 September 2018 - 11:24 PM

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

 
Log attached...

 

Attached File  EmbyTheaterMPVLog.txt   50.78KB   1 downloads



#17 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 27 September 2018 - 11:30 PM

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


#18 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 28 September 2018 - 12:43 AM

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

#19 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 10121 posts
  • Local time: 10:45 AM

Posted 28 September 2018 - 01:07 AM

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?



#20 jmccl069 OFFLINE  

jmccl069

    Member

  • Members
  • 20 posts
  • Local time: 07:45 PM

Posted 28 September 2018 - 08:57 AM

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...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users