Transcode to HEVC/x265

I think several different pieces of software are being mixed up here.

H.264 - a.k.a AVC a.k.a. MPEG-4 (part 10) is a commercially licensed software product. It has many patents for which use must be licensed by a company called MPEG LA. You must pay to use it.

x264 - an open source implementation of H.264/MPEG -4/AVC format. It has a license called GPL which makes it free to use for anyone, including commercial purposes.

H.265 - a.k.a. HEVC (High Efficiency Video Coding) is the successor to AVC (H.264). It is proprietary and has patents protecting its use and therefore a license must be purchased from the same company MPEG LA. They typically also charge royalties for its use. However, in 2018 MPEG LA said they would no longer charge royalties. It is still patent encumbered regardless.

x265 - an open source implementation for encoding to HEVC/H.265. It has a GPL license and it free to use by anyone

There is other software often used in the video (Plex) world. These include:

VC-1 - Microsoft, not open source, patented, used in Silverlight, Blu-ray, and HD-DVD (remember those?)
VP9 - Google HEVC competitor, used heavily by Youtube as webm. Open source
AV1 - Google’s next attempt to compete with HEVC. Formed a large consortium of very serious companies. Heavily derived from the VP10 codec (which is dead) Open source, patent free, royalty free.

18 Likes

Agreed.

That’s why I specifically mentioned the X. version because it’s free to use. This gets even cloudier for consumers when they use hardware/GPU to do conversions and transcoding since the algorithms are built into the hardware.

3 Likes

This seems like it should already be implemented. There are plenty of devices that support x265 and the benefits in investing in it are substantial.
Reduced bandwidth, not everyone has great internet, lots people don’t…
Reduced disk space while maintaining quality!
Being able to offer a cheap, premium piece of software that can easily transcode to x265.

Please implement this!

1 Like

Reduced disk space isn’t a benefit per say for transcoding to x265. That would be a benefit of STORING the files in this format and serving them up as direct play x265 which you can do already. Then if a client doesn’t support x265 it can be transcoded back to x264.

This is what I do.

5 Likes

I originally started converting my originals to HEVC, but I changed my mind: I was realizing that I was keeping a copy of all originals anyway (so I never have to re-rip), and I may as well just have them online, residing on a NAS where I can direct-play everything at original quality at home.

I still regularly use HEVC though. Hardware acceleration is a snap for those, which means the CPU concern is gone. The main reasons I convert a file to HEVC:

  1. The frame rate is incorrect on the original copy. This almost always means it’s a DVD of a film, or a filmed TV show (aka almost all of them). Those go through a detelecine to 23.976 fps, and I may as well use HEVC to save some disk space.
  2. The movie has forced subtitles (aka translations for non-English dialogue). Those are so unreliable on Plex depending on the client being used. It’s usually easier to just hardcode the captions at 1080p on HEVC via Handbrake.
  3. The disk space just doesn’t make sense. I have a few TV series on Blu-Ray that are simply overwhelming in size (1 TB!), but I just don’t watch them enough to justify that disk outlay. Those get encoded to 720p HEVC.

I still keep the originals of those files too, but usually on an offline external hard drive.

Long time ago I used to keep “rips” of DVD and Blu-Rays but I no longer do this.
I don’t see the point of “wasting space” storing the originals when I have them on disc. I NEVER actually play them back from the rip but only from the converted file format (x264/x265) so why keep the pure rips around?

I can rip them from disc pretty fast if I ever want to re-encode them in the future. I can certainly rip much faster using one optical drive, then 4 computers can keep up converting them them to x265.

I like pure CPU conversions as these so far are always better then HW transcoding so that is what I do.

I’ve got 15K+ movies and 70K+ tv show episodes on my system and available to play back via any platform client.

If the videos I have are good enough for me viewing on my 75" Samsung then will look good to my users as well.

My biggest “issue” is much of the content I have just isn’t available at better qualities. I like a lot of old movies and tv shows. Take for example MASH. No matter what you do it’s still going to be SD content as it’s just not available in HD (any format). I have a ton of movies and shows like this that I’ll likely never get better versions.

So why hold RIPs in storage of something I’ve already converted to x265? I can’t tell the quality difference of the rip vs x265 version so why keep the original? If anything the studio would RE-PUBLISH these works on BR or some other format and any rips would be meaningless as I’d want to purchase and reconvert the new media.

2 Likes

Understandable. For me, we have hardwired devices in the house, so I can usually play back original MPEG2 or AVC directly as long as the frame rate is proper. I also have a couple extra hard drives that are offline and otherwise wasting away due to smaller (2TB) size, so there’s no real “lost space” for me. It’s handy to have that copy, then store my discs away in a less-accessible location.

Absolutely. Pre-encoding is always preferred because you can dial in the quality and encode in slower-than-real-time, which of course calls back to the original topic of this thread. My current PMS is Kaby Lake, though, and on the rare times I need to use transcoding (mobile connection), quality is basically transparent, or at least falls under the “good enough to not be noticeable” state, which is similar to the state of the HEVC files you referred to.

It’s one of the reasons I’m not quite as stressed about Plex offering HEVC. It would be nice, but primarily at a quality-per-bit improvement for slow connections. At the connection level I’m thinking of, typical pre-encoded HEVC 1080p would still be too high of a bit rate.

This is a problem for me too. You know what’s extra-annoying? A show that is only available in SD, but that I have absolutely seen broadcast in proper HD at some point in the past. So frustrating.

BTW, good conversation. While we each handle things differently due to personal preferences, we both get very acceptable results. I love that.

1 Like

Yes good conversation. :slight_smile:
I some times get lucky and will find something broadcast that is better then my original DVD rip. Not often but occasionally. I’ll take it in 16:9 and 720 or 1080 over DVD even with a channel logo.

There are a few older shows that were very popular back in the day that I’d love to get as a complete series in HD or better. M.A.S.H. is a perfect example. It’s still aired to this day on TV but always in 4:3 (at least I’ve never seen it in 16:9). I could name a bunch but that’s surely one that everyone is familiar with. There are many long running shows like ER that would be fantastic to get 16:9 HD or better versions.

Maybe some day!

1 Like

+1
This feature should have absolute priority, since most devices bought 1-2 years ago support HEVC natively.
Cut the bandwidth to half for same quality is a deal breaker nowadays.
All other geeky stuff Plex Inc. announced the past year will not have such impact on everyday user experience.

Galaxy Tab A (2016) even supports hevc, just not 10bit so…

My ffmpeg windows script/batch file for nvenc / cuvid:

@echo off
for /f %%i in ('c:\ffmpeg\ffprobe -v error -select_streams v:0 -show_entries stream^=width -of default^=nw^=1:nk^=1 %1') do set /A w=%%i
for /f %%i in ('c:\ffmpeg\ffprobe -v error -select_streams v:0 -show_entries stream^=height -of default^=nw^=1:nk^=1 %1') do set /A h=%%i
for /f %%i in ('c:\ffmpeg\ffprobe -v error -select_streams v:0 -show_entries stream^=codec_name -of default^=noprint_wrappers^=1:nokey^=1 %1') do set c=%%i

echo Source Dimensions: %w%x%h%
echo Source Codec: %c%
set /A dw = %w% * 2
set /A nh = %h% * 1920 / %dw% * 2
echo Output Dimensions: 1920%nh%
echo Output Codec: hevc main
echo Output Video Bitrate: ~2Mbps
echo Output Audio: AAC Stereo 128kbps

if %w% == 1920 (
    set rscmd=
) else (
    set rscmd= -resize 1920%nh%
)

c:\ffmpeg\ffmpeg -vstats -vstats_file "%~n1_1080_cq_22-29.log" -hwaccel cuvid -c:v %c%_cuvid%rscmd% -i %1 -c:v hevc_nvenc -profile:v main -preset:v slow -rc:v vbr_hq -qmin 23 -qmax 30 -b:v 2M -maxrate:v 4M -rc-lookahead:v 32 -c:a aac -ac:a 2 -b:a 128k -y "%~n1-cuvid_autoscale_1080p_hevc_cq22-29%~x1"

pause

Will drop a 2Mbit version in the source file directory.

Still a work in progress - note that there is a bug in the nvenc pipeline that causes a main10 -> main hevc transcode to fail. This can be fixed but pixel format must be converted in software.

I also have a true 2-pass nvenc script in the works - stay tuned.

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

I agree. HEVC support should be added at the very least for GPU enabled systems.

A couple of points though. It’s only really worth GPU encoding if you have one of the later GPU’s that support things like 10bit encoding.

Where it really shines is if for instance you are on the road and want to use a lower bandwidth setting. HEVC with a decent GPU encoder will be FAR better than H.264. Now granted not THAT many devices support native hardware H.265/HEVC support, but many can decode just fine in software.

If Plex supported it, I’d go out and upgrade my GPU now.

6 Likes

Intel cpus with integrated graphics have supported HEVC 10bit HEVC encoding in hardware for 3-4 years now, since kaby lake and maybe even Skylake (partially I think). This needs to happen.

3 Likes

A single HEVC stream maxes out my 8-core Xeon. You will be able to use your server to heat your home in the winter! :slight_smile:
As long as Plex gives us control to prevent this from happening if they implement this, cool. But it wouldn’t be prudent to software encode to HEVC for quality, imo. It’s like mining for crypto but the payoff is better looking video over DSL.

It is time to give users the choice. It is time for HEVC h.265.
Plex Team? Can you hear your customers?

5 Likes

Emby can do it now. Fully functional in beta. Then again they always had hardware encoding/decoding on linux like 9 months before Plex did. Come on plex keep up with the 2 man dev team.

3 Likes

Since Plex uses FFMpeg for transcoding it should be no problem to use h265 hardware transcoding since FFMpeg support it for quite a while.

Only the transcoding profiles could take a while but there are many options out there are where you can can look at how is has to be done.

So there should be no excuse not doing this.

P.S. recently there was an update for Plex upgrading support for FFMpeg transcoding for Linux based devices. So there should already be all needed for hardwarebase transcoding of h265.

Greetings
Dark

3 Likes

I would love it if plex supported this!

1 Like

I have all of my videos encoded as x265, it freed up a couple terabytes. VLC plays then just fine but I need plex to direct stream and not transcode

1 Like