Issues streaming 4k(mostly audio transcode related, in theory)

Server Version#: 1.14.1.5488
Player Version#: 7.10.0.8875 (shield TV 2017, but also affects web and other methods, Shield TV is just my prefered streaming device)

I have many 4k movies that will not transcode. I was originally able to fix this with the method of deleting the easyaudioencoder and having plex re-download this encoder. But the issues persists and is a bit more than frustrating.

When playing this video stream, in my prefered method. is direct and audio is converted to 2 channel.

I do have other files that will play when getting covereted for remote viewing but will not play direct stream or after 5-10 minutes of play back recieve ~your network is not fast enough~ or ~your server is not fast enough~ when either of these are not the problem. My system can real time convert 4k HDR to something else(4790, 24GB ram, large raid6 array) and my server is connected to a nighthawk 10x by ethernet and my shield TV is within 15’ of the router and connects via MIMO AC.

Media info for one of the files I have issues with(this file will not play at all).

I will post logs as additional comments.

So after restarting the server for the 5th time in the past 2 days messing with this issue, simply to create a smaller log to parse through the file reads and plays, Ill search older logs for the issue

All of the EAC you could ask for in this log

Moderator Edit – Removed: Contained only ERROR messages without needed DEBUG statements.

Please do not post log excerpts like this. They are unusable in this form.

  1. Turn on DEBUG logging only (you show only ERROR and WARN which is insufficient)
  2. Recreate the problem
  3. Stop Playback after 30 seconds of playing
  4. Wait 30 seconds for PMS to flush the logs to disk
  5. Settings - Server - Troubleshooting - Download Logs
  6. Attach the ZIP file it gives you here

Will do

Different file ~server is not fast enough to stream~ issue persists. Server Htop showed low CPU usage and average memory usage during the time the file would play

only thing its converting here is audio

image
image

With this file I played until the error, 1:32 into file
(deleted)

I don’t know what else you have going on, whether I/O or other processes.

Feb 03, 2019 13:21:40.330 [0x7f1a5f7fe700] WARN - SLOW QUERY: It took 7900.000000 ms to retrieve 1 items.
Feb 03, 2019 13:21:40.331 [0x7f1a7bffe700] DEBUG - Auth: authenticated user 1 as Devanmc

The database is in serious need of optimization. PMS will stop working with this level of degradation. Please do a manual Optimize Databaes then restart PMS and retry.

1 Like

Done as requested

Issue continues for this file. this time 1:23

I can see in dashboard(via bandwidth) the plex stops streaming the file out and by htop as cpu load goes back to idle.

(deleted)

Grabbed a backup of my DB for kicks and its about 855MB, if that matters

  1. Pre-roll is being complained at. Just a nit for you to investigate. It thinks there is a value. A space?
Feb 03, 2019 15:34:21.783 [0x7fb338fff700] DEBUG - Extras: Preroll values looks like a file, and we had 1 of them.
Feb 03, 2019 15:34:21.783 [0x7fb338fff700] ERROR - Extras: Preroll file didn't exist or couldn't be read: ''.
  1. DNS rebinding an issue. Depending on your LAN config, this can cause not finding the server as “Nearby” . It says “no error” but the preceding Curl error is.
Feb 03, 2019 15:34:27.392 [0x7fb3313fd700] ERROR - Error issuing curl_easy_perform(handle): 7
Feb 03, 2019 15:34:27.392 [0x7fb3313fd700] WARN - HTTP error requesting GET https://192-168-1-119.6d6eb672cdc04fb687d94e4a05225e7b.plex.direct:32400 (0, No error) (Failed connect to 192-168-1-119.6d6eb672cdc04fb687d94e4a05225e7b.plex.direct:32400; No route to host)
  1. And you need more iNotify space. Let’s solve this once and for all
Feb 03, 2019 15:34:32.494 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/ShadowfaxWinter's Solstice, Vol. 1 (28: No space left on device)
Feb 03, 2019 15:34:32.510 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Andy McKee (28: No space left on device)
Feb 03, 2019 15:34:32.510 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Andy McKee/The Gates Of Gnomeria (28: No space left on device)
Feb 03, 2019 15:34:32.510 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Claro IntelectoReform Club (28: No space left on device)
Feb 03, 2019 15:34:32.521 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Sweet SensationTop 100 of 1990 (28: No space left on device)
Feb 03, 2019 15:34:32.523 [0x7fb338fff700] DEBUG - Transcoder segment range: 0 - 11
Feb 03, 2019 15:34:32.527 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Don OmarThe Fast And The Furious- Tokyo Drift (28: No space left on device)
Feb 03, 2019 15:34:32.546 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Timeless MemorySealed With A Fist (28: No space left on device)
Feb 03, 2019 15:34:32.569 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Imogen HeapI Still Know What You Did (28: No space left on device)
Feb 03, 2019 15:34:32.586 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/The Funeral DrumsThe What CD (28: No space left on device)
Feb 03, 2019 15:34:32.586 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/MuseGran Turismo 3 Soundtrack- Disc 2 (28: No space left on device)
Feb 03, 2019 15:34:32.586 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Louis ArmstrongThe best of (28: No space left on device)
Feb 03, 2019 15:34:32.586 [0x7fb344fff700] ERROR - [Notify] Failed to add watch for /media/raid/Music/Allen Eager QuartetWhite Bebop Boys Vol.2 (1947-48) (28: No space left on device)

Your music directories are killing you (which is common with a well organized music library).

If you have more directories which are monitored, add them to the find command line. It will accept multiple directories.

sudo find /media/raid/Music -type d -print | wc -l

Take the value you get here, round up to the next multiple of 32768, and add it to the value in /etc/sysctl.conf. When complete, update the kernel table (sysctl -p) and restart PMS

Let’s see how far this gets us.

1 Like
  1. what should I be looking for? Ill see if the file name has any spaces and adjust.

  2. Server is manually(resolv.conf) set for DNS to cloudflare and google as back up. router is basically a normal setup with port forwarding for remote.(i have a long standing issue with resolv.conf disappearing after reboots, not sure what a standard resolv.conf looks like)

  3. value you for your command is 13941 and if I just do it for the entire raid its 30135. Both below even being a multiple of 1 to 32768. Even though I dont monitor the whole raid file structure.

  • id set sysctl.conf to that value but everything just appears to be networking related for me.
    sysctl.txt (2.0 KB)

I could nix the music libraries, its huge and just me being a datahoarder.

Nix’ing the music libraries is your choice.

On an 8GB memory system, 65536 is more than enough and completely safe.

The equation is N * 540 bytes/notify_event , where N = the number of directories to watch.
65536 only uses 35MB of kernel memory. On an 8GB or better machine, not a big deal. On a 2GB system, it’s a big deal. Adjust accordingly if you want to keep it.

Found a comment on askubuntu to increase the limit and made it 32768 for now, If I did it right

Ill update it to 65536, I have 24GB of system memory, im not concerned.

echo fs.inotify.max_user_watches=32768 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

That’s the one.

When done, verify: cat /etc/sysctl.conf
You should see it at the bottom.

the final sysctl -p will read the file, telling you the new values it’s set. You should see the name and new value. If not, check for typo.

that portion looks good. ill going to optimize DB again and restart PMS. see what happens when I play the file.

image

mostly same behavior, this time it briefly picked back up streaming it. Most of the time shield just crashes
(deleted)

File name used to be
image

but I updated it to:
John.Wick.2014.2160p.mkv

Forgot to tell you to turn IPv6 support back off. (Settings - Server - Network)… You’re on an IPv4 LAN and WAN .
It just makes my life tougher and getting metadata over IPv6 isn’t supported yet :slight_smile:

I would appreciate not changing the files being tested.

Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] ERROR - [FFMPEG] - No VA display found for device: /dev/dri/renderD128.
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Invalid argument
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Scaled up video bitrate to 283734Kbps based on 4.500000x fudge factor.
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Scaled maximum bitrate for resolution reduction to 99657Kbps.
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: Selected protocol dash; container: mp4
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: analyzing media item 1969794
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): Direct Play is disabled
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): media must be transcoded in order to use the dash protocol
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): no direct play video profile exists for http/mkv/hevc
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): no direct play video profile exists for http/mkv/hevc/truehd
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): no direct play video profile exists for http/mkv/hevc/ac3
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): no direct play video profile exists for http/mkv/hevc/ac3
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - John Wick - video.bitDepth limitation applies: 10 > 8
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - John Wick - audio.channels limitation applies: 8 > 6
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): no remuxable profile found, so video stream will be transcoded
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Codecs: testing h264_nvenc (encoder)
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] WARN - avcodec_open2 returned -1313558101 for encoder 'h264_nvenc'
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] ERROR - [FFMPEG] - No VA display found for device: /dev/dri/renderD128.
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Invalid argument
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Scaled up video bitrate to 283734Kbps based on 4.500000x fudge factor.
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - Scaled maximum bitrate for resolution reduction to 99657Kbps.
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - John Wick - audio.channels limitation applies: 8 > 6
Feb 03, 2019 16:54:52.084 [0x7fdc17bfd700] DEBUG - MDE: Cannot direct stream audio stream due to profile or setting limitations
Feb 03, 2019 16:54:52.085 [0x7fdc17bfd700] DEBUG - MDE: John Wick (2014): selected media 0 / 1969794
Feb 03, 2019 16:54:52.085 [0x7fdc17bfd700] DEBUG - Streaming Resource: Calculated bandwidth of 3419kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 3000kbps
Feb 03, 2019 16:54:52.085 [0x7fdc17bfd700] DEBUG - Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Feb 03, 2019 16:54:52.085 [0x7fdc17bfd700] DEBUG - Codecs: testing h264_nvenc (encoder)

John Wick has a lot of audio streams in it. Torrents are like that. I scrolled 5 pages until I got past the list of PMS matching attempts. mkvtoolnix and mkvtoolnix-gui are your friend here. You can discard what you don’t need. It is a pure remux. The quality is unchanged. The benefit to you is faster startup time and less wasted space.

After all this, I just realized something. This is not entirely a server issue.

First, your i7-4790 is incapable of transcoding any HEVC HDR 2160p. It has neither the passmarks nor the QSV support to do so.

This is what places it in the player’s domain. The server must rely on the shield to handle it. To the best of my knowledge (and where I might be 500% wrong) , the Nvidia Shield isn’t going to be able to do that heavy lifting on its own unless it is the PMS server (with its own codecs resident).

The logs above show me the Shield has replied to PMS and the Media Decision Engine (MDE) has printed out what the results were. The ‘decision’ is the player telling PMS what it can do and then PMS deciding what it must do. These results are printed above MDE:

This is where my knowledge of the Shield ends. I know it has capabilities but I am not a Player guy.

@DaveBinM Can you shed some light here please?

1 Like

So some of that makes sense, and some of the log doesnt.

The plex dashboard shows its direct streaming the video(the shield supports 10bit and my TV is 4k 10bit) but transcoding the audio(my system is 2ch and my DAC cant handle surround formats). So im confused on the debug messages about the transcoding of the video and the message about the bandwidth limit since the stream is local my remote limit shouldnt matter.

Though, I did accidently start playing it on my PC via web and thats an 8bit limit. so it might be what you found. In which case, my bad.

*do really appreciate you looking at this on a sunday outside youre normal hours.

If you started on your computer, that’s what I saw.

As for the Audio, David is clearly the person to ask.
It will be Monday for him soon. I’m sure he’ll drop in when he gets a moment.