Synology FAQ - Questions, Answers, and How-To's

28. Using Docker for HW trancode & Tone Mapping - How To

WARNING:

This technique is no longer required as of PMS 1.29.1.6240.

PMS 1.29.1.6240 and above installs the needed drivers automatically upon first use

You may now remove the PMS container and image.

=================================================================

OBSOLETE

This How-To (FAQ) will demonstrate how to setup PMS, with HW transcoding and tonemapping support.

Two different methods are presented here
– First method is run via Scheduled Tasks which creates the Tone Mapping configuration
– Second method is for those NAS platforms (ARM based) which do not have HW transcoding capability.

Prerequisite - Get the PlexMediaServer UID/GID information

Get the UID/GID values from DSM 7 for use with PLEX_UID & PLEX_GID

  1. Create a Scheduled Task - User script
  • Run once
  • Email you the output
  • username admin is fine.

Screenshot from 2021-12-14 12-17-17

  1. In the email, you’ll see lines which looks like this:
chuck@ds418:~$ id PlexMediaServer
uid=297536(PlexMediaServer) gid=297536(PlexMediaServer) groups=297536(PlexMediaServer),937(videodriver)
chuck@ds418:~$ 
  1. The first number (297536) is the value for PLEX_UID or PUID.
  2. The second number (297536) is the value for PLEX_GID or PGID.
  3. The numbers shown here may not match your system. Use only those which come from your system only.

Method 1 - Hardware Transcoding + Tone Mapping

  1. A pms-docker container
  2. Which uses the DSM 7 (/PlexMediaServer/AppData structure) shared folders.
  3. And is fully interoperative & non-destructive of the Native app. (you can run either either as you wish.)

A. Create the HW transcoding container

  1. Create a Scheduled Task , User-Script, run as root which creates the new container. Again, have it email you the results to confirm successful creation.

  2. Substitute your actual values in the environment variables where appropriate.

Use “ID” and “GID” pulled from your system PLEX_UID & PLEX_GID
(You may use PUID & PGID for if you wish)

  • Task “Settings” are:
    – Change /volume1/PlexMediaserver to the appropriate volume only if your PlexMediaServer shared folder isn’t on the default /volume1
docker run \
-d \
--name Plex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PUID=297536 \
-e PGID=297536 \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-h dockerplex \
-v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /volume1/PlexMediaServer/AppData/tmp:/tmp \
-v /volume1/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1:/volume1 \
-v /volume2:/volume2 \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

# Set to automatically restart unless stopped
docker update --restart=unless-stopped Plex

B. Run the task to create the container

  1. Run the scheduled task
  2. Check your email to confirm success
  3. Open the Docker app and verify you now have a Docker container.

===========================

Method 2 - Create your new container (ARM processors - No HW transcoding)

A. Define the container in the Docker GUI

  1. Download the pms-inc image
  2. Create the container using these specific settings
  • Volume map: /PlexMediaServer/AppData/config/Library/Application Support

  • Volume map: /PlexMediaServer/AppData/tmp/transcode
    Screenshot from 2021-08-18 22-45-18

  • Environment variable: PLEX_UID and/or PUID = value we obtained above

  • Envirohttps://forums.plex.tv/t/important-information-about-plex-for-smart-tvs-after-september-30-2021/746506nment variable: PLEX_GID and/or PGID = value we obtained above

  • Modify variable: CHANGE_CONFIG_DIR_OWNERSHIP to false
    DSM7-Packaging-2.0-Docker-3

B. Network

  • Set your network. You want to use the Host network - NOT bridged - NOT NAT.

C. Apply the settings to create the container


)

D. Done

That’s it. DSM 7 using the native data without change.

With this configuration, you can stop docker, start native and continue without change.

Please remember – Don’t try to run both at the same time :see_no_evil:

Go to Index