I have a collection of about ~110 4K Blu-Ray movies that I’ve ripped and I want to take the time to compress and store them for use on a future Jellyfin server.
I know some very basics about ffmpeg
and general codec information, but I have a very specific set of goals in mind I’m hoping someone could point me in the right direction with:
- Smaller file size (obviously)
- Image quality good enough that I cannot spot the difference, even on a high-end TV or projector
- Preserved audio
- Preserved HDR metadata
In a perfect world, I would love to be able to convert the proprietary HDR into an open standard, and the Dolby Atmos audio into an open standard, but a good compromise is this.
Assuming that I have the hardware necessary to do the initial encoding, and my server will be powerful enough for transcoding in that format, any tips or pointers?
Consider online file converters. Just pay for a month or two, obviously need a good internet connection.
Are those your own blurays? Then share them before compressing.
Transcoding is hard. There is no way that your transcoding settings are going to be a one size fits all. I am currently encoding the famous iKaos Dragonball release and I did 48 samples before deciding what configuration to use.
You are better off downloading stuff from torrent, especially for newer media. You’ll find a community that put 100x your time collectively on transcoding. That will also save from your tremendous electricity costs.
Also look into vmaf for quality metrics. Consider that switching to uncompressed 1080 might bring you close to your goal with very very low effort.
Btw, can you share the title list?
Yeah, sure thing.
Abominable
Ad Astra
Aladdin (Live Action)
Aladdin
Alien - Covenant
Alien
Ant-Man and the Wasp
Ant-Man
Aquaman
Arrival
Austin Powers In Goldmember
Austin Powers - International Man of Mystery
Austin Powers - The Spy Who Shagged Me
Avengers - Endgame
Avengers - Infinity War
Baby Driver
Batman and Robin
Batman Forever
Batman
Batman Returns
Big Hero 6
Black Panther
Bohemian Rhapsody
Brave
Captain Amercia - Civil War
Captain America - The First Avenger
Captain America - The Winter Soldier
Captain Marvel (2019)
Cars 2
Cars 3
Cars
Cinderella (Live Action)
Close Encounters of the Third Kind 40th Anniversary Edition
Deadpool 2
Deadpool
Detective Pikachu
Doctor Sleep
Doctor Strange
Everything Everywhere All At Once
Fantastic Beasts - The Crimes of Grindelwald
Finding Dory
Finding Nemo
First Man
From Up on Poppy Hill
Frozen II
Frozen
Gemini Man
Godzilla (1998)
Godzilla - King of the Monsters
Gremlins
Guardians of the Galaxy Vol 1
Guardians of the Galaxy Vol 2
Halloween
Harry Potter and the Chamber of Secrets
Harry Potter and the Deathly Hallows - Part 1
Harry Potter and the Deathly Hallows - Part 2
Harry Potter and the Goblet of Fire
Harry Potter and the Half-Blood Prince
Harry Potter and the Order of the Phoenix
Harry Potter and the Prisoner of Azkaban
Harry Potter and the Sorcerer's Stone
Howl's Moving Castle
Incredibles 2
Incredibles
Inside Out
Interstellar
Iron Man 2
Iron Man 3
Iron Man
IT (2018)
John Wick 3 - Parabellum
John Wick - Chapter 2
John Wick
Joker (2019)
Jumanji (1995)
Jurassic Park III
Jurassic Park
Jurassic Park - The Lost World
Jurassic World - Fallen Kingdom
Jurassic World
Kiki's Delivery Service
Kingsman - The Golden Circle
Kingsman - The Secret Service
Logan
Maleficent - Mistress of Evil
Maleficent
Mary Poppins Returns
Moana
Monsters, Inc
Monsters University
My Neighbor Totoro
Pacific Rim Uprising
Paprika
Ponyo
Ratatouille
Robin Hood
Spider-Man - Homecoming
Spider-Man - Into the Spider-Verse
Spirited Away
Starship Troopers
Star Trek - Beyond
Star Trek - Into Darkness
Star Trek (2009)
Tangled
The Cat Returns
The Expendables 2
The Expendables 3
The Expendables
The Good Dinosaur
The Hulk
The Jungle Book
The Karate Kid (1984)
The Lion King (Live Action)
The Lion King
The Little Mermaid
The Matrix
The Matrix - Reloaded
The Matrix - Revolutions
The Predator
The Princess and the Frog
The Secret Life of Pets 2
The Secret World of Arrietty
The Shining
The Wizard of Oz
Thor
Thor - The Dark World
Toy Story 2
Toy Story 3
Toy Story 4
Toy Story
Turning Red
Up
Us
Venom (2018)
Wall-E
Waterworld (2019)
Wonder Woman
Wreck-It Ralph
Zootopia
oh hey I’ve actually done this recently so a lot of this is fresh for me. Now I had a slightly different use case than you, I had a bunch of AV1 files that wouldn’t run on my pi so I had to convert them to something less GPU intensive. I was finding x265 was indistinguishable for me from AV1, and had a HUGE file size drop, close to a half or even a third. x264 had a larger file size than 265 and looked worse so I don’t recommend it. I did not try VP9 once I was satisfied with 265 but you could try it out and see how it compares. My recommendation is to pick one (shorter) file and run a couple of different transforms on it till you’re satisfied before trying to transform your entire library
Preserving audio and metadata is trivial, just use -c:a copy for audio and -c:d copy for metadata
EDIT: I feel dishonest not mentioning the important caveats regarding my own experiments. My files were 1080p, so the difference between codecs might be less noticeable at that resolution. It was also anime, which is similarly going to be easier to compress and be less distinct between codecs. This is why I cannot recommend x264 because if you can ruin 1080p anime it’ll ruin whatever you’re working with. This is why I recommend picking a sample video and spend a day running a couple test transformations on it to see what you like
Skipping the audio encode from a blu-ray will lose op out on a surprisingly large amount of space, especially with 110 source disks. I checked one of my two hour blu-ray backups. Audio will net you about nine audio tracks (english, french, etc). A single 5.1 448kbs audio track will take about 380MB of space per movie. Multiply that by nine (the number of different tracks in my sample choice) and you’ll get 3420MB per disk. That means about 376GB of space is used on audio alone for ops collection. A third of a terabyte. You can save a lot of space by cutting out the languages you don’t need, and also by compressing that source audio to ogg or similar.
By running the following ffmpeg command;
ffmpeg -i out-audio.ac3 -codec:a libvorbis -qscale:a 3 small-audio.ogv
I got my 382MB source audio track down to 200MB. Combine that with only keeping the language you need, and you end up dropping from 376GB down to 22GB total.
You can likely save even more space by skimping on subtitles. They’re stored as images, so they take up a chunk of space too.
Since you’re talking about anime, how did you solve the subtitles problem? My pi doesn’t transcode fast enough but I haven’t found a tdarr extension to do that automatically (nor a command)
Just FYI, despite what media companies would like you to believe, making copies of media you own for your own use is not piracy. It’s allowed by law under fair use.
Mhm, I’m aware. I just figured the nice folks here would likely have more experience with codecs and such than elsewhere!
(That, and, if I can build my own replacement Disney+, I would definitely want to share with friends.)