SOLVED! - Plex gets stuck spinning at 33% with all videos with EAC3 EAC audio (Plex recently stopped playing EAC3)

Server Version#: PlexMediaServer-1.27.2.5929-a806c5905-x86_64_DSM6 (Synology NAS DS1819+)
Player Version#: 7.0.13.7804-2fd4cda44 (Roku Ultra 4660X2)

After many days of research and trial & error, I finally solved the issue with Plex getting stuck at 33% due to EAC3 (also called Enhanced AC-3, EAC, E-AC3, E-AC-3, E-A-C-3, and EC-3.) If you have a very large library, the following should fix your problem.

Simply turning off “Scan my library automatically” fixed the problem for me. The box needs to be un-checked. I know this is a nice option to have, but if you have a large library, EAC3 Audio will not transcode correctly with “Scan my library automatically” turned on (checked). You will need to manually scan your library when you add new files, or you can set “Scan my library periodically” to 15 minutes, 30 minutes, 1 hour, etc.

Where is “Scan my library automatically” located? Open your web browser and open Plex (https://app.plex.tv/). Click the WRENCH icon (top right) or click on your “Account Settings” (top right). This should open a bunch of settings on the left of your screen. Click on “Library”. The top item on the right-hand side of your screen should be “Scan my library automatically”. Make sure this option is un-checked, then click “SAVE CHANGES” (bottom of screen). You also may need to stop Plex on your NAS and then re-start it after you save this un-checked this option, but probably not.

Why does “Scan my library automatically” affect EAC3? From what I understand, Plex uses the “inotify” Linux command to process EAC3. If you have a large library, the “inotify” command will reach its limit by watching at all your files, directories, and sub-directories, which will cause EAC3 to hang or fail. It may seem odd to use the “inotify” command for EAC3, but apparently Plex has a reason for doing so.

Please note: I’m using a Synology NAS which runs on Linux. If you’re using Plex Media Server on Windows, Mac, or some other system besides Linux, this solution may not work for you, as I do not know how Plex processes EAC3 on others systems besides Linux.

I found many people suggesting deleting the “Codecs” folder in the “Plex Media Server” folder. This did not work for me, but it may be a solution for other systems like Windows and Mac. Deleting your “Codecs” folder will cause Plex to automatically re-download fresh codecs. If one was corrupted, this may solve your problem.

I tried to find an existing post to add this as a possible solution, but all posts that were similar were already closed and locked.

I hope all this info helps people who were stuck, just like me! :slight_smile:

2 Likes

If the inotify limit is being reached and causing your issue, you should be able to use the steps in this post to increase that and be able to keep the “Scan my library automatically” option checked.

-Shark2k

This is probably related to the fact that Plex can’t detect intros on EAC3 audio tracks. I asked for help here too but I was ignored saying that on Windows works.
In this case Plex will stay forever stuck on Detecting intro part of the scan.

2 Likes

Thanks for the info on increasing the inotify limit on Linux. Is there some way to do it on a Synology NAS? I’m running PMS on a Synology NAS DS1819+ and I have an iMac with macOS Big Sur.

@stepcraft

Increasing the size of the inotify table :slight_smile:

Note:
Synology uses this customized name on DSM.
On regular Linux, you modify the size of fs.inotify.max_user_watches in /etc/sysctl.conf

3 Likes

The person with the knowledge (and who wrote the guides/FAQs) responded.
Sorry for linking to the wrong guide.

Thanks @ChuckPa for providing the proper link.

-Shark2k

:+1: Glad I could help

1 Like

Thanks for the info and help @ChuckPa!

Can you answer a couple questions?

#1 Setting the ‘inotify’ table to 65536 would be enough to cover my needs right now, but does setting the ‘inotify’ table to 98304, or 131072, or higher make any difference? (System speed, resources, etc.) My Synology came with 4 GB of memory which I have upgraded to 16 GB, so I’m not worried about memory.

#2 Just to be clear, each time DSM updates, I will need to manually run the ‘inotify’ Scheduled Task to increase it again? If yes, is there a way to force it to automatically run the script any time DSM updates?

#3 “WARNING: Due to how Synology manages this capability, you are strongly urged to place ONLY those items which should be monitored in your media.” What does this mean exactly?

I probably have 10,000 or more empty folders which I have created so I can type little notes about the files in the directory. For example, I would create an empty folder with a name of “This file is 1080p and was encoded with Very Fast settings and AAC Stereo”. Is this bad having all these empty folders? If so, how bad and what affect will it have?

Thank you so much or your help!

Item 1 - Number of entries in inotify

  1. Each slot takes 540 bytes + number of characters in the path.
    (using 1000 character max path – which is over estimated – this is 1540 bytes / slot)

  2. Allocating 131072 slots (keep memory aligned) uses 200 MB of memory which is locked into kernel memory (non-paged)

Item 2 - Running scheduled task after DSM updates

It is advised to rerun the task after major updates. Minor updates don’t usually bother it.

I’ve written the procedure to be self maintaining. If you look carefully, I delete the records from the config file before adding the updated value.

Item 3 - Monitoring

What I mean by this is to not put anything which isn’t media in your monitored media folders.

Remember, each directory under each media section’s root gets added to the list.

Poor organization of the NAS will result in inotify slots being wasted because while PMS will not try to add anything which isn’t recognized media, the kernel will monitor the directory regardless… which is the waste.

Also, over use of directories will add up in the long haul.

Care must be taken to account for how much memory is available to be used for inotify.

There are certain Synology models, e.g. the DS418J, which only have 1 GB of memory (maximum – not expandable). If memory is wasted (e.g. 256K slots when only 64K are needed. Wasting 256 MB on a machine with 1 GB installed will impact the entire NAS’ performance.

1 Like

@ChuckPa Thank you so much for your clear answers and all your help! Very much appreciated!

I’ll add I’ve been having an issue with eac3 audio and need to delete the codec folder regularly. Seems to be a fairly widespread issue. On unraid

1 Like

Please create a new post in the unraid section of the forum.

This thread is for Plex on Synology, which is different than Plex on unraid. This issues & solutions could be completely different.

https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/

@ChuckPa Is there a way that this adjustment to the inotify table can be made on an Nvidia Shield TV? I am having the exact same EAC3 transcoding issue (freezes at 33%) using the Plex Server on my 2017 Shield TV streaming to Rokus within my home network.

@lleworc

It LOOKS like you can but I would be EXTREMELY careful. You only have 2GB for everything!

Increasing fs.inotify.max_user_watches uses up Kernel (non-paged) memory.

127|mdarcy:/etc $ free -m
		total        used        free      shared     buffers
Mem:             2950        2904          45           6           7
-/+ buffers/cache:           2897          52
Swap:             511         511           0
mdarcy:/etc $ 

You also need root access to the shell to create /etc/sysctl.conf
(which will probably only survive until next OS update)

If you do this, /etc/sysctl.conf gets:

fs.inotify.max_user_watches = Your_Value_here

Once you gain root access,

cat /proc/sys/fs/inotify/max_user_watches

This will tell you what you have by default.

Increment slowly. If 8192, next step is 16384. Step after that is 24576
If you get to the point of 32768, GET A REAL SERVER :stuck_out_tongue: LOL

Remember. Each slot takes 540 bytes of memory

@ChuckPa Great thank you! I may just have to look into changing servers lol

I can give you the BoM for my server if you want :smiling_imp: :rofl:

Hey ChuckPa!

Is there any Windows OS fix for this, other than unchecking ‘Scan my library automatically’? This same issue just started on my Windows PMS install, wired, watching from a Rocu TV.

Thanks,
d3ad

@d3adMC

Sorry, but I can’t be of any help for Windows. I do two things with Windows: Wash them & Break them.

AFAIK, Windows doesn’t have a “notify”. It has the nasty habit of “Scanning & Freshing” everything.

1 Like

Haha! Alright, bummer…the search continues! Appreciate the response!

Cheers!
d3ad

I have been having this issue for a very long time on my Google Chrome Cast Stick. FINALLY I can say this fixed my issue.