My Plex Server is failing to HW transcode when starting media from a Shield

Hi!

I’m not able to run certain media on my shield.

Plex Media Server
CPU:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel® Core™ i7-3770K CPU @ 3.50GHz

Plex Server version: 1.18.4.2171

Running Linux: (Opensuse)
Linux 4.4.180-102-default #1 SMP Mon Jun 17 13:11:23 UTC 2019 (7cfa20a) x86_64 x86_64 x86_64 GNU/Linux

Starting media from an Nvidia shield with Hardwarde transcoder options set to on:

> Dec 27, 2019 23:44:03.274 [0x7fd30cff9700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
> Dec 27, 2019 23:44:03.274 [0x7fd30cff9700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: 1 (operation failed).
> Dec 27, 2019 23:44:03.282 [0x7fd30cff9700] WARN - [FFMPEG] - No quality level set; using default (20).
> Dec 27, 2019 23:44:03.298 [0x7fd30cff9700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
> Dec 27, 2019 23:44:03.298 [0x7fd30cff9700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: 1 (operation failed).
> Dec 27, 2019 23:44:03.332 [0x7fd30cff9700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
> Dec 27, 2019 23:44:03.332 [0x7fd30cff9700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: 1 (operation failed).

Have the following libs installed:
Mesa-libva 17.0.5-176.1
libva-drm1 1.7.3-1.3
libva-egl1 1.7.3-1.3
libva-glx1 1.7.3-1.3
libva-wayland1 1.7.3-1.3
libva-x11-1 1.7.3-1.3
libva1 1.7.3-1.3
vaapi-intel-driver 1.7.3-1.1

Plex Client
Nvidia Shield latest update
Android phone latest version
FireStick rev 2

I have the same problems for all my clients, except for Chrome on a Linux laptop.

1 Like

which codec is the video? HEVC? The 3xxx family CPUs don’t have HEVC capability.

I do need to see the entire log file to make proper diagnosis and report of what’s happening.

Hi!

Thanks for looking into this!

Here is some info about the media:


#### Media

* Duration 48:42
* Bitrate 7865 kbps
* Width 1920
* Height 804
* Aspect Ratio 2.35
* Video Resolution 1080p
* Container MKV
* Video Frame Rate 24p
* Video Profile high

#### Part

* Duration 48:42
* FileXXXXX.x264-YYYYYY.mkv
* Size 2.68 GB
* Container MKV
* Video Profile high

* Codec H264
* Bitrate 7120 kbps
* Language English
* Bit Depth 8
* Chroma Location left
* Chroma Subsampling 4:2:0
* Color Range tv
* Color Space bt709
* Frame Rate 23.976 fps
* Height 804
* Level 4.1
* Profile high
* Ref Frames 5
* Scan Type progressive
* Width 1920
* Display Title 1080p (H.264)

* Codec EAC3
* Channels 6
* Bitrate 745 kbps
* Language English
* Audio Channel Layout 5.1(side)
* Sampling Rate 48000 Hz
* Display Title English (EAC3 5.1)

* Codec SRT
* Language English
* Title English (SDH)
* Display Title English (SRT)

* Codec SRT
* Language English
* Format SRT
* Display Title English (SRT External)

It is working to direct play it from Chrome on Linux. The shield should direct play it, but that fails.

There is not much in the log file, i’ll attach it shortly.

I would like to see the DEBUG (not VERBOSE) logs please; captured right after recreating the failure. I want to see what the shield is asking for.

Here is the log:
log3.txt (17.1 KB)

Guess its about the audio then:
Cannot direct stream audio stream due to codec eac3 when profile only allows ac3

Not totally correct;

Dec 30, 2019 13:14:25.659 [0x7fd285b54700] DEBUG - MDE: E8 - Chapter 8: selected subtitle cannot be converted to a compatible format, burning into video stream

Hi!

Well spotted! Selecting no subtitle I still don’t get any success playing the file, but the above error is gone:

I See this:

Dec 30, 2019 20:19:22.885 [0x7fc0d5ffb700] DEBUG - Request: [10.0.40.50:41092 (Allowed Network (WAN))] GET /video/:/transcode/universal/start.m3u8?audioBoost=100&autoAdjustQuality=0&directPlay=0&directStream=1&directStreamAudio=1&fastSeek=1&hasMDE=1&includeCodecs=1&location=lan&maxVideoBitrate=200000&mediaBufferSize=209664&mediaIndex=0&partIndex=0&path=%2Flibrary%2Fmetadata%2F142947&protocol=hls&session=f98bf78c71d09167-com-plexapp-android&subtitleSize=100&videoBitrate=200000&videoQuality=100&videoResolution=3840x2160 (17 live) TLS Signed-in Token (Jlhag) (range: bytes=0-)
Dec 30, 2019 20:19:22.886 [0x7fc0d5ffb700] DEBUG - Found session GUID of f98bf78c71d09167-com-plexapp-android in session start.
Dec 30, 2019 20:19:22.887 [0x7fc0d5ffb700] DEBUG - TranscodeUniversalRequest: using augmented profile Android
Dec 30, 2019 20:19:22.887 [0x7fc0d5ffb700] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/142947?checkFiles=1&includeBandwidths=1&offset=-1&X-Plex-Incomplete-Segments=1&X-Plex-Session-Identifier=f98bf78c71d09167-com-plexapp-android
Dec 30, 2019 20:19:22.887 [0x7fc0d5ffb700] DEBUG - Auth: authenticated user 1 as Jlhag
Dec 30, 2019 20:19:22.897 [0x7fc0d5ffb700] DEBUG - We’re going to try to auto-select an audio stream for account 1.
Dec 30, 2019 20:19:22.897 [0x7fc0d5ffb700] DEBUG - Selecting best audio stream for part ID 195655 (autoselect: 1 language: en)
Dec 30, 2019 20:19:22.897 [0x7fc0d5ffb700] DEBUG - Audio Stream: 230335, Subtitle Stream: 0
Dec 30, 2019 20:19:22.898 [0x7fc0d5ffb700] DEBUG - Found session GUID of f98bf78c71d09167-com-plexapp-android in session start.
Dec 30, 2019 20:19:22.898 [0x7fc0d5ffb700] DEBUG - Using session GUID f98bf78c71d09167-com-plexapp-android for new transcode session.
Dec 30, 2019 20:19:22.898 [0x7fc0d5ffb700] DEBUG - Using existing transcode session.
Dec 30, 2019 20:19:22.899 [0x7fc11a724700] DEBUG - Completed: [10.0.40.50:41092] 206 GET /video/:/transcode/universal/start.m3u8?audioBoost=100&autoAdjustQuality=0&directPlay=0&directStream=1&directStreamAudio=1&fastSeek=1&hasMDE=1&includeCodecs=1&location=lan&maxVideoBitrate=200000&mediaBufferSize=209664&mediaIndex=0&partIndex=0&path=%2Flibrary%2Fmetadata%2F142947&protocol=hls&session=f98bf78c71d09167-com-plexapp-android&subtitleSize=100&videoBitrate=200000&videoQuality=100&videoResolution=3840x2160 (17 live) TLS 13ms 418 bytes (range: bytes=0-)

And the Shield will display: “Playback has stopped because the connection to the Plex Media Server has been lost. Please ensure the server is available and retry”

  • I can play just about any other media
  • This does not work on the following clients: "Shield, FireTv stick rev 2, Android Phone.
  • Works on Ipad / Iphone / Google Chrome browser

Any ideas?

No. Clearly an app problem.

I recommend gathering the app logs so the team can look when they return from the holiday.

1 Like

Any updates on this?

So main issue for me when having eac3.

  1. why is directplay not.working ie transcoding shouldn’t be invoked.
  2. why is tanscoding resulting in an exception? Transcoding, if it is invoked properly should work.

Possible workarounds:

  1. Manually convert media to use ac3 instead of eac
  2. Use ios devices instead of android based.

Best regards

I had requested app logs. None were provided.

Not possible to provide updates without information to investigate further with.
When you have them, I’ll be happy to look.

Hi!

Sorry I misunderstood you.

Here is the application log:

shield.txt (49.0 KB)

Seems to be related to: ShieldTV transcode issues (New Player)

I can confirm that it works turning off the new player in advanced settings on the shield.
This problem should be related to the “New Player”. @ChuckPa Would be great if developers could address this.

Thanks.

Thanks for the logs.
The issue being seen is because DNS rebinding protection is blocking the private domain plex.direct

01-07 13:05:10.247  i: [FFmpeg] [INFO] [hls @ 0x29a068b200] Opening 'https://10-0-40-11.bf5b4cbf8b3b42f3988062c87a9a198f.plex.direct:32400/video/:/transcode/universal/session/f98bf78c71d09167-com-plexapp-android/base/index.m3u8' for reading

01-07 13:05:10.249  i: [FFmpeg] [ERROR] [tcp @ 0x295e61ee40] Failed to resolve hostname 10-0-40-11.bf5b4cbf8b3b42f3988062c87a9a198f.plex.direct: No address associated with hostname

If you add the exception to allow the domain in the DNS resolver (modem/router) and restart, it will resolve and work.

This works! Thanks. Just curious why I have to add internal dns entries for the new player, but not the old one.

Regards D

I don’t know the reasons yet. I’m learning while I’m writing here to inform you .

As followup, can you go into your modem/router and allow private domain plex.direct ? It would resolve everything and not require you to make manual additions each time they change.

Yes, however I’m using multiple network interfaces and vlans, so my translation has to be specific to the specific interface.

If the private domain is allowed, which has nothing to do with address assignments, everything will be fine.

PMS has its own DNS internally.

Have the same issue on both my tv’s.
Not sure if it’s the same issue though.
Media files, which I indexed a long time ago, work fine.
But all new ones fail with the same error.
After I added the exception in my fritz.box router, it worked fine.

Maybe the logs will help, but would be nice if there was a fix for that.
I’m not understanding the issue.

Error log.txt (33.6 KB)