• [6.7.x] Intel iGPU Hardware Transcoding does not work with Plex + Docker


    switch
    • Solved Minor

    Hi,

     

    I've posted this already, but into an incorrect forum where it remained unnoticed. So sorry for the x-post.

     

    Symptoms:

     

    Plex HW transcoding does not work with Docker on unRAID 6.7.x (0 through 2), although it is working fine when downgrading to 6.6.7 without any change in unRAID or Docker container configuration.

     

    go file:

    #!/bin/bash
    #Setup drivers for hardware transcoding in Plex
    modprobe i915
    chmod -R 777 /dev/dri
    #Start the Management Utility
    /usr/local/sbin/emhttp &

     

    syslinux.cfg untouched as i915 support is included OOB for some time now, however during my troubleshooting attempts, I've tried to force i915 support by modifying the aforementioned config file like this (with no effect of course):

     

    label Unraid OS
      menu default
      kernel /bzimage
      append pci=realloc=off initrd=/bzroot i915.alpha_support=1

    /dev/dri is being passed to the Plex docker container as a device and is visible to the container:

     

    root@532cd6092721:/# ls -la /dev/dri
    total 0
    drwxr-xr-x 2 root root        80 Jun 19 11:05 .
    drwxr-xr-x 6 root root       360 Jun 19 11:05 ..
    crw-rw---- 1 root video 226,   0 Jun 19 11:05 card0
    crwxrwxrwx 1   99 users 226, 128 Jun 19 11:05 renderD128

     

    Plex transcoder does appear to see the iGPU device, Plex dashboard shows that a HW transcode session is ongoing, however video keeps buffering and playback is never initiated.

     

    image.png.69113bbeeac7beb273042ec6845c0e7a.png

     

    I've checked Plex log quite extensively and they do IMO confirm what I've stated above - the transcoder sees the iGPU, transcode session starts, but there is no video being output.

     

    Jun 19, 2019 15:38:32.248 [0x15102bbfd700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator vaapi
    Jun 19, 2019 15:38:32.248 [0x15102bbfd700] DEBUG - [Universal] Using local file path instead of URL: /movies/Captain Marvel (2019)/Captain Marvel (2019) - Bluray-1080p.mkv
    Jun 19, 2019 15:38:32.249 [0x15102bbfd700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/streams/181?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
    Jun 19, 2019 15:38:32.249 [0x151093dfe700] DEBUG - Auth: authenticated user 1 as obfuscated
    Jun 19, 2019 15:38:32.249 [0x15102b1f8700] DEBUG - Request: [127.0.0.1:34844 (Loopback)] GET /library/streams/181 (14 live) GZIP Signed-in Token (obfuscated)
    Jun 19, 2019 15:38:32.252 [0x15102b1f8700] DEBUG - Content-Length of /movies/Captain Marvel (2019)/Captain Marvel (2019) - Bluray-1080p.en.srt is 91753.
    Jun 19, 2019 15:38:32.253 [0x151093dfe700] DEBUG - Completed: [127.0.0.1:34844] 200 GET /library/streams/181 (14 live) GZIP 3ms 91753 bytes
    Jun 19, 2019 15:38:32.253 [0x15102bbfd700] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/library/streams/181?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
    Jun 19, 2019 15:38:32.253 [0x15102bbfd700] DEBUG - Detected character set of UTF-8.
    Jun 19, 2019 15:38:32.254 [0x15102bbfd700] DEBUG - Downloaded stream from [http://127.0.0.1:32400/library/streams/181?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx] (codec: srt) to temporary file [/transcode/Transcode/Sessions/plex-transcode-jk19rtdgc5dtot7fu88d8gsy-ef1b128f-4370-4808-a01d-07825b462435/temp-0.srt]
    Jun 19, 2019 15:38:32.254 [0x15102bbfd700] DEBUG - TPU: hardware transcoding: zero-copy support present
    Jun 19, 2019 15:38:32.254 [0x15102bbfd700] DEBUG - TPU: hardware transcoding: using zero-copy transcoding
    Jun 19, 2019 15:38:32.254 [0x15102bbfd700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
    Jun 19, 2019 15:38:32.255 [0x15102bbfd700] DEBUG - Job running: EAE_ROOT='/tmp/pms-85736070-8352-49fb-956e-d7be9ba4a099/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/21b5515-2321-linux-x86_64/' XDG_CACHE_HOME='/config/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'h264' '-hwaccel:0' 'vaapi' '-hwaccel_fallback_threshold:0' '10' '-hwaccel_output_format:0' 'vaapi' '-codec:1' 'dca' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/movies/Captain Marvel (2019)/Captain Marvel (2019) - Bluray-1080p.mkv' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/transcode/Transcode/Sessions/plex-transcode-jk19rtdgc5dtot7fu88d8gsy-ef1b128f-4370-4808-a01d-07825b462435/temp-0.srt' '-filter_complex' '[0:0]hwupload[0];[0]scale_vaapi=w=1278:h=538:format=nv12[1];[1]hwupload[2]' '-filter_complex' '[0:1] aresample=async=1:ocl='\''stereo'\'':osr=48000[3]' '-map' '[2]' '-metadata:s:0' 'language=eng' '-codec:0' 'h264_vaapi' '-b:0' '2717k' '-maxrate:0' '3623k' '-bufsize:0' '7246k' '-r:0' '23.975999999999999' '-force_key_frames:0' 'expr:gte(t,0+n_forced*5)' '-map' '[3]' '-metadata:s:1' 'language=eng' '-codec:1' 'aac' '-b:1' '148k' '-f' 'dash' '-min_seg_duration' '5000000' '-skip_to_segment' '1' '-time_delta' '0.0625' '-manifest_name' 'http://127.0.0.1:32400/video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/manifest' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'dash' '-map' '1:s:0' '-metadata:s:0' 'language=eng' '-codec:0' 'ass' '-f' 'segment' '-segment_format' 'ass' '-segment_time' '1' '-segment_header_filename' 'sub-header' '-segment_start_number' '0' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/seglist?stream=subtitles' '-segment_list_type' 'csv' '-segment_list_size' '2147483647' '-segment_list_separate_stream_times' '1' '-segment_format_options' 'ignore_readorder=1' 'sub-chunk-%05d' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-vaapi_device' '/dev/dri/renderD128' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress'
    Jun 19, 2019 15:38:32.256 [0x15102bbfd700] DEBUG - Jobs: Starting child process with pid 586
    Jun 19, 2019 15:38:32.281 [0x15102adf6700] DEBUG - Request: [127.0.0.1:34846 (Loopback)] PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress?status=startup (15 live) Signed-in Token (obfuscated)
    Jun 19, 2019 15:38:32.282 [0x151093dfe700] DEBUG - Completed: [127.0.0.1:34846] 204 PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress?status=startup (15 live) 0ms 203 bytes (pipelined: 1) (range: bytes=0-) 
    Jun 19, 2019 15:38:32.282 [0x1510916b8700] DEBUG - Request: [127.0.0.1:34846 (Loopback)] PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress?status=opening (15 live) Signed-in Token (obfuscated)
    Jun 19, 2019 15:38:32.282 [0x151093dfe700] DEBUG - Completed: [127.0.0.1:34846] 204 PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress?status=opening (15 live) 0ms 203 bytes (pipelined: 2) (range: bytes=0-) 
    Jun 19, 2019 15:38:32.284 [0x15102aff7700] DEBUG - Request: [127.0.0.1:34846 (Loopback)] PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress?status=opened (15 live) Signed-in Token (obfuscated)
    Jun 19, 2019 15:38:32.284 [0x151093fff700] DEBUG - Completed: [127.0.0.1:34846] 204 PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress?status=opened (15 live) 0ms 203 bytes (pipelined: 3) (range: bytes=0-) 
    Jun 19, 2019 15:38:32.284 [0x15102b9fc700] DEBUG - Request: [127.0.0.1:34846 (Loopback)] PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress/stream?index=0&id=0&codec=h264&type=video (14 live) Signed-in Token (obfuscated)
    Jun 19, 2019 15:38:32.285 [0x151093fff700] DEBUG - Completed: [127.0.0.1:34846] 206 PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress/stream?index=0&id=0&codec=h264&type=video (14 live) 0ms 256 bytes (pipelined: 4) (range: bytes=0-) 
    Jun 19, 2019 15:38:32.285 [0x15102adf6700] DEBUG - Request: [127.0.0.1:34846 (Loopback)] PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress/stream?index=1&id=0&codec=dts&type=audio (14 live) Signed-in Token (obfuscated)
    Jun 19, 2019 15:38:32.285 [0x151093fff700] DEBUG - Completed: [127.0.0.1:34846] 206 PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress/stream?index=1&id=0&codec=dts&type=audio (14 live) 0ms 256 bytes (pipelined: 5) (range: bytes=0-) 
    Jun 19, 2019 15:38:32.340 [0x1510916b8700] DEBUG - Request: [127.0.0.1:34846 (Loopback)] PUT /video/:/transcode/session/jk19rtdgc5dtot7fu88d8gsy/ef1b128f-4370-4808-a01d-07825b462435/progress/streamDetail?index=0&id=0&codec=h264&type=video&profile=High&language=eng&width=1920&height=808&interlaced=0&level=41&frameRate=23.9

    Affected systems:

     

    As evidenced by other users, it appears only 7th gen Intel processors including UHD600 iGPU are affected, namely Celeron J4105 (Gemini Lake)

     

    Thanks in advance for looking into this.

    • Like 2



    User Feedback

    Recommended Comments



    8 minutes ago, Civic1201 said:

    Yes, I have Emby Premiere lifetime.

    Maybe you can have a look in this thread:

    Thanks for help!

    Looks like you're passing through the device incorrectly. Pass just /dev/dri, not /dev/dri/renderD128. See if that helps.

    Link to comment

    As this is not likely related to the issue we were dealing with in this thread, let's take further troubleshooting to the thread you've created.

     

    • Like 1
    Link to comment



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.