Kodi Community Forum

Full Version: Shared MySQL library but different default audio offsets per device?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been trying to google up an answer to this for a little while now and while I'm sure it must be a fairly common requirement, my google fu & search fu are failing me and I'm just not finding what I'm looking for..

I have a setup with two Kodi devices, one in the livingroom and one in the bedroom which share a MySQL hosted library;

Livingroom: Asus EB1502P w/ Kodibuntu, Sharp Aquos LCD, Arcam AV9 & P7, audio via SP/DIV, video via HDMI
Bedroom: Asus EB1502P w/ Kodibuntu, LG Plasma, video & audio via HDMI


The problem is that the setup downstairs needs a consistent 250ms audio offset for the audio & video to be in sync (down to the different audio & video paths, I expect) while upstairs needs a consistent 0ms audio offset (presumably because the audio & video path is pure HDMI)


The audio offset is stored in the database and of course downstairs I've previously set a 250ms delay and then "Set as default" that, if upstairs I "set as default" 0ms then downstairs will be wrong..


A little googling suggested adding this to advancedsettings.xml:
Code:
<advancedsettings>
    <defaultvideosettings>
        <audiodelay>0</audiodelay>
    </defaultvideosettings>
</advancedsettings>

But that doesn't seem to override the 250ms from downstairs, I presume because I've "set as default" that amount..


So is there a dance I can do that will get me 250ms by default downstairs and 0ms by default upstairs?
why don't you remove the delay, from the database, and set the living room tv as
Code:
<advancedsettings>
    <defaultvideosettings>
        <audiodelay>250</audiodelay>
    </defaultvideosettings>
</advancedsettings>
?
Would this be related to the Kodi settings per device, rather than related to the library? So each device would then have its own specific offset settings within its individual advancedsettings.xml file?
Yeah, that's the idea - each device will have it's own settings.

The ones suggested in advancedsettings.xml, however, don't appear to do anything when I test them..

I've checked to make sure there is nothing in the MySQL DB in the 'settings' table (which holds overriden AudioDelay settings), re-set the value of 'audiodelay' in guisettings to '0' and then added the below to 'advancedsettings.xml':
<defaultvideosettings>
<audiodelay>-3.000000</audiodelay>
</defaultvideosettings>

There's no delay on the audio at all. I know the rest of the settings from advancedsettings.xml must be working as otherwise the library wouldn't work at all..


If I change the value in 'guisettings.xml' for 'audiodelay', however, that works fine and I can add any amount of delay I want.. that setting, however, gets saved to the database if/when you pause a video and it would be nice if the DB would reflect '0' while the advancedsettings.xml let me override the defaults on a per device basis.

It doesn't look like that's possible though based on my testing as 'advancedsettings.xml' isn't read for the 'defaultvideosettings' block..