garbear / kodi-steamlink

Steam Link port of Kodi
Other
436 stars 36 forks source link

A fadein is present at every playback #15

Open WildPenquin opened 6 years ago

WildPenquin commented 6 years ago

Hi,

There seems to be a fadein whenever a playback (video or audio) is started. It is a long one, around five seconds or more (haven't taken time, though).

Obviously this is annoying unless one is doing some DJ things and jumping between songs manually, for every other use case it is most probably not wanted behaviour. Note: this also happens if nothing was playing before!

Crossfading is disabled in the menus and I can not find anything else that could be causing this in settings. Have I missed some option where this can be disabled? Or is this a bug?

If this is a setting somewhere, it should be disabled per default IMHO (I have used / am using KODI on several installations and none have experienced / are experiencing this behaviour).

p.s. Thanks for this project - hope it catches on!

garbear commented 6 years ago

I think this is an issue inherent in how the SL decodes video. The SL is capable of real-time h264 decoding for games, but that's because games don't use B frames (which require future frames to be decoded). Videos, on the other hand, use B frames, so a few seconds of video needs to be sent to the decoder before anything appears on the screen.

Is this the delay at the beginning of playback that you're talking about?

WildPenquin commented 6 years ago

No, I'm talking about fade-in as in a supposed feature made to blend two songs together. Sometimes it is also used to fade in the song from silence.

In other words, the volume is near-silent in the beginning and gradually increases to whatever it is supposed to be.

garbear commented 6 years ago

Is this problem present in Kodi on PC? Can you post a debug log? That might reveal the problem.

I don't have access to my Steam Link for at least another few weeks due to a 200,000-acre wildfire that destroyed half my neighborhood. I'll look into this and my backlog of other issues when our evacuation order is lifted.

WildPenquin commented 6 years ago

Hi! Sorry about the wildfires, hope you got everything sorted out? No wildfires where I live!

However I didn't have time to try again until now (christmas etc.). I noticed that the fade-in even includes UI sounds! More specifically, if I stop a file which was playing, even the UI sounds are muted, and progressively fade-in in around 10 seconds.

Perhaps Steam Link audio system (PulseAudio or whatever they are using?) is doing it, as opposed to KODI. Just guessing... (maybe in some weird situations ; say buffer underruns - they at Valve wanted to introduce this to make any possible artifacts disappear - but KODI unintentionally triggers it at every stream change ?)

And as I already stated, I have never seen this on any other installation of KODI (I've been using KODI for years, on several different installations, even when it was called XBMC; currently on an Arch Linux PC and on an Odroid, neither of which exhibits this behaviour).

Here I'm playing one file (from a Manic Street Preachers album I have in my collection over the network). I can see no relevant information in the log, perhaps you can spot something?

This should be really easy to reproduce, please let me know if you can not.

kodi-steamlink.audiofade.log

slax57 commented 4 years ago

I noticed the same thing on my Steamlink with Kodi Krypton 17.6.

I can confirm this does not happen on my Windows desktop installation of Kodi (same version). It's really specific to the Steamlink.

It's a bit annoying since I'm using a (custom) Spotify add-on that relys on constantly refreshing the current playlist, so I get the fadein effect at the start of each song.

Has anyone tried if this is still present with Kodi 18? (I can't upgrade and try out myself because my add-on is not compatible 😬 )

In anycase, I'm aware this problem is not critical, and still highly appreciate all the work done for this port! 🙂