Transcoding anything >720p is painful.
I run ancient hardware for desktop/laptop >10yrs old apple stuff running linux. I consume media mainly via rpi4 or android.
What’s a minimum level system capable of trans-coding 4k video to x265 in at the very least real time? Is there a tiny trans-coding device out there somewhere?
Would a NUC do? How old or new to churn out 4k x265
Can I avoid hardware? Are cloud gpu’s a thing?
What are you transcoding from, and what is your reason for wanting to do this? It might not be worth th effort. Lossy to lossy transcoding is already not ideal, and hardware encorders end up trading either size or quality in exchange for speed. I’ve played with NVENC h.265 a lot and found the end results weren’t really any smaller than what x264 gives me for similar quality, so I just use x265 and deel with the slower encodes.
It may be cheaper to just buy more storage.
Seconded, depending on what your goals are with transcoding, you might want to reconsider your strategy.
Hardware encoding (with a GPU) is mostly useful for realtime transcoding applications like streaming video. There are definitely some caviats that come with the realtime performance, and you’ll find that NVENC encoded video is almost always inferior to the slower equivalent software encoded variants.
So let’s talk codecs: While h.265 might seem like the holy grail, it is way more computationally intensive than h.264 is. In some cases the difference in encoding time will even be as high as 3-5x. Not really worth it if all you’re gaining is a slightly lower filesize.
Your results will vary by the media you’re encoding, by your encoder quality settings, tuning and encoding speed. As a rule of thumb: slower encoding speeds equal more efficiently compressed video (a.k.a. relatively higher quality for lower file size).
Handbrake is my choice of software for encoding video. It includes pretty much everything you could ever want if you’re not looking for niche codecs and exotic video formats.
I find myself mostly using x264 because it is relatively fast and still provides awesome results. My encoding speed is always set to “slow” or “superslow” (not much difference for my setup). I usually set the quality by making use of the preview function in handbrake, which transcodes just a short section of the video which I use for pixel peeping and checking for any major artifacts that would ruin the content. The resulting file also provides an estimate for how large the final transcoded file will be. If you’re happy with the quality setting, you can opt to mess with the encoder tuning. There are different presets for film, animated content and such. I usually do use film tuning if transcoding live-action media.
All this generally leaves me with pretty compact file sizes for 1080p media. And transcoding usually happens at a rate of 60-75 fps depending on the resolution. Going up from “slow” to “medium” improves fps by about 25% and increases file size by about 10%. The ideal balance is up to you.
Advanced tips: try using VMAF (objective video quality analysis algorithm developed by Netflix) to score and compare your different encoding settings. VMAF is neatly integrated into FFMetrics, which is a GUI for FFMpeg and a couple of video analysis algorithms. I also use MPV (open source media player) with FFMpeg command line arguments for playing videos synchronized in a 2x1 or 2x2 matrix. This helps compare the results for quality.
I don’t have anything that can play 4k h264 aside from my phone.
My Rpi4 plays 4k h265 beautifully, so I like h265. Space efficient is just a bonus.
mpv & ffmpeg have been my go to’s for a decade or so…but mpv on the Rpi4 can’t yet manage 4k 2160p afaik, so Kodi it is at the moment.
I investigated AV1 for a bit, which frankly does seem like the future because it can encode to significantly smaller file size vs. 264 and 265. I don’t have a hardware encoder for it (though they exist in the new Intel GPUs), and software encodes are relatively slow even on capable hardware (e.g. Ryzen 7000).
But it’s not worth it at all. The detriments of lossy to lossy + the sheer cost of time (and electricity) to make the change are not worth it. 2TB SSDs are cheaper than 1TB was a year ago, and 8TB mechanical drives for slow storage are even cheaper still. And it isn’t showing any signs of getting more expensive, nor should it.
As the other person said, NUCs and such are able to do transcodes via Intel QuickSync hardware acceleration, it’s not really possible to transcode 4k in realtime on most CPUs without it.
You will need at least an 8th gen Intel processor to do HVEC which is what h265 uses, more info is in this chart on Wikipedia about which generations support which things. Anecdotally, this has worked extremely well for me for a long time, definitely worth it.
Also be aware if you are doing any virtualization you will need to pass the iGPU through to the guest machine.
If time is not a consideration just batch up transcodes with your shitty hardware and nice/renice the process out of the way.
It seems unreasonable with the hardware, even with nice things.
I run Gentoo, with lots of binaries, on my 2011 iMac just fine but encoding HD video on it feels like abuse.
An intel nuc with an IGPU from the last few generations would do it no problem (even a pentium or i3 from the last few generations would be better than what you have by the sounds of it).
Or you can grab a cheap used quadro p600 or gt1050 (minimum model with hardware H265 NVENC support) and use that for transcoding or run an app like tdarr, unmanic or fileflows to convert your library to a direct streamable format in the background.
Why are you even requiring transcode is also something to look at, you should be trying to get your playback devices to play the raw files directly, that means a solid network infrastructure and properly configured software. If they are physically incapable of playing your 4k media then you need to look at upgrading them.
This all applies whether you are running plex, jellyfin, emby or whatever else.
If you want real time transcoding, then a hardware encoder would be best. Intel CPUs have had hardware H.265 encode support for the last 8 years. Intel ARC GPUs have a very good video encoder, but they require system that supports resizable BAR.
If you just want to transcode a large number of videos for storage, get a system with loads of CPU cores and run multiple transcodes in parallel. Software encoders produce higher quality video than hardware encoders.
There are cloud GPUs, but that gets very expensive, very fast. You are much better off buying your own hardware if you need to use it for a longer period of time.
they require system that supports resizable BAR
I don’t think it’s required anymore, but it’s definitely still recommended.
Thanks
What is resizable BAR?
It improves memory access to the GPU, but I don’t believe it’s required for Intel ARC anymore.
thx
Sorry, you need hardware.
If you are doing a ton of encoding, you could even get specialized hardware like amd alevo (spelling?) card which enables you to encode even AV1.
That being said, what are you doing that requires you to encode h.265 on ancient hardware?
I’m using a 2011 imac & 2010 macbook pro as my main devices. I have an rpi4 as a little media center & personal server.
2160p x265 looks great on the pi, 2160p x264 is grim. Encoding 2160p on any of my systems is pain.
Ongoing it would be nice to be able to re-encode the occasional 2160p video faster than a tenth of real time or feeling like I’m overly stressing very old hardware.
Think I may keep an eye out for a 2nd hand nuc, I like small & quiet and I didn’t realize until posting this thread that cpu encoding is preferred to gpu. A nuc would also be nice for some better retro game action than the pi4.
Besides new hardware and windows, here is a tool that will you can sink time into. There is a lot of things to lern.
It’s hard to beat a GPU in HEVC encoding performance. SoC:s have comparable performance to dGPU:s in that regard. A used zen/zen2 laptop might be a cheap and tiny workhorse for the purpose. I have a zen/vega10 matebook 2020 that does 1080p at around 2.5-3x real-time at high quality presets. No doubt it could do 4k at faster presets.
With the hardware in my arsenal I’ve found that AMD>Intel>nVidia, at least quality wise. VideoToolbox on Mac is down there with nVidia, and Apple silicon being pretty slow at it compared to software x265 on the same machine.
NUC should be fine. I have unmanic running in a container on it converting anything I add to folders.
Cloud GPUs are a thing, but they’re very expensive.
it depends, they break even if you run them for many hours a day, but for smaller / quicker workloads they can make a lot of sense
I would recommend trying to rent a vps for just long enough to transcode and using that. It would be way cheaper than buying new hardware.