Blog · Part 1, Foundations

Name your files so Jellyfin recognizes them

Jellyfin identifies a film by its folder and file name. Follow a handful of rules and every title gets the right poster, the right year, and the right episodes.

Jellyfin doesn’t watch your videos to figure out what they are. It reads the folder and file names, searches online databases for a match, and takes the first good one. A clear name gets the right film. A messy one gets a random film from 1987 with a similar title, or nothing at all.

The good news: the rules are short.

Anatomy of a film file name, Nosferatu (1922), with an optional IMDb ID and a Restored label, .mkv: title, year, an optional ID, an optional version label and the extension. And of an episode, Example Series S01E02.mkv: series name, season, episode and extension.

Films

One folder per film, named Title (Year), with the video inside named the same way:

/data/media/movies
├── Nosferatu (1922)
│   └── Nosferatu (1922).mkv
├── The General (1926)
│   └── The General (1926).mp4
└── Night of the Living Dead (1968)
    ├── Night of the Living Dead (1968).mkv
    └── Night of the Living Dead (1968).en.srt

The year matters more than you’d think. Many films share a title, and remakes are common. With the year, Jellyfin almost never guesses wrong.

Pin the exact match with an ID

When a title is ambiguous, add the film’s ID from a metadata site in square brackets. Jellyfin then skips the search and uses that exact entry:

Nosferatu (1922) [imdbid-tt0013442]/
    Nosferatu (1922) [imdbid-tt0013442].mkv

You can use [imdbid-...] from IMDb (the tt number in the page address) or [tmdbid-...] from TMDB (the number in its page address). Radarr adds these for you once it manages the library (Day 16), so don’t worry about doing it by hand for every film.

Several versions of one film

Put them in the same folder, each with a hyphen and a label after the name:

Metropolis (1927)/
    Metropolis (1927) - 1080p.mkv
    Metropolis (1927) - Restored.mkv

Jellyfin shows one film with a version picker instead of two entries.

Films in several parts

Long Film (1960)/
    Long Film (1960)-part1.mkv
    Long Film (1960)-part2.mkv

cd1, disc1, pt1 work too.

Series

One folder per series, one folder per season inside, episodes named with season and episode numbers:

/data/media/tv
└── Example Series (1959)
    ├── Season 01
    │   ├── Example Series S01E01.mkv
    │   ├── Example Series S01E02.mkv
    │   └── Example Series S01E03.mkv
    ├── Season 02
    │   └── Example Series S02E01.mkv
    └── Season 00
        └── Example Series S00E01.mkv

The rules that matter:

  • Season folders are Season 01, Season 02, spelled out. Jellyfin’s docs are explicit: don’t shorten them to S01.
  • Episodes carry S01E01. That code is what Jellyfin reads. The rest of the file name is for you.
  • Specials go in Season 00 as S00E01, S00E02, matching the specials list on the metadata site.
  • Add the year to the series folder when the title has been used more than once.

An episode that covers two slots in one file:

Example Series S01E01-E02.mkv

And the same [tvdbid-...] or [tmdbid-...] trick works on series folders:

Example Series (1959) [tvdbid-12345]/

Subtitles next to the video

External subtitle files sit beside the video with the same name, plus a language code:

Nosferatu (1922).mkv
Nosferatu (1922).en.srt
Nosferatu (1922).fr.srt
Nosferatu (1922).en.forced.srt

forced marks subtitles that only cover foreign-language lines. sdh (or hi) marks subtitles for the deaf and hard of hearing. Day 12 covers subtitles properly.

Extras

Trailers, behind-the-scenes and deleted scenes go in subfolders of the film or series folder, with these exact names:

Metropolis (1927)/
    Metropolis (1927).mkv
    trailers/
        Trailer.mp4
    behind the scenes/
        Restoration.mkv

Recognized folder names include trailers, behind the scenes, deleted scenes, featurettes, interviews, scenes, shorts and extras. Jellyfin shows them on the title’s page instead of as separate films.

Characters to avoid

These characters cause problems in names, especially across operating systems: < > : " / \ | ? *

Titles with a colon are common, so replace it: Mission - Impossible (1996) or Mission Impossible (1996) both match fine.

Fixing a wrong match

Even with good names, the odd one slips. In Jellyfin, open the title, click the three dots, choose Identify, search for the right entry, and pick it. Jellyfin also offers Refresh metadata if the poster or description didn’t load.

If a title doesn’t show up at all, check the folder and file names first. Nine times out of ten that’s the cause.

Tidying an existing collection

If you have a few hundred files with inconsistent names, don’t rename them by hand. Radarr and Sonarr can do it for you, safely and with a preview, once they’re installed (Days 15 and 16). For now, make sure each film has its own folder and each series has season folders, and that’s enough for Jellyfin to get most things right.

After moving files around, run Dashboard → Libraries → Scan All Libraries.

Check it worked

Put one film and one episode in place following the rules, scan, and look at them in Jellyfin. You should see the correct poster, year and description. If you do, the foundation is done.

That’s the end of Part 1. You have a server, a clean folder layout, Docker, Jellyfin, and a library it understands. Tomorrow, Part 2 starts: getting the most out of Jellyfin, beginning with libraries, metadata and artwork.

Use these tools with media you own or are authorized to use, and with public-domain works. Medusa does not host, provide, or stream any media of its own.