Kodi Community Forum

Full Version: Delayed start of music playback
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there,

I'm having a strange issue regarding the start of the playback of music. In short, the delay between issuing the playback of music (mp3) via any remote control (CEC, keyboard, yatse) and the start of the actual playback is kind of exactly 30s. The playback of tv shows, movies etc. is not affected by this issue, i.e. playback of movies start immediately. I have all the media on a NAS connected via LAN and also the mysql database is on the same NAS. The NAS is mounted on the kodi machine on startup via CIFS and it is configured to spin down the drives after 15min of no access.

I have searched for similar issues on the forum and found a thread describing a similar problem which was related to not having an internet connection. There, the whole access to the library was slow and could be resolved by adding the hostnames of the mysql server to the hosts file or disable the reverse lookup in the mysql server (I believe). Since I recently moved and I also had no internet connection for some time, I applied the hints posted there and it resolved the issues of having slow access to the library. However, my present issue seems not to be connected to this behaviour.

Here is the information with a numbering (roughly) according to the sticky post Wink

1. Here is the kodi debug log as well as some mysql debug log which was recorded not parallel to the kodi log but the entries would be the same

kodi log

mysql log

In the debug log at 10:44:25 I issued the playback (line 76 CEC command) then nothing happens for about 30s (even the gui seems to be locked) and then at 10:44:55 the playback started (line 116). In the mysql log two entries appear when issuing a playback also with 30s separation.

3/7. The kodi revision is Kodi 16.0 Feb-20-2016-Git:a5f3a99 on ubuntu 16.04 LTS with kernel version 4.4.0-22-generic updated 2016-05-28. kodi has been installed via ppa

4/5/6. I'm using x84_64 on a Zotac box with an Intel® Atom™ CPU D2700 @ 2.13GHz, a GeForce GT 520M and 2042716 kB of RAM. I also have two DVB tuners connected and I'm running VDR on the same machine which I also access via kodi. But I guess VDR is not interfering with kodi on that level.

8/9. I was not able up to now to disable all the addons since it seems that restarting kodi solves the issue temporarily. That's also the reason why the logs are older. The issue went away after I rebooted the machine but reappeared some time later. I can also do a
Code:
service lightdm restart
on my headless kodi box which resolves the issue for some time but not permanently. To me, it looks like one just has to wait a certain time and the issue appears. As I said in the beginning I'm not having this issue with movies which are also stored together with the video mysql database on the same NAS. Hence I have no clue, where to start to isolate the issue. I suspect that it is not he NAS and the spin down of the drives since this should affect also the playback of movies. I have not installed to may additional music add ons (Artist Slideshow, Last.fm, Last.fm slideshow, Universal Artist/Album scraper) but I never use those slideshow add-ons. I can disable them in the future to isolate the issue if necessary.

I would be glad if someone has a hint how to solve this issue since it is quite annoying when playing continuous cd and having 30s pause between the songs.

Cheers
I don't know for what reason the db access takes that long. But regardless how long it takes it should not block player. This is fixed in v17
I see - I guess it would be best to wait then for v17. But I now have a few questions to understand your answer better.

Do I understand you correctly that by "blocking of the player" you mean the delay between the lines 76 and 77 where "all that platinum/neptune stuff" happens? Sometimes I saw this directly after pressing the key and repeating once just before the player started. I already thought it might be the reason and is due to the multiple router setup which I now have. But again, before having 2 routers I also experienced this behaviour. And the next question would be whether the db access is necessary for the player to start. From your post it sounds to me that the player could already start the songs but kodi still has to access the db which it could do in the background.

Small update: I'm currently listening to music and since the restart of kodi which I did yesterday the issue has not been reappearing. I updated a few packages yesterday but I don't see how they could be connected to the problem which exclusively did affect music playback. To name a few which might have a tiny chance to have a connection with the issue: samba-commons(-bin), libsmbclient, python-samba, python3-pyparsing among 73 others.

I'm going to keep track of my setup and see how long it takes for the issue to reappear and wait for the update to v17. In case it reappears, I think it's best to stick to restarting kodi every now and then since you did not see any clear reason in the logs.

Thanks again for looking into the issue.
(2016-05-29, 10:43)luzidus Wrote: [ -> ]I see - I guess it would be best to wait then for v17. But I now have a few questions to understand your answer better.

Do I understand you correctly that by "blocking of the player" you mean the delay between the lines 76 and 77 where "all that platinum/neptune stuff" happens? Sometimes I saw this directly after pressing the key and repeating once just before the player started. I already thought it might be the reason and is due to the multiple router setup which I now have. But again, before having 2 routers I also experienced this behaviour. And the next question would be whether the db access is necessary for the player to start. From your post it sounds to me that the player could already start the songs but kodi still has to access the db which it could do in the background.

Small update: I'm currently listening to music and since the restart of kodi which I did yesterday the issue has not been reappearing. I updated a few packages yesterday but I don't see how they could be connected to the problem which exclusively did affect music playback. To name a few which might have a tiny chance to have a connection with the issue: samba-commons(-bin), libsmbclient, python-samba, python3-pyparsing among 73 others.

I'm going to keep track of my setup and see how long it takes for the issue to reappear and wait for the update to v17. In case it reappears, I think it's best to stick to restarting kodi every now and then since you did not see any clear reason in the logs.

Thanks again for looking into the issue.
Hi there !

since updating Kodi to V18.4 i suddenly have the same issue.

Selecting a MP3/flc it starts after a 30 sec playing. The same with next song or selecting another song. always waiting 30 sec before it starts.

Can anyone helps me with this issue ?  i'm really rather desperite ...

grtz eric
Post your Debug Log showing the issue, please. The post you warmed up is 2 years old
In spite the original subject is two years old, I have exactly the same problem using Kodi v18.5
Only music files, delay of 30 sec. for each number    No problems playing movie files.

Newly bought media-player box:  NVIDIA Shield TV Pro (2019)
All the media on a NAS connected via LAN = 1 Gigabit ethernet cable netwerk

Typically also another "Kodi Fork (?)"  --->  MrMC (Lite)   that I tried, do have the same problem.

But if using another player, included as part of the  X-Plore File Manager  app, audio files are played immediately, without any delay.

As a difference of the first topic starter. Till now I only choose files within the file manager of Kodi.
Not made a library or using an "sql database".  Just double clicking music data files.

I shall make a logfile and post it later on.
Sorry, I see it is in the wrong section of the Kodi forum, as for "Linux" devices.
NVIDIA Shield TV Pro (2019)  =  Android TV

I was redirected to this subject, by a reaction on a Dutch forum.
If it its needed to switch over to the Android section, I see your reaction and reference what to do further.
(2019-12-23, 03:46)Babylonia Wrote: [ -> ]Sorry, I see it is in the wrong section of the Kodi forum, as for "Linux" devices.
NVIDIA Shield TV Pro (2019)  =  Android TV

I was redirected to this subject, by a reaction on a Dutch forum.
If it its needed to switch over to the Android section, I see your reaction and reference what to do further.

Where is your Debug Log that shows the issue?