TrueHD 5.1 4K Transcode Errors-Error Reading Output Unknown Error Occurred, No Space Left on Device

Server Version#: 1.41.3.9276 or 1.41.2.9200
Player Version#: Any

I’ve noticed that I’ve been unable to play any files that are a video format of “4K HDR10 (HEVC Main 10)” and also have “TRUEHD 5.1” audio AND am transcoding that AUDIO to something else. When I look at the logs I can see it getting first initially flooded with this:

Dec 09, 2024 10:57:52.765 [137272913570616] ERROR - [Req#a79/Transcode/51fwc3vsqitxad2uszwnr94t/63e4d43d-b869-480b-8226-db023f86fba1] Error while decoding stream #0:1: Unknown error occurred

Dec 09, 2024 10:57:52.766 [137272905182008] ERROR - [Req#a7a/Transcode/51fwc3vsqitxad2uszwnr94t/63e4d43d-b869-480b-8226-db023f86fba1] [truehd_eae @ 0x7b8d84668dc0] error reading output: -1313558101 (Unknown error occurred)

Then after a short time switches to this:

Dec 09, 2024 10:57:52.767 [137272905182008] ERROR - [Req#a7e/Transcode/51fwc3vsqitxad2uszwnr94t/63e4d43d-b869-480b-8226-db023f86fba1] Error while decoding stream #0:1: No space left on device

Running PMS on Ubuntu 24.04.1 LTS on a mini PC with i5 10500 Intel CPU and UHD 630 Int Graphics.

When I try to play ANY other audio format (Including TRUEHD 7.1) either direct or transcoded I have no issues. It seems to be only TRUEHD 5.1. If I select EAC3 5.1 on the same exact file, it plays fine. Many other files on different drives I’m able to reproduce this problem and I also see it flooding the logs when it’s hitting these files for credits detection.

Things I’ve tried after several hours of digging:

  1. Changing in fs.inotify.max_user_watches to 2097152
  2. Moving the temp directory for transcodes in webUI to a separate directory and giving it full permissions to plex/plex usr/grp.
  3. Tried deleting and allowing Plex to redownload “Codecs” folder.
  4. Disabling Hardware Transcoding which I normally have enabled for Int Graphics 630.
  5. Usual troubleshooting steps, restarting PMS server, PC, etc.
  6. Upgrading PMS from 1.41.2.9200 to latest beta at this time (1.41.3.9276).
  7. Making sure /var/lib/plexmediaserver has all the correct permissions.
  8. Testing the file with ffmpeg - “ffmpeg -v error -i “/path to movie here/movie.mkv” -f null - 2>error.log”
  9. Making sure file plays ok on VLC and other players.
  10. If I play the file on a receiver that supports TRUEHD 5.1 audio without the need to transcode the audio it plays without issue. (Tested on Nvidia Shield Pro).

I recently upgraded to 24.04 LTS, so I’m not sure if this behavior started then or was present prior and just didn’t notice it. I’ve seen MANY threads about this on the forums and Google/Reddit but none lead to any real solutions and many just close out due to the 90 days.

Hardware transcoding seems to be working fine on every other video file I have.

/tmp which is used for PMS is not a separate mount in Ubuntu 24.04 as far as I can tell from running “findmnt” and “df -h” and it appears Plex is able to create directories in there with stuff and also the custom transcode directory I made off root “/plex_transcode” is what I named that. When Codecs folder is removed I also see it repopulated with a fresh copy after I start Plex service again. However problem still occurs.

Is this a known bug or am I missing a fix here? I’ve run out of ideas. Luckily I don’t seem to have much content that is TRUEHD 5.1 so the impact here isn’t too significant, but nonetheless wanted to report the problem.

Thank you.

I’ve one 4K HDR file with TrueHD 5.1 audio. When playing in Plex Web, PMS transcodes both video and audio and burns subtitles w/o any problems. PMS 1.41.2.9200, Ubuntu 24.04.1, 6.8.0-49-generic, i5-10500T. Transcoder temp directory = /tmp/plex.

Can you post a full set of server log files? Then others can take a look and maybe see what is happening.

  1. Ensure server is set for debug, not verbose, server logs.
  2. Restart Plex Media Server (to bump the log files)
  3. Re-create the problem
  4. Pull & post server log files.

See attached.

See about 14:32:02 on Plex Media Server.3.log

Plex Media Server Logs_2024-12-09_14-32-44.zip (1.2 MB)

Thanks for the log files.

Everything looks normal up to the time you play 8-bit Christmas.

  • After setting fs.inotify.max_user_watches, did you reboot the system or use sysctl -p?

  • How much free space is there for /tmp? Try setting the transcoder temporary directory to /tmp/plex, play a file that transcodes, and monitor utilization of /tmp. Since everything can write to /tmp, you do not need to worry about permissions.

The error messages point to a problem with inotify or running out of transcoder space. However, neither of those items should be TrueHD 5.1 specific. If they were the problem, then you would run into trouble when anything transcoded, not just TrueHD 5.1.

Also, the “out of space” messages start ~2 seconds after playback starts. This could also indicate a permissions problem, since it would be unlikely for the temp transcoder space to fill up so quickly.

Do you have any other files with TrueHD 5.1 audio? Do they play OK in Plex when transcoding?

Wondering if there is something about the file itself that causes problems for the Plex transcoder, not that the audio is TrueHD 5.1.

  • After setting fs.inotify.max_user_watches, did you reboot the system or use sysctl -p? I did both. Do you think 2M is not high enough? I initially tried 524,000.

  • How much free space is there for /tmp? Try setting the transcoder temporary directory to /tmp/plex, play a file that transcodes, and monitor utilization of /tmp. Since everything can write to /tmp, you do not need to worry about permissions.
    Unless I’m missing something /tmp is not a separate mount and is part of the main /dev/sda2 which has plenty of free space. I’ve monitored all of these when the problem is occurring and none of them are filling up.
    df -h:
    tmpfs 3.1G 15M 3.1G 1% /run
    /dev/sda2 916G 428G 442G 50% /
    tmpfs 16G 624K 16G 1% /dev/shm
    tmpfs 5.0M 8.0K 5.0M 1% /run/lock
    efivarfs 150K 85K 61K 59% /sys/firmware/efi/efivars
    /dev/nvme0n1 469G 403G 42G 91% /media/Drive2
    /dev/sda1 511M 6.2M 505M 2% /boot/efi
    //192.168.1.100/Crypt-Files 21T 20T 446G 98% /share
    tmpfs 3.1G 172K 3.1G 1% /run/user/1000

/dev/nvme01 is just a drive I use for backing up Plex and is not a part of the OS. I checked the other tempfs mounts and they don’t appear to be tied to anything related to the /tmp directory or Plex.

I’ve tried and all files that I can find are TrueHD 5.1 have this issue so it doesn’t appear to be the file. However, so far I’ve been only able to find 1 other file in this format so will have to keep looking. If it were the file though, I’d expect it not to play in VLC player or if I change the audio manually on the same file to EAC3 5.1 in Plex it plays fine then. Also plays fine if I don’t transcode it at all and play the file on my nvidia shield and receiver that can support that audio output without a transcode.

If I transcode the audio on any file that is TrueHD 7.1, which the majority of the files that I have that are 4K are, there are no issues either. Same as if I transcode the audio on virtually any other format. All play fine. It’s just TrueHD 5.1 which made me think this might be a bug.

Are there any custom newer versions of the EAE that I can install. I tried sudo apt-get install EAE and Easy Audio Encoder, but didn’t find anything. Plex is pulling that down from the internet correct? Anyone know where that might be from?

I know it’s unnecessary but I have chmod 777 the whole plex /var/lib/plexmediaserver directory in this troubleshooting so not sure how it could be a permission issue. I also tried chmod 777 the /tmp/pms directories and anything else it creates as part of the troubleshooting. Neither make a difference.

No. Plex uses a customized version. When you delete the directory, Plex re-downloads it from a Plex server.

Return the permissions to default values. Changing to 777 may not affect anything, but best not to to stray from the defaults.

# chown -R plex:plex "/var/lib/plexmediaserver"
# find /var/lib/plexmediaserver -type d -exec chmod 755 {} \;
# find /var/lib/plexmediaserver -type f -exec chmod 644 {} \;
# chmod +x /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/EasyAudioEncoder-8f4ca5ead7783c54a4930420-linux-x86_64/EasyAudioEncoder/EasyAudioEncoder

Yeah, that looks fine.

No need to set permissions on /tmp. Anything can write there. Also, it gets cleared whenever you reboot the system.

I’m running out of ideas. There is something about TrueHD 5.1 audio that the Plex transcoder does not like. I’ll keep digging…

Check your messages. I sent you a link to two sample files. They’re 1 minute cuts of movies with TrueHD 5.1 audio (the opening credits of two movies on my server).

You and I have basically the same server setup (same OS, same CPU). The samples play, and transcode, just fine on my server.

So I tried those files you sent me. Both worked no problem being Transcoded.

Do you have the ability to have me upload 8 bit Christmas to your google drive and you could try my file to see if that does it. Maybe it’s only certain lengths or sizes of files? Both of these were 20-30GB sized files.

I could also be chasing my tail here and just coincidentally had 2 files that had issues. The other was a copy of Avatar I had which I already replaced so can’t test there.

Not sure about you uploading (just never tried it before). I’ll check this evening (US CT).

The size of the file should not matter. Still, I’ll upload some larger samples. Check the same link in a hour or so.

Just tried all the larger files in my Plex server and they all choke. So its pretty clear this IS something related to the size of the file for me…

This is what’s showing up when it’s scanning those files for credits. Will have to dig in more later.

Looking at a few things here.

  1. How much memory is in the machine (free -m )

  2. A value of 2,000,000 max_user_watches would require 3GB of kernel memory (non paged). It would handle 2 million directories. Think that’s an overkill
    – a good starting point is 262144.
    – if you run out of space, you’ll see Error 28 (No space left on device) as PMS initializes and loads the Notify list.

  3. I would not use /tmp on a Syno for transcoder temp. This uses system memory of which there is precious little. Given the memory constraints and knowing a 4HDD syno can do 600 MB/sec of i/o (6 Gbps worth of video), the default transcoder temporary directory is recommended and advised.

  4. I/O error implies the file system itself needs help. First, let’s see where we stand then we’ll get into the underlying physical Linux

I am going to need a sample .

I went and grabbed a sample TrueHD 5.1.
It played on my system without issue.

  1. How much memory is in the machine (free -m )
    total used free shared buff/cache available
    Mem: 31431 2109 4926 31 24873 29322
    Swap: 2047 0 2047

  2. A value of 2,000,000 max_user_watches would require 3GB of kernel memory (non paged). It would handle 2 million directories. Think that’s an overkill
    – a good starting point is 262144.
    – if you run out of space, you’ll see Error 28 (No space left on device) as PMS initializes and loads the Notify list.
    It was set at 65k initially from OS, then I tried 524k, then 2M. No effect on issue at any value.

  3. I would not use /tmp on a Syno for transcoder temp. This uses system memory of which there is precious little. Given the memory constraints and knowing a 4HDD syno can do 600 MB/sec of i/o (6 Gbps worth of video), the default transcoder temporary directory is recommended and advised.
    I don’t have a synology. The temp directory I have set in Plex Web UI is a directory I made off root called /plex_transcode. The directory that appears in /tmp that’s like pms-134u89234w9982random is something Plex is creating and removing when a transcode is occurring. That directory is not its mount and part of the main /dev/sda2 so it should not be running out of space.

  4. I/O error implies the file system itself needs help. First, let’s see where we stand then we’ll get into the underlying physical Linux
    I’ve tried with 4 different ~50GB UHD TrueHD 5.1 rips Ford Guy gave me and all exhibit the same issue along with the files I have. The odd thing here is that the “sample” files he gave me that were just a few hundred MBs but in the same resolution and audio format (TrueHD 5.1) played fine when transcoded on my system.

There’s no doubt this seems to be something isolated to my setup, just trying to figure out what the problem might be. From what I can tell the amount of free space on the SSD and RAM is not an issue.

Maybe @FordGuy61 can give you access to his google drive via PM as he had some sample files as well as the full rips of files with the resolution and audio format at issue here for me.

Ok so I just updated Plex to the newest public release that just came out (1.41.3.9292) and removed the folder in /tmp for pms-83kjsfqefrandom and also the Codecs folder. Restarted the server and now everything is playing fine for TrueHD 5.1 when transcoding the audio EXCEPT the original file I had. Not sure why the other ones I had were not playing earlier and now are. I’m just going to replace it with a copy that is not that type of audio.

Thanks all for the help and troubleshooting.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.