File Naming and Handbrake Settings - What I Have Learned

I’ve been using Plex for several years now and it’s fabulous. It did, however, take me a bit of time to learn how to convert and name my files to get the best results. I wanted to share what I have learned to hopefully help others get up-to-speed and achieve a better result.

I want to start by saying that my settings are driven by my desire to strike a balance between quality, file size, and streamability (if that is a word). These are not the end-all and of settings, and many will have differing opinions. I’m certainly open to constructive criticism, but please keep in-mind that everyone’s situation is different. I will also refrain from specifying software (other than Handbrake) as opinions vary greatly on what is the “best”. I will keep my examples as simple and generic as possible to avoid bickering over software.

With that said, let’s get into this…

MOVIES

File Naming:
I use the following file naming convention for all of my movie files… It works near-flawlessly:
movie name (year) {tvdb-########}.ext
I pull the movie name and ID (########) from https://thetvdb.com (or IMDB if not on tvdb).

Compression/re-encoding
I have movies in a variety of resolutions. Some are ancient DVDs in 480i/MPEG-2 and some are brand new 4K media. The low-res stuff is easy, store it in the original MPEG2 format. Plex handles that well and streams it nicely, often without re-encoding. For the HD and 4K stuff, I need to strike a balance. I found that any compression of the audio is unacceptable, but slight video compression can save 50-90% in file size. That is a trade-off I am happy to make at this point. Everything is encoded with the HEVC H.265 codec which is superb for lowering bandwidth required for streaming . Audio is set for passthrough on all presets. I use Handbrake to re-encode the files using the following settings:

1080p TV Shows:


1080p Movies:


4K Movies:


For movies in a foreign language I manually select the audio tracks and subtitles where appropriate.

MUSIC

File Naming:
I encountered a number of issues with naming music files. My troubleshooting let me to discover that Plex relies very heavily on the metadata fields. The file name itself is important, but the metadata is where the control comes from. I’m on a Windows machine, so the examples shown below are from Windows Explorer. I am storing all of my music in FLAC format now:
## - song title.flac
Plex seems to like the track number separated from the title by a dash surrounded by spaces. Once you have the file named right, clean up the metadata. There is an abundance of software out there to automate this, but I’m focusing on what needs to be changed, not how to change it en-masse.

Example before cleanup:

The problems here are:

  1. Plex seems to dislike square bracketed text in the file name. Remove all that. You won’t lose it in your library because it’s also in the metadata.
  2. Change the “Album artist” property to the artist name you want it to be organized under in Plex. Take off all the extraneous “feat. XYZ” stuff and anything in square brackets. Like this:

before
Screenshot_20230304_110856

after
Screenshot_20230304_110927

And finally, the result, ready to be published to your Plex music library:

Again, please feel free to make any constructive criticism. I understand that an obvious discrepancy is the use of fast on 4K movies versus slow on 1080p movies seems odd. Again, the settings work well for my environment given the available disk space, processing power and desired result.

I hope this helps.

A follow-up on the audio passthrough. Some movies have their HD audio track in pcm/pcme. Using handbrake, I convert to E-AC3 at the same bitrate. This is on a case-by-case basis because there is no pcm passthrough in Handbrake.

Just one note… if you want to include a hint / reference ID for a movie, stick to IMDb and TMDb – Plex doesn’t use references from TheTVDb for movies!

Beyond that, the general naming incl. hints should be covered in the related support articles for the different types of libraries.
https://support.plex.tv/articles/categories/your-media/

1 Like

E-AC3 is not universally supported among client types. Better use AAC stereo.

With these low quality settings for tv shows, you might as well use hardware transcoding and save a lot of encoding time.

Consider leaving your 1080p or 720p settings to use the 10-bit like you do for 4k

Much of that content is 10-bit and for my money makes the single biggest difference in quality without a significant difference in the resulting file size

Visually I see more of a difference between 8-bit (hvec main) and 10-bit (hvec main 10) than I do even from 720p → 1080p or 1080p → 4k
8_vs_10_bit_395_127_70

8-bit = 16.7 MILLION colors
10-bit = 1.07 BILLION colors

The grass is actually greener

I encode to 10-bit even from an 8-bit source now because I notice it seems to decrease what’s referred to as “compression artifacts”
This is particularly bad in shows that have a lot of dark scenes

solar_system_compression_artifacts_2x

As for movie naming, inputting all those tmdb or imdb id’s manually wouldn’t be something I’m willing to do
If you use this renaming program, it does everything automatically (FREE VERSION)

TV show format
Show Name: ${showTitle} (${showYear}) {tvdb-${showTvdb}}
Season: Season ${seasonNr2}
Episode Name: ${showTitle} (${showYear}) s${seasonNr2}e${episodeNr2} ${episode.title}


Movie format
Folder format: ${title} (${year})
File format ${title} (${year}) {imdb-${imdb}}
1 Like

Great input, and I tend to agree. The 10-bit color seems to make a huge difference. You may have noticed that my settings were designed to preserve more of the original 1080p input than, say, the 4K input. That may sound crazy, because the 4K purists want it 100% uncompressed, but there is a point where I cannot discern the difference. I can realize tremendous benefit in the 4K media even with some compression, over uncompressed 1080p. It’s all baked into the original source… 4K is just better.

Anyway, yeah, I like your recommendation to increase color to 10-bit on my 1080 preset.

Thanks !!!

I went back and forth on that. AAC is very well supported, but I am only concerned with my Plex clients. Plex seems to have great support for E-AC3.

My biggest concern is quality. I guess I fell for the “higher bitrate is better”. That’s partly because I’ve notice some over-modulation and such with AAC up through 640kb. It just get’s “scratchy”.

I also do a secondary AAC track just to be safe. Here’s an example from “The Patriot”:

I see it uses TheTVDb for TV shows but not movies. Oddly, it seems to help resolve matching issues.

I do use {imdb-######} when it fails.

There is a difference between the AAC encoder in Handbrake and the original AAC encoder from Fraunhofer (which is still available in certain ffmpeg builds).
When using this Fraunhofer encoder, I usually get away with 225 kbps stereo AAC for regular TV shows and Anime, and it still sounds more than adequate to these discerning ears.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.