Qnap faq.....read me first!

Q31: HW Transcoding & HDR tone mapping in QTS/QuTS

EDIT: PMS 1.29.2 and above contain native HDR tone mapping support

PMS does not yet include native support for tone mapping in hardware:

For those Intel QTS/QuTS systems with QSV capability (-7xxx or higher, J3455, J4xxx CPU)
Docker Plex provides the workaround.

This FAQ shows how to create a docker container, as a work around, at the command line (a script) which perfectly overlays your existing PMS installation.

  1. Install Container Station and initialize it
  2. SSH into your QNAP as ‘admin’ (an ‘administrative user’ does not have the necessary privileges)
  3. Create a directory anywhere you’d like to hold this script for safe keeping.
  4. Make the script executable
  5. Run the script
  6. Observe as Docker downloads Plex
  7. Open PMS in your web browser
  8. Settings - Server - Transcoder - Show Advanced
  9. Make certain all HW transcoding options are enabled.
  10. SAVE changes

The script:

#!/bin/sh
# author: ChuckPa
#
# Find Container Station 
DOCKER_DIR=$(getcfg -f /etc/config/qpkg.conf container-station Install_path)

# verify installed
if [ "$DOCKER_DIR" = "" ]; then
  echo ERROR:  Container Station not installed.
  exit 1
fi

# Set alias
Docker="$DOCKER_DIR/bin/docker"

# Find Plex
PLEX_DIR=$(getcfg -f /etc/config/qpkg.conf PlexMediaServer Install_path)

# Verify Plex installed
if [ "$PLEX_DIR" = "" ]; then
  echo ERROR: Plex not installed.
  exit 1
fi

#  Stop Plex
/etc/init.d/plex.sh stop

# Warn if no HW detected for HW transcoding
[ ! -e "/dev/dri/renderD128" ] &&  echo "WARNING:  NO transcoding hardware found."

# Remove the old container image (prepare to update the image)
echo Stop and remove Plex container
$Docker stop Plex
$Docker rm Plex

# Remove old image if exists
Image="$($Docker images | grep -i Plex | awk '{print $3}')"

if [ "$Image" != "" ]; then

  echo Removing image
  $Docker stop Plex
  $Docker stop Plex
  $Docker rm Plex
  $Docker rmi -f $Image
fi

# Should be both QTS and QuTS compatible as-is

$Docker run \
-d \
--name Plex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=0 \
-e PLEX_GID=0 \
-e PUID=0 \
-e PGID=0 \
-h DockerPlex \
-v ${PLEX_DIR}/Library/:"/config/Library/Application Support" \
-v ${PLEX_DIR}/tmp:/tmp \
-v ${PLEX_DIR}/tmp:/transcode \
-v /share:/share \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

$Docker start Plex
$Docker update --restart=unless-stopped Plex

Running it:

[/share/CACHEDEV2_DATA] # ./DockerPlex 
Stopping Plex Media Server...
Stop and remove Plex container
Error response from daemon: No such container: Plex
Error: No such container: Plex
Unable to find image 'plexinc/pms-docker:plexpass' locally
plexpass: Pulling from plexinc/pms-docker
a70d879fa598: Pull complete 
c4394a92d1f8: Pull complete 
10e6159c56c0: Pull complete 
d1042fe57e96: Pull complete 
ac5317c7b384: Pull complete 
47414e89d67b: Pull complete 
Digest: sha256:8aeb4a982ea564ad309861dd251cd9e218aac3f4e4d3da21375568341be1b16f
Status: Downloaded newer image for plexinc/pms-docker:plexpass
2226b00b1c1ee8afb8335f108f5940a5fa13715fb4941f79ed954f540f4e388d
Plex
Plex
[/share/CACHEDEV2_DATA] #

You may now use container station instead of the native PMS package.

If you wish to update PMS, simply run the script again. Your metadata is not damaged.

DO NOT REMOVE the native Plex package. It will remove your metadata.

DO NOT attempt to use App Center. It is currently bypassed.
Use Container Station to control PMS.

Back to top