| Video library
NFO files can be used to provide metadata to the library for video and a music files. They are helpful if the metadata fetched from a web site does not match the video or music you have, or if data for that particular file does not exist, such as for home movies. It can also be used to control the search behaviour of scrapers.
1 What is nfo
nfo is a contraction of Info or Information. It is a Filename Extension - mymovie.nfo and the contents of the file are written in XML. The file itself does nothing except hold information. It is basically a text document with special tags inserted around the information. These tags are recognised by Kodi which enables data importing.
Kodi uses nfo files as one way of importing metadata into the library. It may also be used as a method of exporting the library for various reasons, including backup. See: Import & Export
One of the most considered features of Kodi is the way media is displayed. Gone are the days when choosing a movie to watch or album to listen to involved scrolling through lines of text. Kodi uses Artwork, and Extended Information to display your media. This information includes Actors, Directors, Plots, Taglines, Ratings, Run Times and more. All this data, known as metadata, is stored in the Kodi Library. The Library is a SQLite database.
There are two primary methods to load metadata into your library:
- Use the online scraper
- Create a nfo file, from which Kodi is able to import the metadata
For information on how to use the online scraper within Kodi:
The remainder of this wiki topic will provide the required information to create and use nfo files.
2 Types of nfo
Kodi can use the nfo file in one of three ways depending on the contents of the nfo file. This page and sub-pages primarily deal with the Metadata nfo.
2.1 Metadata nfo
This is the most common use of the nfo file. The Metadata nfo contains the metadata for the movie/tv show/music video/album/artist within the file. Kodi will read this file and scrape its contents into the library.
2.2 Parsing nfo
A Parsing nfo does not contain any metadata that Kodi can use to scrape into the library. Instead it contains the URL to the movie/tv show/album/artist that you want scraped. As an example, searching for The Mummy on TMDB returns 65 titles. If you are attempting to add one of the more obscure versions to your library, chances are that Kodi will scrape the incorrect title, and trying to navigate to the 65th entry will be problematic. The parsing nfo offers an easy solution to this problem.
The parsing nfo will also override the scraper setting in Kodi. If you have TMDB set as your scraper, it is possible to use the IMDB URL for the movie. The only condition to this flexibility is that the site of the URL you are using must have a Kodi scraper.
To create and use the parsing nfo, follow these steps:
- Locate the title at the appropriate scraper site
- Ensure you have named your media files/folder the same as shown on the scraper site and in accordance with the Kodi naming conventions
- Open a text file and copy the entire address of the movie at the scraper site from the address bar and paste it into the text file. No surrounding tags are required. see examples after step 5
- Save the file in accordance with the naming convention as detailed on the linked Movie/TV Show/Music Video pages. Ensure the extension is *.nfo and not *.nfo.txt or *.nfo.doc
- Run an Update Library or a Scan item to library. Kodi will parse the URL and locate the title and scrape the correct metadata.
Examples of Parsing nfo :
Parsing nfo files cannot be used for episode nfo's
2.3 Combination nfo
It is possible to combine the above two types of nfo files into one nfo file. An example use would be to override data from the scraper site such as the title, runtime, movieset etc. It will scrape the metadata located between the <movie></movie> XML tags and the omitted data will be scraped at the provided URL. An example:
Cannot be used for Episode nfo files
<movie> <title>Star Wars (1977 Original Theatrical Release)</title> <runtime>121 min.</runtime> <set>Star Wars Saga</set> <sorttitle>Star Wars1</sorttitle> </movie> http://www.imdb.com/title/tt0076759/
By default the following listed xml tags will have their data added to the scraped entry in the database and may result in some duplicates. If the tag is not listed below, this paragraph does not apply. Does not apply to Music.
<genre clear="true"></genre> <credits clear="true"></credits> <director clear="true"></director> <studio clear="true"></studio> <actor clear="true"></actor> <artist clear="true"></artist> (Music Video only)
If you want to completely override the scraped result you need to set a clear attribute for the relevant xml tag in the .nfo file as shown in the example below.
<movie> <genre clear="true">Action</genre> <genre>Horror</genre> <genre>Thriller</genre> <director clear="true">Frank Miller</director> <director>Robert Rodriguez</director> <director>Quentin Tarantino</director> </movie> http://www.imdb.com/title/tt0401792/
Tags that support the clear attribute are genre, director, studio, actor, credits and artist for Music Videos. There is no support in Music tags.
3 Creating nfo
The following are the three methods that may be used to create nfo files for Kodi. The simplest method is using a Media Manager.
3.1 Media Managers
This is, by far, the simplest method for creating nfo files for your media. The Media Manager can create nfo files in one of three ways:
- Scraping- This is the same process as performed by the Kodi scraper. The Media Manager will fetch metadata from the online scraper site and will create the nfo file, unlike Kodi that imports the metadata directly into the library database.
- Manual- The Media Manager offers a simple interface that allows you to manually type in the data. This method does not require you to have knowledge of XML tags
- Combination- A combination of both methods can be used. If you are not satisfied with the scraped metadata, then simply modify it.
Once the program has been setup and pointed at your media, very little input is required by the user. Select a movie, tv show, album or artist and select scrape. Depending upon your settings, the media manager will scrape the media and create the nfo which is placed in the correct location with the media file. It can also download all artwork for the media. There are a few media managers available. The following managers can be found in the Kodi forum:
Further information, screenshots and guides are available at the websites of the Media Managers.
3.2 Kodi Created nfo
This option requires that your library has already been scraped with metadata. Using the built in Import & Export function of Kodi, you can export the library metadata into individual nfo files which are correctly created and saved. This is useful if you have an existing library and would like to backup the library or to import the library into another Kodi installation.
- See: Import & Export
3.3 Manual Creation
The more difficult of the three methods. It requires basic knowledge of XML Tags. They can be created using a simple text editor such as Notepad in Windows, or the equivelant in other operating systems. There are dedicated code editors that can also be used. They will not provide the required Kodi tags, but they will avoid glitches when saving the nfo file, which is commonly experienced with text editors. Two common code editors that can be used:
Requirements of the nfo file are as follows:
- The file must be in Unicode Transformation Format-8 (UTF-8). The file must be saved in this format. The first line of the file must contain the following... <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- The second line may contain a note detailing the creation time and date. It may also include the name of the media manager, if one was used to create it, or any information relevant to you. This is optional. <!-- created on 2017-08-10 15:09:33 - by MediaManager -->
- The next line sets the nfo category and the last line of the file contains the closing tag using the relevant following tags... <movie></movie>, <tvshow></tvshow>, <episodedetails></episodedetails>, <artist></artist>, <album></album> or <musicvideo></musicvideo>
- Between the opening and closing category tags are the tags for the media metadata. Each Tag must have an opening tag and a closing tag. eg <title>my movie title</title>. <title> = opening tag | my movie title = metadata | </title> = closing tag
- Available tags are listed in the relevant sub-pages listed in sections 5-8.
Once created, the file must be saved with the nfo extension in accordance with the details in the relevant sub-page listed in sections 5-8.
4 Scraping nfo files
There is no special procedure to scrape nfo files. Performing the usual Library Update, or selecting Refresh for individual items, will scrape the nfo files into the library. Be aware that nfo files are not easily interchangeable between Movies, TV Shows, Music Videos, Artists and Albums. Although they all share common tags, each also has its own specific tags that won't be recognised in other parts of the library.
After the NFO files are scanned into the library, the NFO file is no longer used and only serves as a backup. If you make changes to the NFO file you will need to refresh that library entry for the changes to be loaded into Kodi. An Update Library will not capture the change as this only looks for new items.
Kodi also contains a Local-NFO-only mode for when you add videos to the library, but this mode is only required if you want to prevent online lookups for videos that lack NFO files. See Set content and scan#Local NFO only options for more information on this Local-NFO-only mode.
5 Movie nfo
For specific details of nfo files for Movies
- See: Movie nfo
6 TV Show nfo
For specific details of nfo files for TV Shows and Episodes
- See: TV Show nfo
7 Music nfo
For specific details of nfo files for Music Artists and Albums
- See: Music nfo
8 Music Video nfo
For specific details of nfo files for Music Videos
- See: Music Videos nfo
|Return to top|