HEVC Encoding Forum Preview

Announcing the HEVC (H.265) hardware encoding forum preview! This is a feature that has received a lot of votes over the years and we couldn’t be more excited to start getting some feedback leading up to the general release. If you are wondering what value this provides, HEVC encoding offers a better quality video at the same bit rate, allowing for a higher quality video over the same bandwidth usage for streaming from your Plex Media Server! Additionally, this encoding preserves HDR metadata, which means no tone mapping is required!

This feature is being released as a forum preview for feedback prior to general release. We will be updating the download links below as new builds are issued. Finally, please provide feedback by directly replying to this thread, and exclusively about these changes, off topic posts may be silently removed by forum admins.

Please note the following: HEVC encoding is limited to hardware encoding only, and thus requires a Plex Pass. It can be used for streaming transcoding, DVR recordings (if Tuner settings setup and configured to transcode, see here for more info), and media optimizations. HEVC encoding is supported on macOS, Linux, Windows, and the Shield when using HW encoding with Apple, Intel, or Nvidia devices (device support for 10 bit HEVC encoding is required).

Known Issues:

  • HDR metadata is not properly forwarded on mac servers
  • HDR metadata is not properly forwarded on shield servers
  • Tone mapping is not applied in the case where a client supports HEVC but not HDR
  • DVR recordings result in a large bitrate/filesize
  • DOVI files do not play on android clients
  • DOVI files do not play on android devices when using automatically adjust quality
  • Cannot play HEVC transcodes of liveTV on apple devices
  • Old player on apple devices cannot play HEVC transcodes
  • Android downloads HEVC files when not supported by the device

How it Works:

If your selected transcoding device supports HEVC encoding (see the requirements defined above) you will see these two new preferences. Please note that “Enable HEVC video Encoding” must be enabled before you will see “Enable HEVC Optimization”.

Once you enable the preference you will be able to see HEVC indicated as the target codec for transcodes on your server dashboard. If your dashboard still indicates h.264 please check that your client supports HEVC playback.

`

Before you proceed

The server builds listed below are pre-alpha releases and have not been fully tested so we always advise caution. Make sure you have recent database backups and preferably run these builds independently from your main media server if possible and create new libraries to test pre-release software.

With that out the way…

Downloads (Updated 11/21/2024)

Desktop Platforms

NAS Devices

22 Likes

Hi Chris!

It does not look like this release is properly passing on HDR metadata HEVC transcodes. I’m seeing a washed out picture on iOS with the 8.41 beta when transcoding UHD media to 1080p HEVC.

Server is running on Mac Mini M2 Pro. Let me know if you need logs/etc.

Thanks!

I’ll take a look! thanks!

1 Like

@dklein is this limited to when you have HEVC encoding enabled? Also, which version of which client are you seeing this on?

Hi Chris,

This is iOS Client 8.41 (9333)… looks like it is a client side issue as disabling HEVC and reverting to H264 transcode has the same issue. Want me to log that back in the AppleTV/iOS beta thread?

1 Like

I would appreciate that!

1 Like

Found an issue with playback on Android with Automatically Adjust Quality enabled. In this case, I end up getting a pretty garbled screen. When I disable “Automatically Adjust Quality”, HEVC playback works as expected, though with the data stream being SDR rather than preserving HDR metadata.

Disabled HEVC video Encoding, and x264 encoding worked with “Automatically Adjust Quality” enabled.

Android client 10.22.0.1536 (f4d056a4). Example of the garbling:

@neoeinstein what OS is your server running on?

Is there a tag for the plexinc docker image?

4 Likes

Interestingly, my Dolby Vision test file (found at Downloads Page - Demolandia ) does appear to safely tone map to SDR. It is profile 4 in TS container.

Ubuntu 24.04.1 LTS, kernel 6.8.0-44, x86-64

@neoeinstein why do you say its transcoding to SDR instead of preserving HDR?

@dklein can you send me your server logs of it not preserving the metadata?

Turns out I was wrong about that, and it’s probably an issue with the reporting tool (Tautulli) reporting SDR. When I went in and manually ran ffprobe on the transcode session, I see Main 10, bt2020, and DOVI side data.

Example command with output:

$ cat "/tmp/plexmediaserver/Transcode/Sessions/plex-transcode-55406e9250c6872c-com-plexapp-android-ee9bf900-b76e-41b3-b663-56d283583cc4/header" "/tmp/plexmediaserver/Transcode/Sessions/plex-transcode-55406e9250c6872c-com-plexapp-android-ee9bf900-b76e-41b3-b663-56d2835
83cc4/media-00000.ts" | ffprobe -

ffprobe version 6.1.1-3ubuntu5+esm2 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  configuration: --prefix=/usr --extra-version=3ubuntu5+esm2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, matroska,webm, from 'fd:':
  Metadata:
    ENCODER         : Lavf59.20.101
  Duration: N/A, start: 9.986000, bitrate: N/A
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn
    Metadata:
      ENCODER         : Lavc59.25.100 hevc_vaapi
    Side data:
      DOVI configuration record: version: 1.0, profile: 8, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 1
  Stream #0:1(eng): Audio: opus, 48000 Hz, 5.1, fltp
    Metadata:
      ENCODER         : Lavc59.25.100 libopus

The garbling issue for Android automatic quality still stands, but otherwise ignore me on the HDR side; that looks fine!

1 Like

Already filed an issue with the android team about “Automatically Adjust Quality”

1 Like

Hi Chris, here are the logs.

Playback clients were iOS and macOS Plex HTPC

Plex Server Logs

Same here, is there a docker tag available for such release ?

2 Likes

@Benoitvinc @Menel As far as I know we only get docker tags when it makes it to a beta build.

Got it ! I really wanted to test this feature out , but it looks like I’ll have to wait ! Thank you