slideshow-bgm is a kodi addon that plays background music(bgm) when playing slideshow. It works on v19 Matrix and v20 Nexus.
Feel free to use, modify and share your code!
cd
to theaddons
folder under kodi data folder.git clone https://github.com/june3474/script.slideshow-bgm.git
- Enable
slideshow-bgm
in Kodi.
Notes: Pictures below were copied from https://www.technadu.com/enable-unknown-sources-on-kodi/11658/
- Go to kodi’s Home screen and click on the gear icon located in the top-left corner.
- click on the system button on the right side of the screen.
- Using the left-placed sidebar, hover over the ‘Add-ons’ item.
On the right, click on Unknown Sources. You will be presented with a message against enabling this option. You can feel free to continue by clicking on Yes.
- Go to https://github.com/june3474/script.slideshow-bgm/releases
- Download
Source code (zip)
of the latest version
- In Kodi’s home screen, click on Add-ons. Then click on the ‘open box’ icon(top-left corner) and select Install from ZIP file. You’ll see a dialog window to choose a zip file. Locate slideshow-bgm-[version].zip file you have downloaded and click it.
slideshow-bgm script needs to be interconnected to the skin to work properly.
Technically, interconnecting is done by inserting a xml tag below in the SlideShow.xml
file of the current skin,
and it is automatically performed after slideshow-bgm being installed or enabled.
In this way, slideshow-bgm runs only while playing slideshow, rather than all the time while Kodi runs.
<onload condition="System.HasAddon(script.slideshow-bgm) + System.AddonIsEnabled(script.slideshow-bgm)">RunAddon(script.slideshow-bgm)</onload>
However, if you are using the default skin(estuary
as of Kodi v19) on linux, it might not be able to insert the tag
due to the permission problem.
In that case, slideshow-bgm will inform you and you will need to manually edit the SlideShow.xml
file.
See the pictures below.
If you are really reluctant to manually edit SlideShow.xml
of the default skin though, you can alternatively
install another skin BEFORE installing slideshow-bgm. Since non-default skins are intalled in your private addons
directory,
there will be no permission problem. As you already know, there are so many awesome skins such as
arctic horizon.
The original SlideShow.xml
is saved as SlideShow.xml.original
.
The last step is to choose your bgm. Go to the configure screen of slideshow-bgm and select a music playlist
or a directory containning music files. If you choose a directory, slideshow-bgm will create a playlist(bgm.m3u
)
in addon_data folder for you.
That’s it. Enjoy!
In most cases, this happens due to corrupted or abnormally encoded audio files.
They seem to fail SeekTime()
function of kodi which uses ffmpeg/libav internally;
and SeekTime()
ends up on time 0, the beginning of the file. Take a look at the example below:
ffprobe version 4.2.4 Copyright (c) 2007-2020 the FFmpeg developers Input #0, mp3, from 'sample.mp3': Metadata: major_brand : 3gp4 minor_version : 512 compatible_brands: isomiso23gp4 encoder : Lavf58.20.100 Duration: 00:04:22.94, start: 0.138122, bitrate: 15 kb/s Stream #0:0: Audio: mp3, 8000 Hz, mono, fltp, 8 kb/s Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1500x1495 [SAR 1:1 DAR 300:299], 90k tbr, 90k tbn, 90k tbc (attached pic) Metadata: comment : Cover (front)
ffmpeg[7F6567015700]: [mp3float] Could not update timestamps for skipped samples. SeekTime - seek ended up on time 0
The solution is to remove the audio file from your bgm playlist.
If you have chosen a directory in slideshow-bgm settings, edit bgm.m3u
file
in script.slideshow-bgm
directory(folder) under
addon_data folder.
Starting from version 0.4.0, seekTime() function is no longer used.
- Use kodi’s addon menu or delete
script.slideshow-bgm
folder in kodi data folder/~addons~/. - Delete
script.slideshow-bgm
folder in addon_data folder. - Restore your original
SlideShow.xml
, i.e., deleteSlideShow.xml
and renameSlideShow.xml.original
toSlideShow.xml
.