Req Set delay on video playback to allow audio format change.
#5
(2017-01-12, 21:39)FernetMenta Wrote: Kodi does not get any feedback from AVRs what they detected the format, some need a very long time, other may be faster. That raises the first problem: when to pause. 2nd AVRs tend to lose format when being paused.

I know the player gets no feedback from the AVR. That isn't required. Kodi already knows what type of audio it sent last time and if the format changes, then the audio delay kicks in.

(2017-01-12, 21:39)FernetMenta Wrote: In order to make this work you would need to encode silence into the desired format and pre-roll audio. That is feasible and if somebody wants to do this, be my guest. Personally I consider passthrough audio as inferior and won't implement it.

No you wouldn't. You would only need to do this if creating a delay in playback at the right time was not possible - which it is, based on the knowledge Kodi has of the stream it played last.

(also, why is passthrough audio inferior?)

Even if Kodi didn't know the type of audio stream being played, allowing Kodi to discover this value from metadata in the file is easy.

The pause can be just that, a pause in playback or it could be a "<< return to 0" in the video playback" if the video isn't resuming from a previous session.
If it were resuming then a step back by the amount of the delay set +1 second would allow the system to acclimate to the new audio stream.

So, the logic works this way...

A) If the audio stream format isn't changing, then play the video without delay.

B) If the audio stream is changing AND the video is starting fresh (within <DELAY SECONDS + 1> from ZERO), then allow the audio to start for 1 second and then pause <DELAY> seconds, and jump back to 0:00 and play.

C) If the audio stream is changing AND the video is starting in the middle (MORE than <DELAY SECONDS + 1> from ZERO), then pause <DELAY> seconds, and jump back in the video by 1 second and play.


the requirements for this logic to work are simple to achieve...

Kodi has to know what audio stream was sent last, and what audio stream will be sent next. (This is doable)
Kodi has to be able to pause the video playback the moment after the stream has time to sent the format type bits.

This would resolve many issues with high end theaters getting 3 seconds of their TV shows' audio cut off at the start.
Reply


Messages In This Thread
RE: Set delay on video playback to allow audio format change. - by sniper_x - 2017-01-12, 21:58
Logout Mark Read Team Forum Stats Members Help
Set delay on video playback to allow audio format change.0