Request: Set Global Audio Delay by Resolution and Media Type
#1
Hello everyone -

Firstly, thanks for making the best product out there for enthusiasts like myself. I'm proud to support your excellent work.

I have a feature request that should be simple to implement. Specifications would be as follows:

BACKGROUND: Kodi already provides a feature by which we can alter the audio delay of individual films and television episodes. This is much appreciated.

PROBLEM: I have a very large number of both HD and SD films. In my system, most HD films require an audio delay setting of -0.250 to be "in sync," while SD films are fine at 0.00 delay. So, at present, every time I watch an HD film for the first time, I have to set audio delay to -0.250. This is obviously a bit of a pain. I realize that I could globally set the audio delay to -0.250, but then, every time I watched an SD film, I would have to reset the delay to 0.00. The same issue exists for television series on a series-by-series basis. Some domestic series in SD are perfectly synced at a 0.00 delay, while certain foreign series require delays as long as -0.500 to be in sync. In these cases, I have to adjust the sync of *every* episode of an 'out of sync' series to the correct audio delay. I'm sure other persons have experienced these issues as well.

PROPOSED SOLUTION:

Retain the ability to set audio delay for specific files, or course. BUT:

1) In Global System Settings, allow to set audio delay by resolution type, HD and SD, and by content type (Film vs TV). So basically, we'd have four settings here:

Audio Delay HD Film [control audio delay setting control}
Audio Delay SD Film "
Audio Delay HD TV "
Audio Delay SD TV "

2) Allow an audio delay to be set and stored for each of these types of programming in "Global System Settings." For example, if I know that in my system, both HD Films and TV Episodes need a delay of -0.250, while SD films have no delay and SD TV shows require a delay of +0.125, Global settings for these types of programming would look as follows once set:

Audio Delay HD Film: -0.250
Audio Delay SD Film: 0.00
Auido Delay HD TV: -0.250
Audio Delay SD TV: 0.125

3) Whenever a film or TV series is added to Kodi, system detects whether the file a) is a movie or tv show; and then b) is in HD or SD. Kodi would then automatically sets audio delay for that file per the settings in global system parameters.

For example, if I add an HD file to Kodi in a folder specified as containing "movies," and in Global System Parameters, I have HD files for movies set for delay of -0.250, then when Kodi indexes the file for the first time movie file is added to the Kodi library with this delay already in place for that specific file.

4) lf I later discover that an individual file needs a slight tweak, I can make that tweak, and Kodi will retain it as normal.

This minor upgrade would avoid us having to set the audio delay for every specific file we import into Kodi and save us all a GREAT deal of time. Please consider adding this relatively simple function if possible. Thank you!

Keith
Reply
#2
The simplest and most general solution, from the point of view of Kodi developers, is to provide a simple hook for a plugin in python to do the rest.

As such, if we have a 'custom audio delay provider' plugin, it needs to essentially have just one function:

def get_delay(context):
# do stuff
return float_number

The context should indicate the current audio device, currently playing media, and properties of that media, and should be called when any of the following change:

1. What is playing (new video)
2. The audio or display device

Then have a template plugin that users can customise, to also function as sample code.

For example, sometimes I play video through my TV, but sometimes when exercising, use a bluetooth headset. That means adding -0.3s delay to whatever the delay would have been on the TV.

In addition, it is sensible that each video file can potentially have an audio delay value for that video, and each audio device have an audio delay value for that device, and the audio delay for a video then defaults to the sum of these two.

As noted above, the first and most important step is a general hook for plugin authors, and a means to indicate to the user what delay is 'video delay' and what is 'interface delay'.

Sensibly, this is probably a case of hacking a few lines of code in, and I may have a look in the near future (though I am not a kodi dev, and don't really know my way around the code).
Reply

Logout Mark Read Team Forum Stats Members Help
Request: Set Global Audio Delay by Resolution and Media Type0