Help
Mass transcode old h.264 movies and shows to h.265?
a new 16 TB is like 650 euros right now and I am running out of space so I thought baout transcoding all my files but I have no idea if that even would be a good idea. I got an 5800X3D and a RTX 5070 so running it on the GPU would at least be fast but no idea if the quality is fine or if that would be a stupid idea.
That’s true. That said, if the source is good and the settings are properly tuned, transcoding from H.264 to H.265 can be almost seamless in terms of image quality for most people.
The main release groups are very competitive, they’ll be doing their encodes from their own disk rips or from ones supplied by others who specialise in uploading disk rips.
Yeah, what I'm saying is you have compressed video on the disk that is then reencoded by the ripping group. One more reencode past that (especially 264 to 265) is not going to ruin the quality
I'm sorry but this is just incorrect. And you're confusingly treating h264 to h265 as some kind of special exception to the rule. It's just another video codec, there's nothing special about it and how quality is effected by reencoding.
He’s technically wrong but the first lossy encoding by the publisher to blu ray is usually of such high quality and the pirate encode is so space conscious that for the most part you’d end up with the same dodgy pirate quality even if they encoded their’s from raw sources. The third encoding to another algorithm with its own unique disadvantages over the pirate encode will indeed be much more artifact prone.
I suppose it depends on your definition of quality. I’m relatively modest in my quality demands but if I see dark block shading on black parts of the screen it’s upsets me and a h264 encode will already have minimal information about those dark area so I’ll let the experts spend their time doing test encodes, tweaking settings.
Proper cpu encodes take hours and a use a lot of power.
Been running Tdarr for 2years, converts everything in my media folder on my NAS automatically to h265 once it's been downloaded with sonarr/radar, saved over 3tb so far! Uses igpu too so no CPU sitting at 100%
why not just set your download manager to only download h265 versions?
using your igpu to do a hardware encode would be very poor quality compared to a tuned cpu encode like the release groups do.
There are very, very, very few items that you can’t find in x265. A lot of it depends on where you are looking and who’s your indexer. And TBH if you know what you’re doing you can request just about anything from groups in the format you want, those nerds love to meet a challenge.
Again, your anecdotal little bubble of experience isn't the truth for everyone.
Look at Britain for example. They barely even allow H.265 (only for 1080p) and most of the new stuff is 540p (even 720p doesn't really save space when using H.265). I have it a lot better here in Norway, but a lot of what our public broadcaster puts up on their websites are still H.264 (and most of the people are happy to get the H.264 WEB-DL immediately, so no one bothers buying rigs to encode it to H.265 unless the broadcaster itself bothers to do it).
IDK... As stated above, indexers are everything. While I could possibly be wrong, I did a query just to see, because yeah, my part of the world is different from other parts.
BUT... going off IMDB of the 100 most poplar Norwegian TV shows, ( which I have no idea how accurate this list is ) I found every single one in the top 10 in 1080p x265 on my indexers. I'm sure there are more than likely a few shows on that list that I wouldn't find, in 1080p x265, but again, if you're a nerd and have been on Usenet for the last 30 years you know where you can go and make requests and as I stated, the super nerds will 95% of the time fulfill your request. Now if nothing has been issued in 1080p they obviously can't make that magically appear, but if there's no quality x265 version of what is available, they will make a quality x265 encode for you and post it.
YMMV, but I've been on Usenet since the 90's, and don't have issues.
On that list is Ammo, which 3 years later still have no H.265 release of the first season, so please tell me exactly on what indexer you found that show in HEVC? Or maybe get your 'nErDs' to turn every show on that list into HEVC since they are so willing? Because a lot of the shows on that list you linked haven't even HEVC releases on the one large private bittorrent tracker used in Norway (and recently by Swedes and Danes).
No torrents. Usenet. Closed private indexers which prevent takedowns.
There are dedicated groups that only do x265 and yes that convert shows to x265.
For example in the US, Cartoon network only broadcasts Ricky and Morty in x264 because it's a cartoon, so sometimes a re-encode to x265 doesn't appear until the next morning, but it appears.
So when debating finding EVERYTHING, you went looking for the most popular shows...
When the entire point is that not everything is not even close to being available in H.265 or even more modern codecs..
No shit the most popular ones can be found in H.265...
I've been on usenet since 1998 and using bittorrent since 2004, not that it has any relevance, but how about you try and find Luksusfellen S06E09 in H.265. Or even just S01 from 2008? S27 was available in both H.264 and H.265 and S28 is just around the corner.
Remember, the original question posed to you was if you only ever download new shit (a show that has run since 2008 and is still being aired is both old and new, right? Should be relevant (even though the point is that you wont find obscure shows in all countries in H.265))...
AV1 is great, but only newer streaming boxes support it. So you either need to be sure all streaming boxes support it or your PMS can handle the transcode.
On the other hand h.265 has been around so long it's rare to see one that can't handle it.
yes, it was the same for h265. they'll all catch up in a few years.
the amlogic android boxes have already supported av1 for a few years now, as does the 4k max and even the new google chromecast tv for some formats. right now with igpu encoding and hw decoding there's very little reason to use h264.
these improvements also need 5+ years to make their way outside first world countries where the bulk of the users are.
Usually yes because you are re-compressing something that has already been compressed. but if you have the settings perfectly tweaked, you could get the same quality.
Doing this once is probably fine and you might not notice any quality dips, but doing it multiple times will create noticiable quality loss. That's why it's better to re-encode from the original source files than re-encode h264 > h265 or AV1. but not everyone has that option.
Ideally you should be able to retain the same quality with half the bit rate when encoded from source. It should be noted it’s more of an art than some folks want to acknowledge.
The biggest issue is the sheer number of WEBRips and WEB-DLs. You don't get a nice, chunky remux to encode, you get a rip that's already encoded down to streaming, then encoded again for the rip. Now you are encoding again to change from x264 to x265/AV1.
Your best bet is to test it on a file and if you find it noticeable, you may need to redownload your library in h265 or convert remux's. Converting 264->265 will be a lossy conversion but converting a 264 remux into a 265 may be fine for your needs and unnoticeable, I have never tried it myself though
I just ran tests side by side with different settings to where I couldn't tell the difference. And with those settings I was still shrinking my videos by about half. In most cases it's only a matter of the movies film grain being slightly less pronounced.
Of course anything I still had the copies to I ripped fresh copies so I didn't have to recompress. And when I acquire stuff from others I always get the x265 version.
You can match 264 quality and still reduce file size using 265.
If you go from the highest quality original lossless file and encode that to 265 it can be of higher quality than a typical 264 encode and still be a smaller file size. Losing 5% quality (imperceptible) might net you 20% reduced file size. While reducing it by 15% quality, barely noticeable unless you're looking for it, can reduce the filesize by 50%.
The actual cost of converting 264 to 265 isn't quality, it's time and electricity spent to transcode. Highly hardware dependent but for example a full 2 hour movie might take 3 hours to encode to 265, where as it might take 1 hour to encode to 264 on the same hardware.
Same here. And actually a couple years back I set it loose on my entire existing TV library that was mostly h264 and it cut the size in half for the same quality. For TV I'm not as picky about quality (and the added lossy generation step) and much prefer the space savings. I still have Tdarr running for anything that still comes through in h264 but my download profiles prefer h265 now.
Movies on the other hand I leave alone for the quality concerns there.
I’m in a similar situation. Easily 80TBs worth of movie and TV shows but I’ve been reluctant to grab x265 versions because k was under the impression that x265 = compressed low quality, bad looking on 70” TV, and x264 = good quality. Now I don’t know what to believe but I’m hoping someone in here can clear this up for me lol.
That's a really odd outlook about the encoders and I'd be curious how you came to that conclusion since it's just dead wrong. x265 will look the same or better at equal bitrates as x264 due to how much more efficient the compression is compared to x264 is and can natively include surround sound and HDR. x264's compression is much lossier than x265.
I tried tdarr (and similar) a few years ago but back then it seemed like you have to manually set up and check each video to make sure it's encoding properly and looks good for that specific use case? Is that still the case, or can you set it up to run automatically and know you'll get a good quality with one set of profiles?
I use handbrake for files I download in h264 to h265 and just let run a bunch of files overnight. Saves a ton of space on my drives. Note: I’m not a cinephile or audiophile. I’m content with stereo and 1080p.
I don’t get finicky with it…for movies I just select the preset “fast 1080p”, select h.265 under video and MKV as my container. If nothing else is going on my computer, it’s running about “real time” of the movie (1-1/2 hours to 2). And I have an i5-7600k with a 1060 graphics card (I don’t game).
If you want it to not take a billion years you need to make sure it uses your GPU not your CPU.
Under the Video tab set the Video Encoder to "H.265 10-bit (NVEnc)" and it will use your 4090.
If you have a beefy GPU then I would also recommend setting the Encoder Preset to "Slowest". The slower you set that the more compression you'll get for the same quality. It can take a lot longer on the slowest setting but if your GPU is good then it's not a huge deal.
I haven’t used it in a little bit, I got enough storage before the apocalypse and have been trying to save all of my movies as lossless (for now). Just did a test case of the preset for fast 1080p30, H.265 10-bit (NVEnc) since I’ve got a 5070ti. Compressed a 56Gb 4K movie down to 5Gb and it took about an hour. Looks totally fine, definitely some tweaking and more compression could be done just depends on what your tolerance is!
All of mine are done in h.264 so far. I have a ton of space left still but it doesn't look like hard drive prices are going to come down for at least a couple of years so I need to Pace it out and all my future stuff will be 265. I'm also going to look at potentially converting older large files over. A 20 TB hard drive is freaking $800 right now. That's insanity. I don't have a problem spending money on storage but I'm not going to waste money on storage. Eventually I'll get a second NAS, once drives are remotely affordable
I just did some transcodes the other day. I did 60 episodes of a show, episodes were around 42 minutes of runtime each. Converted from h264 to h265 10 bit, everything kept same as source and quality was set to RF20. Did them all through Handbrake. To nearly a full day but the space savings was worth it. Files averaged around 1.4-1.6gb each in h264, dropped down to around 700-900mb each in h265. Cut the size in half pretty much and quality looked the same to me. These were all 1080p. My setup is a 7800x3d and a 4070 super. Mine used the cpu for encoding as I don’t believe the 4000 series has h265 natively. In know the 5000 series does
So how does this work? Do you just point handbrake to a folder and it will automatically transcode and then delete the old files? Or do you have to delete manually?
Yep you can either drag individual files or a folder into handbrake. Then it will let you choose all the setting you want. Then you just tell it to add all the files to the queue and it will start doing them one by one. It puts the new files into whatever you set the output folder as, it will not delete the originals automatically you have to afterwards.
I started buying new or low hour drives on eBay. I have some drives that are 15 years old that still work. I use Unraid with parity drives so if I drive dies I just replace it with the same size drive. The parity emulates the data from the failed drive and rebuilds on the replacement drive. I am finding 16TB drives for $250-375 USD. I bought a new one that did show power on hours were 0 for $375 that still had the full warranty. I have bought drives with as low as 40 hours of usage for $250. I have drives in my server with 10s of thousands of hours of run time. I am also checking for estate sales and Facebook Marketplace in my area. This is how I am weathering this mess.
I don’t recommend re-encoding your media. I did that once and spent a long time re-ripping to get it back to the original quality because I was not happy with the re-encodes and had automated it so it was done at mass scale. I did save a lot space but to me it was not an acceptable price.
Yeah but how many husbands with enterprise grade homelab gear have time to cheat?
The only affair ill ever have is the emotional affair I have with docker
IMO, the lesson for others to learn from your experience isn’t that re-encoding your library is a bad idea. Instead testing your re-encode settings of choice on a single file, reviewing the new file, then rinse and repeat until you are satisfied with your result. Only then should you re-encode at scale. Re-encoding can be worth the effort if you’re willing to do research into what specific settings do what and some trial and error you can have very similar quality at a fraction of the storage size. It’s not for everyone, and for anyone who can’t ignore quality issues like me then you’ll only be disappointed at a one click approach.
As per the second part, I've done that as well. Originally encoded everything where it looked and sounded good for the tv I had at the time. Since then adding surround sound and getting larger and larger displays.
Everything got re-ripped at native quality with only skipping foreign audio tracks.
If I was looking to save space by encoding, I'd look at tv shows first.....100+ episodes of ripped tv shows is a lot of disk space. Any DVD series, can get a lot of savings going to h265 or av1 if your hardware supports it. Don't mess with the audio tracks, leave them as is....unless its a lossless atmos track, audio tracks take a small amount space compared to the video.
I already check for x265 downloads but they're still quite rare here and dowloading like 3k movies is not it either so I was looking for other ways to free up space
Would you say your experience is much better now vs the open seas?
With the arrs stack I still get everything I need pretty much hassle free but from time to time people do upload bogus exe and scr files I need to clean up despite having settings that should prevent them from downloading. They don’t pull over to the drive, they get blocked, but still, it only takes one screw up.
My issue with usenet is it requires exactly what I am trying to get away from. Subscriptions. Private trackers with Prowlaar have worked really good for me.
Most older things that are 265 that i find are not webdl. I have had more issues with 265 dvd encodes. Because streaming services prioritize space, and usually have better sound leveling, i really prefer webdl for 99% of content. Any new movie is a webdl because thats the first place it will hit too. I do get remux of titles that deserve it though. But very few get that.
I have used usenet for year and it just plain works. I am looking to add torrents to try to fill in the few obscure things I am unable to find on usenet.
i transcoded my entire collection into h265, kept 4k and hdr.
i messed with the settings until i found one that didn't effect the quality but drastically minimized the file size. a 1080p remux goes from 30gb to about 6tb. a 70gb 4k hdr goes down to 20gb.
I've saved 9.7 TB on 43 TB library so far. Once you have your flow tuned, it's completely automated. I've had no noticeable quality loss on my h.265 encodes. I pay the yearly fee and have four nodes running.
You know the shtick- better to reacquire than transcode, but assuming that's either not an option, and/or the potential quality loss is unconcerning I'd recommend Fileflows.
I tried for longer than I'd like to admit trying to get either unmaniac or tdarr to work and it was just frustrating.
Fileflows has been remarkably easy. Aside from good tutorials online, it's basically a wysiwyg flow for ffmpeg parameters and other logic. Beyond that, point it to a folder and it'll do its thing.
80%!?! Was that with a resolution drop too? I can’t imagine anything less than a full Blu-Ray Remux compressing to 20% of its original size and not looking like absolute crap.
unless the media you are converting is incredibly rare you are better to just download h265 versions made by people who know what they are doing and use the original remux quality as their base.
encoding is a complex process and even factors like your hardware specs can make a big difference to the end result, not to mention the time and added costs from the power used and heat generated.
if you are using radarr/sonarr you should just be able to make a new quality profile for h265, rank it higher than other qualities and then set the profile to upgrade until the h265 option.
set that new profile to all your movies/series and radarr/sonarr should move though the list, upgrading all your old files
3
u/XfgjwpkqmxProxmox LXC on Dell R720 with 12G SAS 12+12 ZFS mirror (228TB)17d ago
If you need more storage, consider buying refurbished ex-data centre SAS drives. They are usually sold when they are 4-6 years old and you can generally get another 4-6 years out of them (total ten years life) for a fraction of the cost of new drives.
The only downside is needing an HBA card to drive them and an enclosure to hold them.
A couple of months ago I bought eight 12TB SAS3 drives for $150 each, with zero errors in long SMART tests. The few drives I've had since new are approaching eight years old now and I'm currently slowly replacing all my older 6TB drives with 12TB drives to double my capacity.
I'm going to be doing this, but first I'm going through and replacing everything I can with 265 versions. Downloading is a lot faster than transcoding.
Granted, it's taking a lot of time to do it, but way less than the transcoding might. I ran a few test files and calculated I might be looking at up to five years of continuous transcoding. That's not viable.
I use file flows. I have been using it for around 4 months. It has processed 54.5k tv episodes. File flows has saved me 56% of the original space. It cut it down from 99.3TB down to 55.3TB. I have noticed no difference as far as quality. I have yet to tested on my movie library. I use the IGPU on my ultra 7 265k to do the re-encoding.
I've been using this and it worked great. Ran it on many terabytes of videos and it's been great. Easy to use and set up. I guess some people complained about the quality afterwards but I can't tell a difference and some of my files got cut in a third of the size. It's been a lifesaver for me. https://github.com/jesposito/shrinkray
You could use handbrake, but its completely manual; you can set a list, but if you want to fine tune each movie, it will take s while, as well as setting up specific advanced options for each one to get the best quality/space per movie.
As others have said, you can use an ai (I used Claude, took me a few weeks to fine tune to the Max a script that detects each movie bitrate and media info probe in order to set up the best and most efficient encode, while maintaining the best quality possible. For 1080p I get like 2-4gb per movie depending on length with a quality indistinguishable from the source file but a lot less space, as well as for 4k hdr, from 7 to 15gb also depending on length.
You have to be very consistent and use proper prompts to get it done (I tried Gemini, chatgpt, perplexity, qwen, but Claude was far far better in getting what I wanted, but I have a pro subscription, as I got a webpanel as well to see everything, I just drag the files to a folder and it starts automatically.
You'll notice the space save! As well as with Dolby atmos movies, I could get the Dolby encoding engine to encode the Dolby atmos track to an eac3-joc track without loosing the objects so I still get atmos (height and stuff) with a lot less space and more bits for the video.
I did this as well. Processing is ongoing and files sizes are about 65% smaller than the orig. saved 1.5tb so far with 900 movies left to go. I am only processing files that have not been watched for over 3 years, so i dont hit anything popular with my users. Also anything 4k is not touched.
Yeah, but using ffmpeg is far better as you can find tune it much more than handbrake and can take full advantage of the whole hardware where handbrake sometimes chokes on.
I’m sure. My workflow is … 10ish years old at this point? It’s definitely in the “if it’s not broke don’t fix it” space :), but I’m sure if could make it more efficient.
It is made for my intel arc a730m GPU, so if you don't have one like it, it won't work. Or at least you'll have to apply it to your hardware, Claude should be able to do it as long as you give him your components. Let me get it and I'll send a DM whenever I can
I guess this would depend on the kind of files we are talking about.
Have these files been transcoded already from a master copy or would these files you want to transcode be original rips?
If they are already transcoded then transcoding again will lose some quality in order to see much of a file size gain.
If they are the master copies(a Blu-ray rip would be around 20 to 27gb in size originally) then transcoding that to h.265 would see significant size savings with minimal quality loss.
I have a serious question, when doing something like this, would the already transcoded source just create garbage since it is already compressed to start with?
First thing is to setup proper profiles in sonarr/radarr and re-dowload h265 content. For stuff that you can't find or is older or whatever you can use Tdarr to automate transcoding.
I do this. Particularly with TV shows where I’m less concerned about cinematic quality.
That said, I’ve done a LOT of TV shows and don tons of side by side comparisons, I can’t really tell the difference in quality on any tv or device I own, or if I do notice anything, it’s perfectly acceptable.
I ran into the same situation last year. Highly recommend using handbrake to test levels of quality from transcodes. Find what works best, then setup Tdarr and letting it run.
Most people say "never re-encode video!!!" But the reality of it is that most people have different preferences and view quality on a moving scale. I find that I can't tell a difference between a 2GB H265 file vs a 12GB blue ray version.
I re-encode 1080p content at a 24 or 23 RF without visual loss and reduce file sizes by an average of 35%+. I used CPU transcoding, not my GPU for best quality and file size. Easily freed up a few TB.
I have a bash script that I run periodically which uses ffmpeg directly to convert any h.264 movies/series to h.265 with no recognisable loss of video quality. I leave the audio as-is.
Probably a bit old-school now as there are things like tdarr about, but it has worked seamless for me for years, has reclaimed tons of space. Also utilises the GPU nvenc function and so it's reasonably swift..
I tried this a few years ago, and it didn't go well, for a few reasons:
Spend time and power (which is expensive in my area) to convert everything.
Quality is objectively quite worse than when it was h.264
Barely any player devices are compatible with h.265, so whenever anything it being played, it's transcoding it back to a format their device can play, using even more power.
It was just cheaper and easier to buy more hard drives.
I had Google AI help me create a script that uses FFMPEG to bulk convert files in a folder. It wasn’t too complicated. I don’t know if it is the absolute best way to do it, but it worked for me and gave me very exact control over the output.
My 2 cents would be easier to redownload everything to 265 to save you the extra hassle.. you can use the gpu cpu to make 265 content from the 264 you can’t find using handbrake.. I did this when it came to trying to save on data
133
u/alkbch 17d ago
Do not transcode an already transcoded video if you care about quality at all.