Dharma - change AC3 encoder bitrate settings?
#1
Hi all,

Long time XBMC user. I really appreciate the work you've all done over the years.

The new AC3 encoder is great, but I've got an old/crappy receiver that can't handle 640k bitrates. Is there a way to configure the ac3 encoder to output @ 448k instead?

If there isn't, I'm up for trying to modify the src and rolling my own build. Where in the src tree would I find the encoder code?

Thanks!
~Al
Reply
#2
Alcides Wrote:Hi all,

Long time XBMC user. I really appreciate the work you've all done over the years.

The new AC3 encoder is great, but I've got an old/crappy receiver that can't handle 640k bitrates. Is there a way to configure the ac3 encoder to output @ 448k instead?

If there isn't, I'm up for trying to modify the src and rolling my own build. Where in the src tree would I find the encoder code?

Thanks!
~Al

svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk

or

git clone git://xbmc.git.sourceforge.net/gitroot/xbmc/xbmc
Reply
#3
Alcides,

I had a quick chat with other devs and we would take a patch that adds a new advanced setting to define the max AC3 bitrate accepted by a receiver.

It would do the following:
- add a new advanced setting - default value 640k, can be set to 448k in your case
- change the bitrate used in the AC3 encoder (DVDAudioEncoderFFmpeg.cpp)
- check the bitrate and deny passthrough if the max AC3 bitrate is exceeded. That should automatically trigger transcoding to AC3 at the max AC3 bitrate (DVDAudioCodecPassthroughFFmpeg.cpp)

Are you up for it?
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
Tell you what. Let me checkout the tree and see if I can get trunk to build for Windows. (The change makes sense on all distros, but since I use XBMC on Windows, I want to make sure things are working there. I checked the faq and I've got the Windows build prereqs covered.)

If all that goes well, I'll come back and we can discuss my submitting a patch!
Reply
#5
Of course, no pressure Smile Your request made sense and it would benefit others, so if you wanted to take things further, we'd be glad to incorporate a patch.

Try the dev forum if you have trouble building.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
CrystalP,

I got side-tracked for a few days, but I've got the build going and can see what in the code needs to change to set the bitrate (no surprise there - you told me exactly where to look! Smile )

Now you said to take it a step further and "add a new advanced setting". Where can I find an example of how to handle an advanced setting? Are we talking about a cfg file somewhere that gets parsed, or actually exposing something up at the UI?
Reply
#7
The advanced settings live in... wait for it... AdvancedSettings.cpp/.h Smile
and they correspond to values in a user-created advancedsettings.xml file. That's where the workarounds and the uncommon settings end up.

Basically you add a member to AdvancedSetting.h, initialize it and have it read from the xml file with AdvancedSettings.cpp. I think we already have an audio section, which would be appropriate here. So find the spot in the existing code for that.

edit: wrong caps on advancedsettings.xml
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
I am having the exact same problem but i am not following any of the responses. Is it possible to set the max bit rate?
Reply
#9
I have this problem...it's a pain trying to convert ac3 bitrate without sync problems.

Did this ever make it into 10.1?
Reply
#10
is ac3 encoding option available on atv 2g? it is not clear if the software encoding is or isnt available on latest stable...
Reply
#11
Is this patch available? I need to do the same thing to make my old Sony receiver process the AC3.
Reply

Logout Mark Read Team Forum Stats Members Help
Dharma - change AC3 encoder bitrate settings?0