Optimizing 4k titles causes Plex to freeze - TrueHD audio the problem?

My system is having an issue with converting 4k titles. I need to optimize everything I have in 4k in order to stream to friends. I don’t have many 4k titles, so I’ve only noticed it recently. It might be related to the specific files since I was having issue with one title but successfully optimized a different file right after. However, I tried a new encode of the title that was giving me an issue and the new file still causes issues. It has been a problem with 2 separate titles so far.

I’ve tried adjusting the background transcoding preset to go slower, but that hasn’t helped.

Here’s the symptoms I’ve observed:

  1. Optimization process begins and gets over 50% complete
  2. Plex server becomes unreachable
  3. Unraid Docker page is extremely slow to load and web portals for other dockers are unreachable
  4. Cache drive, where transcoding is set to occur, becomes extremely hot and reads of the drive rapidly start increasing while writes only increase at a somewhat regular rate
  5. Rebooting unRAID system is the only way to bring things back

I’ve attached Plex logs pulled immediately after a full system reboot. I’m not a complete expert so let me know if there are more details that are needed.

Bump, and this same problem occurred while watching a 4k title. The video was direct streaming, but the audio was transcoding at the time.

I’m almost certain this will be RAM because I have the same problem with 4k and Plex. If you have something to record the RAM usage it would be helpful to ascertain if it’s the same problem.

As of yet, I have not figured out why it does it. However, I know when doing operations on 1080p or lower content the RAM stabilises and when doing 2160p content it seems to just continue to grow. I thought it might transcode into RAM, but I manually configured a transcode directory on an SSD disk and it didn’t make a difference to RAM.

This is an example of how the RAM just goes until it runs out… although I need a better graph because I’ve added more RAM since then and the same thing happens…

At one point I had transcoding set to RAM but changed that ages ago. Now it should all be happening on my SSD cache drive.

I’ll try testing and monitoring RAM usage. I’m still a bit new to Grafana, but I think I can put together that graph pretty easily.

It looks like my RAM starts climbing steadily as soon as I start the conversion process. I have plenty of RAM to spare at the point the graph ends, but that’s the exact time when I lost communication with Plex and my reads on the cache drive started rapidly increasing. It seems like it just gets stuck in some sort of loop at some point and can’t get out of it.

Curious if the problem you are having with transcoding is happening with files that contain TrueHD audio? I posted recently that I could no longer optimize 4k videos (provided logs, but received no advice), but with subsequent testing it turns out that any video with TrueHD fails. I have confirmed this failure with two different servers - one a Windows 10 PMS and another an NVIDIA Shield PMS, both running latest version of PMS. If I re-rip the video and remove the TrueHD audio track, optimization works fine. This problem has developed within the past couple of months, as previously I was able to optimize all of my videos, even those that now fail. Reading through these forums, it appears there are many people have issues with TrueHD, and like the observations posted here it appears to be an issue with RAM getting exhausted. At least one person speculated there may be a memory leak with the newest transcoder. I have not seen any comment from Plex team members about this.

It’s a small sample size, but that could be the problem. The 2 titles giving me issues at the moment do have TrueHD audio. The 1 title that converted just fine within the last few weeks does not have TrueHD audio. Additionally, none of the previous titles I have successfully convert have TrueHD audio.

This is unfortunate since I would prefer to have TrueHD available. When monitoring my RAM usage while converting, I only hit about half of what I have available, so it didn’t seem like that was a direct issue. However, since it was constantly climbing up, it would be reasonable to assume there was a memory leak of some type.

Is there another location where you’ve reported this where I could add my own comment? I’d like to make sure somebody from Plex acknowledges this, if possible.

I will provide the link below, but I think this thread will get more traction, because the problem with TrueHD appears to be reproducible, and I had not identified it as being the key factor when I made my previous posts. I have eleven 4K videos that I have previously optimized successfully with Plex media server. Nine have TrueHD audio and consistently fail to optimize with the current version of PMS - no info from Plex given other than there was a problem with optimizing the file (I’m not proficient at understanding the log files). The other two do not have TrueHD and optimize without problem. I can direct play the TrueHD videos on my NVIDIA shield client without difficulty, but I cannot play them on any client that requires transcoding. Hopefully someone from Plex will review this thread and comment.

I updated the title of this post to hopefully bring more attention to TrueHD audio being the cause. I guess we just cross our fingers and wait for someone from Plex to show up.

I’m having issues with optimizing my 4k movies to original quality. I was able to do this before but I do believe it’s due to the TrueHD quality. I’ve tried it on 3 different PMS and they fail. What I’m going to try to do is use HandBrake to transcode my movies and see if this works. I’ll keep you guys posted.

Sure would be nice if someone from Plex checked in on this thread and let us know they’re investigating the issue.

Same issue here 4K with no TrueHD fine all Video with TrueHD I’m having issues with,

Continuing to bump this in hopes of Plex staff chiming in.

I attempted to manually select a non-TrueHD audio track for a file that has TrueHD audio, then convert it after that. My understanding is that the optimization should have used the non-TrueHD audio I had selected in the web player. Unfortunately, that didn’t change the behavior.

Still hoping a Plex Member will look at this at some point. Anyone have thoughts about a better way to get them to see this?

I am having the same issue, and these are all 1080p sources I am optimizing to 720p. The ones that fail are all True-HD audio.

I noticed this behavior of eating up all the ram, thrashing the hard drives, and eventually crashing PMS and/or the Synology entirely at the tail end of April. That coincides with the version jump from 12.3.x to 13.0.x and hasn’t been right since.

That’s actually really helpful to identify it’s for 1080p sources, as well. I think that pretty definitively proves it’s TrueHD audio converting.

Thanks for chiming in.

Thanks @midlots, I hope this helps ease all our suffering, hehe.

Here’s logs near a crash I suffered. and some perf showing my Disk IO slowly climbing, and CPU slowing dropping before the whole Plex and my Synology ground to a halt.

Plex Media (5.8 MB)

Linking to forum topics of what could be the same issue of Transcoder memory allocation failures on windows - this is being investigated by the development team

and

1 Like

Thank you @sa2000 for chiming in. I appreciate knowing that this issue is being investigated.

1 Like

I’m having this issue as well and both are with True HD audio sources along with several other streams.

Any progress on this fix? Any workarounds? I’m happy to convert to 1080p myself but I’m not sure how to get Plex to recognize it as an “optimized version” rather than just a duplicate file.