Jump to content

AAC Audio Passthroufh


jmccl069
Go to solution Solved by jmccl069,

Recommended Posts

Guest asrequested

One thing to keep in mind is that mpv will natively decode AAC to PCM. But of course if you're using stereo AAC then all you'll have is stereo, not surround sound. I actually use this for my music videos. I much prefer it to stereo. Feels like I'm sitting right in front of the singer, with the band spread out, as it would be if they were actually in front of you.

Link to comment
Share on other sites

blumamba

For Giggles, check to verify that the pc is set to 2.0.  If it is not, it will not bitstream correctly.  Remove any codec packs and install and configure Shark007 codec packs to win10.

 

http://shark007.net/advanced.html

 

I have a win10 htpc running shark and emby theater and have no issue with any passthrough using hdmi to my denon h6300x.  Just make sure you configure correctly to your needs or desires and you should be good to go unless by some stretch of the imagination that you flubbed the encode?

Link to comment
Share on other sites

Guest asrequested

For Giggles, check to verify that the pc is set to 2.0.  If it is not, it will not bitstream correctly.  Remove any codec packs and install and configure Shark007 codec packs to win10.

 

http://shark007.net/advanced.html

 

I have a win10 htpc running shark and emby theater and have no issue with any passthrough using hdmi to my denon h6300x.  Just make sure you configure correctly to your needs or desires and you should be good to go unless by some stretch of the imagination that you flubbed the encode?

 

Codec packs are redundant. Theater uses mpv, which is built on ffmpeg, not directshow. Bitstreaming isn't compliant to windows audio settings. That only applies when being software decoded. Not all receivers can bitstream AAC, but most can decode it. So if your receiver can't, then mpv or the receiver will just decode it to raw audio (PCM). But if you have 2 channel AAC that you want to play as surround, the audio needs to be transcoded. Which is what I provided, above. 

Link to comment
Share on other sites

blumamba

I dont always use emby, so codec packs are needed.  I was unaware theater had it all built in.  Then as you stated it is one of the two things, the receiver or mpv.

Link to comment
Share on other sites

jmccl069

 

  • In the folder where you made the mpv.conf, make a folder called scripts
  • Copy the auto-profiles.lua to the scripts folder (delete the .txt)
  • 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!

Working 100%!!! Thanks so much for your help... exactly what I was after... AAC is now converted on the fly to AC3 and everything plays in surround sound that should...

Edited by jmccl069
Link to comment
Share on other sites

Guest asrequested

For anyone else wanting to use this profile. Be aware that if you have music videos with AAC audio, it will affect those, too. Every AAC audio will be affected.

Link to comment
Share on other sites

  • 1 month later...
Guest asrequested

A little amendment for this. I just discovered that profile will enable AC3 encoding for ANY non-bitstreamed audio, not just aac. I have found a better profile. This will be codec specific. Try this @@jmccl069

[AAC to AC3]
profile-desc=cond:p["audio-codec-name"]=="aac"
af=lavcac3enc=yes:384:2
  • Like 1
Link to comment
Share on other sites

  • Solution
jmccl069

 

  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!

 

 

 

 

A little amendment for this. I just discovered that profile will enable AC3 encoding for ANY non-bitstreamed audio, not just aac. I have found a better profile. This will be codec specific. Try this @@jmccl069

[AAC to AC3]
profile-desc=cond:p["audio-codec-name"]=="aac"
af=lavcac3enc=yes:384:2

 

Just tried this...

 

Works a treat!!!

 

Thanks again @

Link to comment
Share on other sites

  • 9 months later...

Hi @ will this work where I have W10 server streaming to a Mibox  ATV app, out to a Denon AVR1911?  It seems the Denon is unable to process AAC and I get no sound unless I force stereo in ATV app or PCM on the Mibox.

Link to comment
Share on other sites

  • 10 months later...
AdrianW
On 30/11/2018 at 10:39, Guest asrequested said:

If that's TL;DR, then if you've already made an mpv.conf, just add this line


af=lavcac3enc=yes:384:2

Note: 2 year old post - thanks for the useful info.


I just bought a new receiver and for some reason stereo AAC was causing dialog to come from the left & right speaker. Even though it was being output as PCM just as it was before.

I added that line to my mpv.conf causing AAC to get transcoded to AC3 and dialog now comes from the centre speaker again.

Just need to try some 5.1 AAC to see what happens with that.

Edited by AdrianW
Link to comment
Share on other sites

AdrianW
1 hour ago, sooty234 said:

That will be AC3, too. Any audio that isn't bitstreamed will be AC3.

Yes, I tried it and 5.1 AAC was transcoded to 5.1 AC3.

I ended up adding these lines to the bottom of my mpv.conf:

[extension.mkv]
profile-desc=cond:p["audio-codec-name"]=="aac" or p["audio-codec-name"]=="mp3"
af=lavcac3enc=yes:640:2

[extension.mp4]
profile-desc=cond:p["audio-codec-name"]=="aac" or p["audio-codec-name"]=="mp3"
af=lavcac3enc=yes:640:2

Then only aac or mp3 in .mkv or .mp4 containers will get transcoded to ac3.

Edited by AdrianW
Link to comment
Share on other sites

sooty234

You can probably simplify that by using one auto-profile, changing or for and, then adding another condition for exclusivity. And be aware that the auto-profile script is now built into the player. When Theater updates, it will use that and you'll have to slightly adjust your auto-profile, as it has been updated.

Link to comment
Share on other sites

sooty234

Both of those profiles do exactly the same thing. Using the container in the title is just a name, it has no effect. The conditions are what need to be set.

Link to comment
Share on other sites

AdrianW
5 hours ago, sooty234 said:

Both of those profiles do exactly the same thing. Using the container in the title is just a name, it has no effect. The conditions are what need to be set.

"extension.xxx" is recognised by mpv and causes those profiles to be automatically loaded. Using some other text and the profile is just ignored. See: Auto profiles

I tried to find that auto-profiles.lua script online and couldn't find it anywhere, so resorted to this method instead.

Link to comment
Share on other sites

sooty234
10 minutes ago, AdrianW said:

"extension.xxx" is recognised by mpv and causes those profiles to be automatically loaded. Using some other text and the profile is just ignored. See: Auto profiles

I tried to find that auto-profiles.lua script online and couldn't find it anywhere, so resorted to this method instead.

Ah yes, the auto auto-profiles. I'd forgotten about that. You won't need the script in the next Theater release. You can test the next release. It's in the testing area. 

  • Thanks 1
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
×
×
  • Create New...