21 Aug 2020 - The wiki is undergoing a major cleanup. If you arrived here from a search engine and cannot find the page, please use the wiki search instead (top right corner of page)
More info can be found on the forum

Archive:HOW-TO:Play music with background video

From Official Kodi Wiki
Revision as of 05:07, 27 November 2013 by Ned Scott (talk | contribs) (Create dummy lyrics files)
Jump to: navigation, search
not to be confused with music videos

Due to the nature of XBMC, there currently isn't an easy way in the interface to play a muted video and have a different music file play at on top of that. However, clever trick with XBMC's karaoke feature (thanks leechguy!) has given one possible way to do this to hold us over, as described on this page.

Why would I want to do this?
  • Christmas music while showing a video of a log fireplace
  • um.. that's the only one I can think of...

1 Steps

1.1 Enable kareoke

Go to XBMC -> Settings -> Music -> Karaoke -> enable karaoke support.

1.2 Prepare your advancedsettings.xml file

Create a plan text document called advancedsettings.xml and save it to your userdata folder. Copy and paste the following into your advancedsettings.xml file:

  <!-- Music-lyrics delay for CDG format lyrics in SECONDS. Floating number, may be negative. -->
  <!-- Music-lyrics delay for LRC format lyrics in 1/10 seconds. Floating number, may be negative. -->
  <!-- If set to true, when the songs are added to the library, XBMC will automatically replace the song genre by "Karaoke"
    if the song has associated lyrics. Default is false. -->
  <!-- If set to true, when the music-lyrics delay was modified while playing using subtitle delay buttons, the delay value
    for this song will be stored, and restored when the song is played next time. Default is true. -->
  <!-- When karaoke songs are added to the library during scans, an autoincrement number is automatically assigned
to each song, starting from the value specified below. Default starts from 1. -->
  <!-- If set to true (default), the background for CDG songs is always empty (plain color) no matter what setting is set in 
    defaultbackground below. When setting this to false, then one can see through the background and see the video or
  <!-- Sets default background mode. Type could be "none", "vis" for visualisation, "image" or "video".
    For image/video types the "path" parameter should specify the image or video file to play. -->
  <defaultbackground type="video" path="special://masterprofile/karaokevideobg.avi"/>
  <!-- If non-zero, specifies the time in seconds left before the end of the current song when a window will pop up informing you
    about the next played song. The window does not pop up if there is no next song, or it is not a karaoke song -->

Be sure to restart XBMC if it is running, so that it loads the new advancedsettings.xml file.

1.3 Create dummy lyrics files

In order to use the karaoke feature in XBMC there must be lyric files along side the music files. Since we don't actually need to see the lyrics, and we're just tricking XBMC into using the karaoke feature, we can just make dummy files instead.

These files can be simple plain text files that are named after the song file, but with the .lrc file extension. For example, whatever.mp3 would have whatever.lrc in the same folder. The file needs to be more than 0bytes, so you might need to put some spaces in there.

Linux users
If you are running linux and don't want to manually create these files, you can use the following command in the terminal to generate dummy lrc files for all songs in your current directory:
for f in *.mp3; do echo "$f.lrc" | echo " " >> "`sed -e 's/.mp3//g'`"; done