· Grand Media Station

The Ideal Media Server Folder Structure for Plex and Jellyfin

How to organize your media library folders so Plex, Jellyfin, and Emby can scan them correctly every time.

plexjellyfinfolder structurehomelabnas

If you’ve ever added a movie to your media server only to watch it show up as an episode of some random TV show, you know the pain of a bad folder structure. I’ve rebuilt my library from scratch more than once before landing on a structure that works reliably across Plex, Jellyfin, and Emby simultaneously. Here’s what I’ve learned.

Start with Separate Top-Level Libraries

The single most important decision is splitting your media into distinct top-level directories. Every major media server expects this, and mixing content types in one folder is the fastest way to break metadata scraping.

/media/
├── Movies/
├── TV Shows/
├── Anime/
├── Music/
├── Audiobooks/
└── Home Videos/

Each of these directories becomes its own library in Plex, Jellyfin, or Emby. This matters because each library type uses a different metadata agent. Plex’s movie agent queries TheMovieDB and IMDB differently than its TV agent queries TheTVDB or TMDB for series data. When you dump movies and TV shows into the same folder, the scanner has to guess what each item is, and it guesses wrong constantly.

Anime gets its own library because you’ll likely want to use a dedicated agent like AniDB or AniList for metadata. If you mix anime into your TV Shows library, you’ll end up with mismatched episode numbering (absolute vs. season-based) and incorrect artwork.

Movie Folder Hierarchy

Every movie goes in its own subfolder. The year in parentheses disambiguates remakes and same-name films, and it’s what the metadata agents expect.

/media/Movies/
├── Blade Runner (1982)/
│   ├── Blade Runner (1982).mkv
│   ├── Blade Runner (1982).en.srt
│   └── Blade Runner (1982).en.forced.srt
├── Blade Runner 2049 (2017)/
│   ├── Blade Runner 2049 (2017).mkv
│   └── Blade Runner 2049 (2017).ja.srt
├── Dune (2021)/
│   ├── Dune (2021).mkv
│   ├── Dune (2021).en.srt
│   └── extras/
│       ├── Behind the Scenes-behindthescenes.mkv
│       └── Deleted Scenes-deleted.mkv
└── The Thing (1982)/
    └── The Thing (1982).mkv

The key points: the folder name matches the file name, both include the year, and the video file sits directly inside its folder. Never leave movie files loose in the top-level Movies directory.

TV Show Folder Hierarchy

TV shows add one more level of nesting. The pattern is Show Name (Year)/Season XX/Show Name - SXXEXX - Episode Title.ext.

/media/TV Shows/
├── Breaking Bad (2008)/
│   ├── Season 01/
│   │   ├── Breaking Bad - S01E01 - Pilot.mkv
│   │   ├── Breaking Bad - S01E01 - Pilot.en.srt
│   │   ├── Breaking Bad - S01E02 - Cat's in the Bag.mkv
│   │   └── Breaking Bad - S01E02 - Cat's in the Bag.en.srt
│   ├── Season 02/
│   │   ├── Breaking Bad - S02E01 - Seven Thirty-Seven.mkv
│   │   └── ...
│   └── Season 05/
│       └── ...
├── Severance (2022)/
│   ├── Season 01/
│   │   └── ...
│   └── Season 02/
│       └── ...
└── Shogun (2024)/
    └── Season 01/
        └── ...

Use Season 01 with zero-padded two-digit numbers, not Season 1 or S01. All three servers parse Season 01 correctly, but shorthand formats can cause issues with some agents. The year after the show name is technically optional, but I always include it — it prevents mismatches when two shows share a name.

Extras, Featurettes, and Behind-the-Scenes

Plex and Jellyfin both support extras, but they expect them in specific subdirectories within the movie or show folder. The recognized subfolder names are:

  • extras/ — general bonus content
  • behind the scenes/ — BTS featurettes
  • deleted scenes/ — deleted/extended scenes
  • featurettes/ — short featurettes
  • interviews/ — cast/crew interviews
  • trailers/ — trailers and teasers
/media/Movies/Dune (2021)/
├── Dune (2021).mkv
├── behind the scenes/
│   └── Building the Worlds of Dune.mkv
├── deleted scenes/
│   └── Extended Banquet Scene.mkv
└── featurettes/
    └── The Royal Houses.mkv

Jellyfin uses slightly different naming conventions for some extras, but the subfolder approach works on both platforms. Emby follows the same pattern as Jellyfin here.

Subtitle File Placement

Subtitles go in the same directory as the video file they belong to, with the same base name plus a language code suffix.

The naming pattern: Movie Name (Year).lang.ext or Movie Name (Year).lang.forced.ext for forced subtitles (foreign language dialogue only). Use ISO 639-1 two-letter language codes (en, es, fr, ja, de, etc.).

Arrival (2016)/
├── Arrival (2016).mkv
├── Arrival (2016).en.srt          # English subtitles
├── Arrival (2016).en.forced.srt   # English forced (alien dialogue)
├── Arrival (2016).es.srt          # Spanish subtitles
└── Arrival (2016).fr.ass          # French subtitles (ASS format)

Both .srt and .ass/.ssa formats are supported across all three servers. Plex, Jellyfin, and Emby all pick up external subtitles automatically when named this way.

NAS-Specific Considerations

Most homelabs run media servers against network storage, so there are a few things worth getting right from the start.

SMB Shares: Create one top-level share (e.g., \\nas\media) and point all three servers at it, or at individual subdirectories within it. Avoid creating separate shares per library — it just adds complexity to your fstab or mount configuration.

Mount Points: On Linux, mount your NAS share to a consistent path like /mnt/media or /media. Use /etc/fstab with the _netdev option so the mount waits for networking. If you’re running your media server in Docker, bind-mount the NAS path into the container and make sure the internal path matches what you configure in the server UI.

# /etc/fstab example
//192.168.1.100/media  /mnt/media  cifs  credentials=/etc/smbcredentials,uid=1000,gid=1000,_netdev  0  0

Permissions: Set ownership so the media server process can read all files. On Synology or TrueNAS, this usually means making sure the SMB user has read access to the share. On Linux, ensure the mount uses the UID/GID of the user running Plex or Jellyfin. Write permission is only needed if you want the server to delete or manage files directly.

Common Pitfalls

Mixing movies and TV shows in one directory. I’ve seen this more than anything else. The server picks one scanner for the library, and half your content gets misidentified. Just split them.

Flat directory structures. Dumping 500 movie files into a single folder with no subfolders might seem simpler, but it breaks extras detection, makes subtitle pairing unreliable, and slows down library scans significantly on spinning disks.

Special characters in folder names. Colons are the usual offender. Windows doesn’t allow : in file names, so a movie like Mission: Impossible needs to become Mission - Impossible (1996) if your NAS runs SMB. Plex and Jellyfin handle the title mapping fine as long as the year is present. Also watch out for trailing periods and leading spaces — NTFS and SMB silently strip them.

Season 00 for specials. Both Plex and Jellyfin expect specials (behind-the-scenes, OVAs, etc. that are listed as standalone episodes on TheTVDB) in a Season 00 folder, not mixed into regular seasons. Omitting this leads to phantom episodes in your library.

Making This Work Across All Three Servers

The structure I’ve described works with Plex, Jellyfin, and Emby simultaneously pointed at the same directories. I run Jellyfin and Plex against the same NAS share and have never had a conflict. The key is that all three follow the same fundamental naming conventions: Name (Year) for folders, SXXEXX for episodes, and language-coded subtitle files.

The only divergence is in how they handle metadata storage. Plex writes metadata to its own application database, Jellyfin can optionally write .nfo files alongside the media, and Emby does the same. These sidecar files don’t interfere with each other or with the servers’ scanners.

Automating the Structure with GMS

Renaming hundreds of files by hand to match this structure is tedious and error-prone. This is exactly the kind of problem Grand Media Station was built to solve. GMS can batch-rename your media files into the correct folder hierarchy — matching the Movie Name (Year) and Show Name - SXXEXX conventions that Plex, Jellyfin, and Emby expect. Instead of spending a weekend manually restructuring your library, you point GMS at your files and let it handle the naming.

Getting folder structure right is a one-time investment that saves you from metadata headaches for years. Set it up properly now and your library scans will just work.