The Big Picture
At the end of this guide, you'll understand more than you probably ever wanted to know about Kodi and the naming conventions that Kodi expects. Naming conventions are pretty important, and should be followed whenever possible. When you deviate from the standard, you can start to see some very unusual issues in CinemaVision, and in some cases in Kodi. Here's a quick guide and some references for the naming conventions in Kodi.
Locally Stored Movies
Here is a great guide on the Kodi Wiki for naming your movies. You can follow that, or use the model that I have found to be successful below. Adding the year to the directory/file name is optional, and the title should be as close to what you find on IMDb as you can possibly get it.
Here's an example without separating the movies into different directories.
...\Movies\<movie-name><year>.<ext>
...\Movies\<movie-name><year>.<ext>
...\Movies\<movie-name>.<ext>
...\Movies\Casablanca (1942).mkv
...\Movies\Iron Man (2008).mkv
...\Movies\The Hobbit - An Unexpected Journey.mkv
Here's an example separating the movies into different directories.
...\Movies\<movie-name><year>\<movie-name><year>.<ext>
...\Movies\<movie-name><year>\<movie-name><year>.<ext>
...\Movies\<movie-name>\<movie-name>.<ext>
...\Movies\Casablanca (1942)\Casablanca (1942).mkv
...\Movies\Iron Man (2008)\Iron Man (2008).mkv
...\Movies\The Hobbit - An Unexpected Journey\The Hobbit - An Unexpected Journey.mkv
Locally Stored 3D Movies
This is where things can get a bit complicated. Kodi uses 3D filename tags to determine the format of your file and how to play it back. Kodi expects that the 3D tag (in any form) be flanked on both sides by either a space, period, hyphen or underscore. It's up to you where you put the 3D tag in the name, and what 3D tags you use. You'll find a list of the allowed 3D tags in this post on the Kodi Wiki. Here's what we've found works well.
Here's an example without separating the movies into different directories.
...\Movies\<movie-name><3d-tag><year>.<ext>
...\Movies\<movie-name><3d-tag><year>.<ext>
...\Movies\<movie-name><3d-tag><year>.<ext>
...\Movies\Avatar 3D SBS (2009).mkv
...\Movies\Finding Nemo 3D SBS (2003).mkv
...\Movies\The Hobbit - An Unexpected Journey 3D TAB (2012).mkv
Here's an example separating the movies into different directories.
...\Movies\<movie-name><year>\<movie-name><3d-tag><year>.<ext>
...\Movies\<movie-name><year>\<movie-name><3d-tag><year>.<ext>
...\Movies\<movie-name>\<movie-name><3d-tag><year>.<ext>
...\Movies\Avatar (2009)\Avatar 3D SBS (2009).mkv
...\Movies\Finding Nemo (2003)\Finding Nemo 3D SBS (2003).mkv
...\Movies\The Hobbit - An Unexpected Journey\The Hobbit - An Unexpected Journey 3D TAB (2012).mkv
Locally Stored Television
Kodi requires each TV show to be in its own folder, and for each file to contain a pattern from which Kodi can determine the season and episode number.You should use the from either IMDb or TheTVDB, and assign appropriately. Here's what we have found that works well.
Here's an example without directory and file names.
...\Television\<tv-show-1>\Season 1\<episode-id><episode-name>.<ext>
...\Television\<tv-show-1>\Season 1\<episode-id><episode-name>.<ext>
...\Television\<tv-show-1>\Season 2\<episode-id><episode-name>.<ext>
...\Television\<tv-show-1>\Season 2>\<episode-id><episode-name>.<ext>
...\Television\<tv-show-2>\Season 1\<episode-id><episode-name>.<ext>
...\Television\<tv-show-2>\Season 1\<episode-id><episode-name>.<ext>
Here's an example with directory and file names.
...\Television\Rick and Morty\Season 1\S01E01 Pilot.mkv
...\Television\Rick and Morty\Season 1\S01E02 Lawnmower Dog.mkv
...\Television\Rick and Morty\Season 2\S02E01 A Rickle in Time.mkv
...\Television\Rick and Morty\Season 2\S02E02 Mortynight Run.mkv
...\Television\Sherlock\Season 1\S01E01 A Study in Pink.mkv
...\Television\Sherlock\Season 1\S01E02 The Blind Banker.mkv
Locally Stored Trailers
Ideally, trailers should be stored with the movies in your Kodi library. The trailer should represent the movie it's stored with.
One way you can accomplish identifying trailers in your library is by naming a file movie-trailer.. No other change is needed in this case, but two trailers with this name cannot exist in the same directory, so you have to make sure to store them separately.
...\Movies\<movie-name-1>\<movie-name-1>.<ext>
...\Movies\<movie-name-1>\movie-trailer.<ext>
...\Movies\<movie-name-2>\<movie-name-2>.<ext>
...\Movies\<movie-name-2>\movie-trailer.<ext>
...\Movies\Casablanca\Casablanca.mkv
...\Movies\Casablanca\movie-trailer.mkv
...\Movies\Iron Man\Iron Man.mkv
...\Movies\Iron Man\movie-trailer.mkv
You can also identify a trailer by using the -trailer tag at the end of the file name. The trailer file should be named identically to the movie in your Kodi library, with the exception of the added -trailer tag. If the name of the trailer differs in any way from the name of the movie, it will result in multiple entries in the Kodi database.
...\Movies\<movie-name>.<ext>
...\Movies\<movie-name>-trailer.<ext>
...\Movies\Casablanca.mkv
...\Movies\Casablanca-trailer.mkv
For the brave, you can also define your own Regular Expressions (RegEx's) by modifying the advancedsettings.xml and defining what expression you want Kodi to use in the tag. If you need to validate a RegEx, here's something that may help.