Linux PMS error transcoding TrueHD, fails to play on ATV4K or web

Hmmm, that doesn’t seem to be the case for me, so I’m guessing these are distinct issues. For me the codecs folder and everything under it has 755.

Edit: Also, this does reproduce on plexinc/pms-docker:1.16.6.1592-b9d49bdb7.

For the record, Plex and all of its related processes are running at uuidd. Also, in /etc/passwd both uuidd and plex are in there with uid 105.

I’m sorry for even bringing it up.

@kevin.oconnor7 how soon after you kill the EasyAudioEncoder process, (which you said fixes the issue for a bit) does it stop working again?

On the order of hours. Though it’s not clear if usage impacts it. So far I haven’t seen it fail while content was already playing, only when starting to play content after the server had been idle.

Seems I’m having the same issue, running debian 10, docker PMS 1.17 release and when playing TrueHD on Web, AndroidTV or iOS I would get “transcoder exited” errors. Checked the logs and seems to be crashing on the EAC encoder so removed it, restarted the server and played fine again.
It seems that the codecs are downloaded on demand is that correct? As I see a lot of older versions also. Will it give problems when emptying the folder every once in a while?

From my dealings with @chrisallen on this issue, if a codec hasn’t already been downloaded, PMS will do so when requested. I had a bunch of them that we deleted working on this. Whether or not deleting older ones on a semi regular basis is a good idea, I can’t answer that. But at least we know where to look in the future if things start acting wonky.

There should be no need to delete downloaded codecs, PMS will maintain and handle ensuring it has the correct ones available.

There are a few cases that can prevent a codec from downloading or working;

  1. No internet access
  2. No permission to write to codecs dir (something external to PMS changed permissions)
  3. No executable bit set on EAE codec (we set this when we download the codec, so if it is not set, then something external to PMS changed the permissions)
  4. User has PMS AppData on a drive mounted with the noexec flag. PMS (since version 1.0.0) requires AppData to be on a partition that is mounted without the noexec flag.

If you are having issues and they don’t fall into one of the above reasons, I would love you to upload the Plex Media Server.log that covers your attempt to playback that fails. :slight_smile:

Had it happen to me again tonight. Here are my logs from around when it was failing:
Plex Media Server Logs_2019-10-02_23-27-53.zip (3.5 MB)

Is there anyway to get more logs out of EAE? None of your listed reasons seem to fit with my situation since restarting Plex EAE Service shouldn’t magically fix them.

From my logs I can see the attempt to start the process:

Oct 02, 2019 23:19:32.732 [0x7ffa6adf6700] DEBUG - Job running: EAE_ROOT='/tmp/pms-494352c6-b4db-490b-8c1f-6236a3bf2f3f/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/dd95667-2450-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' '-codec:1' 'eac3_eae' '-eae_prefix:1' 'fed9d1ee1cb349d6-com-plexapp-android_' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/data/Videos/TV/Below Deck/Season 06/S06E06.Get.Better.or.Go.Home.WEBDL-1080p.mkv' '-filter_complex' '[0:1] aresample=async=1:ocl='\''5.1'\'':osr=48000[0]' '-map' '0:0' '-codec:0' 'copy' '-map' '[0]' '-metadata:s:1' 'language=eng' '-codec:1' 'ac3' '-b:1' '640k' '-segment_format' 'mpegts' '-f' 'ssegment' '-individual_header_trailer' '0' '-segment_time' '10' '-segment_start_number' '0' '-segment_copyts' '1' '-segment_time_delta' '0.0625' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/fed9d1ee1cb349d6-com-plexapp-android/71ad9c24-4831-49e6-85c0-6ff9a8b5fcba/seglist' '-segment_list_type' 'csv' '-segment_list_size' '2147483647' '-segment_list_separate_stream_times' '1' '-segment_list_unfinished' '1' '-max_delay' '5000000' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'media-%05d.ts' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/fed9d1ee1cb349d6-com-plexapp-android/71ad9c24-4831-49e6-85c0-6ff9a8b5fcba/progress'
Oct 02, 2019 23:19:32.732 [0x7ffa6adf6700] DEBUG - Jobs: Starting child process with pid 17287

But then there’s no logs of anything happening to that pid. It seems like subprocess exit codes are normally logged, but I don’t see that here. I unfortunately didn’t check to see if that process was still running before I restarted the container. I’ll make sure to check on that next time.

Okay, got it to reproduce again today. The Plex Transcoder job is actually running when things break, and it has the CPU pegged at 100% the entire time. I was a bit curious if there was anything being written to stdout/err so I grabbed the command of the job and manually ran, and there’s nothing. It doesn’t crash or anything, it just hangs at 100% CPU utilization.

Here’s another dump of logs, in case it helps: Plex Media Server Logs_2019-10-04_01-23-14.zip (4.2 MB)

Thanks @kevin.oconnor7 I’ll take a look at your new logs later today :slight_smile:

2 Likes

@chrisallen did you find anything useful in the logs? Are there any additional debugging steps I can assist with?

I had a look through your logs and I can’t see any point where “EasyAudioEncoder” was started. You should see a log line the first time it is used after starting PMS (usually just before the “Job running:” transcoder line) do you have any logs of the issue occurring after restarting PMS?

Also just to confirm, is the “Easy Audio Encoder” process running at the time of the failures?

Yes, Plex EAE Service and the Plex Transcoder spawned for that stream are both running. Plex Transcoder pegs itself to 100% CPU utilization, and Plex EAE Service appears normal.

If I kill Plex EAE Service the client will get an error about the transcoder failing. If I try to play the content again the service is started again and everything works fine.

Sorry about the logs not capturing the startup. It’s usually 12-24 hours before I notice the problem. I will add that usually my SO is watching a bunch of content that needs audio transcoding before it eventually just fails.

Captured another log. Things went wrong when auto advancing between episodes of a show. This time I captured the logs after I killed the Plex EAE Service and Plex Transcoder and then starting the stream again.

Plex Media Server Logs_2019-10-11_19-12-10.zip (4.7 MB)

Same deal this morning; started failing when advancing between episodes. Though I did notice a pattern in several logs now that it’s specifically when advancing between seasons of a show. Might be a coincidence but at least this log and my previous log showed it failing at the start of a season.

Plex Media Server Logs_2019-10-18_14-50-42.zip (4.6 MB)

I should additionally note that it’s not always reproducible. After restarting the transcoding service I played the episode that it failed to transition from and everything worked as expected.

Thank you for the continued diagnostics and logs. I’ll pass them on to our transcoding team to look at.

I think I have this same issue. I am trying to stream mkv with TrueHD to an Apple TV using the enhanced plex video player. I have a movie with TrueHD, DTS-ES 6.1 and E-AC3 5.1. The DTS and E-AC3 tracks stream direct and work with no issue. The TrueHD tracks show that they are transcoding to FLAC, but all I ever get is a spinning circle. Looking in the logs I see the EAE line, followed by the starting child process, as mentioned above. I’m currently running PMS 1.18.1.1973 on a Synology DS-918+ using the package provided by Synology (not using Docker).

Just wanted to bump this thread since I’m still having to manually restart Plex daily because of this issue.

Is there anything else I can do to get more debug data?