MKV with Dolby Audio not playing

Ubuntu versions:
Server Version#: 1.24.5.5173 and 1.25.0.5282
Player Version#: web - 4.661 and Roku 6.9.12.7411 (Roku Ultra Model 4670x)

Synology NAS versions:
Server Version#: 1.25.0.5220
Player Version#: web - 4.661 and Roku 6.9.12.7411 (Roku Ultra Model 4670x)

Request assistance with MKV playback on my Ubuntu Server (version 18.04).

A few weeks ago Plex Media Server stopped playing MKVs while my Synology NAS was still able to play the same video. This happens for numerous separate MKV videos. I have tried playing the video using the web interface and my ROKU off of my Ubuntu server, but it just hangs and spins.

I am able to watch the same MKV off of my Synology NAS using both the web player and the same Roku.

Of note, I was running 1.24.5.5173 and it wasn’t working. I updated to 1.25.0.5282 to see if that would fix it, and it did not. I’ve had problems in the past with MKVs, but never where it would play on my NAS but not on my Ubuntu.

Thanks for any help!

Here is an example of the video file media info.

Duration 52:13
Bitrate 3795 kbps
Width 1920
Height 1080
Aspect Ratio 1.78
Video Resolution 1080p
Container MKV
Video Frame Rate 24p
Video Profile main 10
Codec HEVC
Bitrate 3795 kbps
Bit Depth 10
Chroma Subsampling 4:2:0
Coded Height 1088
Coded Width 1920
Color Primaries bt709
Color Range tv
Color Space bt709
Color Trc bt709
Frame Rate 23.976 fps
Height 1080
Level 4.0
Profile main 10
Ref Frames 1
Width 1920
Display Title 1080p (HEVC Main 10)
Extended Display Title 1080p (HEVC Main 10)
Codec EAC3
Channels 6
Language English
Language Tag en
Audio Channel Layout 5.1(side)
Sampling Rate 48000 Hz
Display Title English (EAC3 5.1)
Extended Display Title English (EAC3 5.1)
Codec PGS
Language English
Language Tag en
Display Title English (PGS)
Extended Display Title English (PGS)

DEBUG logs ZIP file which captures this please ?

Hello ChuckPa.

Here is my Plex Media Server DEBUG Log.

Thanks,
EZ
Plex Media Server DEBUG Log - 05 Dec 2021.txt (6.0 MB)

Hello Again ChuckPa. I know you are quite busy and I appreciate your assistance. Have you had a chance to review my issue?

Thanks,
EZ

@EZDude

Thanks for pinging me.

It’s not MKV which is the problem… It’s the Dolby audio.

Dec 05, 2021 04:49:20.901 [0x7f9fce2c7b38] DEBUG - HTTP/1.1 (0.0s) 200 response from GET http://127.0.0.1:43135/system/notify/serverUpdated?host=192.200.201.200 (reused)
Dec 05, 2021 04:49:20.901 [0x7f9fce2c7b38] DEBUG - [com.plexapp.system] HTTP reply status 200, with 0 bytes of content.
Dec 05, 2021 04:49:22.000 [0x7f9fca686b38] ERROR - [Transcoder] [eac3_eae @ 0x7f453ab0bb40] EAE timeout! EAE not running, or wrong folder? Could not read '/tmp/pms-f9d9fa67-3855-4a0f-94d3-3e5871320831/EasyAudioEncoder/Convert to WAV (to 8ch or less)/024d10db-1dad-4b9e-acc4-1e57dee39b0b_11319-0-3340.wav'
Dec 05, 2021 04:49:22.000 [0x7f9fca686b38] ERROR - [Transcoder] [eac3_eae @ 0x7f453ab0bb40] error reading output
Dec 05, 2021 04:49:22.000 [0x7f9fca686b38] ERROR - [Transcoder] Error while decoding stream #0:1: I/O error
Dec 05, 2021 04:49:22.889 [0x7f9fcd8e2b38] DEBUG - NetworkServiceBrowser: SSDP departed after not being seen for 20.157871 seconds: 192.200.200.2155 (Game Room)
Dec 05, 2021 04:49:25.000 [0x7f9fceb05b38] DEBUG - [EventSourceClient/mediaserver] Resolving 192-168-21-152.be6d965b03a94315877a282f958253a3.plex.direct port 32400
Dec 05, 2021 04:49:25.000 [0x7f9fca686b38] ERROR - [Transcoder] [eac3_eae @ 0x7f453ab0bb40] EAE timeout! EAE not running, or wrong folder? Could not read '/tmp/pms-f9d9fa67-3855-4a0f-94d3-3e5871320831/EasyAudioEncoder/Convert to WAV (to 8ch or less)/024d10db-1dad-4b9e-acc4-1e57dee39b0b_11319-0-3341.wav'
Dec 05, 2021 04:49:25.000 [0x7f9fceb05b38] DEBUG - [EventSourceClient/mediaserver] Resolved 192-168-21-152.be6d965b03a94315877a282f958253a3.plex.direct to 192.200.201.200
Dec 05, 2021 04:49:25.000 [0x7f9fca686b38] ERROR - [Transcoder] [eac3_eae @ 0x7f453ab0bb40] error reading output
Dec 05, 2021 04:49:25.000 [0x7f9fca686b38] ERROR - [Transcoder] Error while decoding stream #0:1: I/O error
Dec 05, 2021 04:49:25.004 [0x7f9fceb05b38] DEBUG - [EventSourceClient/mediaserver] Connected in 3 ms.

Is there any chance you can –

  1. Restart Plex
  2. Let it sit completely idle for 2 minutes.
  3. Download the ZIP file

EAE errors occur when -

  1. The inode notify table is full (more directories than the Linux kernel default size); which is easily fixed.

  2. Transcoder temp directory on a network share.

The startup logs will confirm if the table is overflowing or not.

@ChuckPa - Thanks for your reply.

I thought the audio streams might be the problem when I looked at the logs as well. The error is problem #1 since my Plex Media Server and all associated files (program and libraries) are not on a network share. But, I’m sure you’ll be able to figure it out.

I restarted my Ubuntu Server. I disconnected my LAN connections. I restarted Plex Media Server (PMS) (actually stopped it for about 3 min, then started it). I let sit for about 3 min. I connected to PMS locally using 127.0.0.1:32400 and downloaded the PMS log file.

Please see attached file.

If you need me to do this again with the LAN connected, please let me know. I thought it would be good to start PMS “completely idle” with no external comms. My media library is located on local hard drives so the LAN connections are not necessary to see my libraries.

Again thanks for your help.

Cheers,
EZ
Plex Media Server DEBUG Log - 08 Dec 2021 - No LAN connection.txt (276.2 KB)

@EZDude

Ummmmmm…

Care to fix the IP address of br0 ? :smiley:

Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG - Detected primary interface: 192.186.100.10000
Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG - Network interfaces:
Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG -  * 1 lo (127.0.0.1) (loopback: 1)
Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG -  * 5 br0 (192.186.100.10000) (loopback: 0)
Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG -  * 6 virbr1 (192.186.100.1) (loopback: 0)
Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG -  * 8 virbr0 (192.186.122.1) (loopback: 0)
Dec 08, 2021 07:17:25.470 [0x7faa3be76b58] DEBUG -  * 1 lo (::1) (loopback: 1)

192.168.100.10000 is not a valid IP address

IPv4 octets are 1-254 . 0 is for the subnet, 255 is for the broadcast.

There is serious breakage in your TCP/IP stack if it allowed that value to be entered,

It’s all good @ChuckPa. My IP addresses are good. I went through the logs before I uploaded and changed the IPs with some random numbers. I didn’t think it necessary for people to see my internal WAN/LAN configuration.

Did you see any problems with the Dolby audio?

Thanks,
EZ

@EZDude

  1. RFC-1918 (LAN) addresses are not routeable so nobody can get to them. My workstation is 192.168.0.13. My main NAS is 192.168.0.20, My Plex server is 192.168.0.18. I am 100% safe telling you that because you don’t know the WAN IP :slight_smile:

  2. With that tidbit of useless knowledge , Now to fix the MKV / EAE problem you have.

  3. You do have more directories being monitored than slots your kernel’s inotify table allows by default.

Dec 08, 2021 07:17:29.475 [0x7faa35a1bb38] DEBUG - [Notify] Now watching "/media/MOVIES/Movies"
Dec 08, 2021 07:17:29.564 [0x7faa35a1bb38] DEBUG - [Notify] Now watching "/media/TV_SHOWS/TV_Shows"

## Below is the first message stating “No space left on device”.  This continues until the end of the list of TV_Shows

Dec 08, 2021 07:17:29.633 [0x7faa35a1bb38] DEBUG - [Notify] Now watching "/media/TV_SHOWS/TV_Shows/All in the Family (1971)/Season 08"

## the line below is the last “No space left on device” message.  There were numerous lines between the start (the one I noted above) and the final one (the one below).

Dec 08, 2021 07:17:29.661 [0x7faa35a1bb38] ERROR - [Notify] Failed to add watch for "/media/TV_SHOWS/TV_Shows/The Kettering Incident (2016)/Season 01" (28: No space left on device)
Dec 08, 2021 07:17:30.471 [0x7faa35c3cb38] DEBUG - NetworkServiceBrowser: SERVER arrived: 127.0.0.1 (GATORSERVER)

This is easily fixed.

Since you appear to have everything in /media, we can do this in one query

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

It will tell us how many directories are in use.

Best practice I’ve found –

  1. round up to the next multiple of 65536 (e.g. 65536, 131072, 196608, 262144, etc)
  2. edit /etc/sysctl.conf
  3. At the bottom, add fs.inotify.max_user_watches=NEW_VALUE_FROM_ABOVE
    (looks like: fs.inotify.max_user_watches=262144 )
  4. Save file
  5. sudo sysctl -p (make new setting active)
  6. Restart Plex

Now, for the last thing I see in your logs -

Your DNS lookups aren’t resolving.

Dec 08, 2021 07:17:30.473 [0x7faa36036b38] WARN - HTTP error requesting GET http://plex.tv/pms/:/ip (6, Couldn't resolve host name) (Could not resolve host: plex.tv)
Dec 08, 2021 07:17:30.473 [0x7faa35dd8b38] ERROR - Error issuing curl_easy_perform(handle): 6

The “Linux Tips” tag in the forum has all my How-Tos

@ChuckPa

  1. Regarding the internal IPs, I’m just paranoid. That’s all.

  2. Thanks for the tip on a high number of directories. I do have quite a few… . I’ll take care of those steps right away.

Question: what does a high number of directories have to do with processing a Dolby audio stream?

  1. As far as the DNS look up goes, I disconnected my server from my routers before I restarted Plex. I can reconnect and restart Plex if you need me to.

Thanks!
EZ

OK @ChuckPa , I am sure you hear this all the time, but you are a genius. I have no idea what inotify and total directories has to do with processing Dolby Audio while streaming video, but IT WORKED!

I made the changes to sysctl and VOILA! I can play my videos again.

If you have time and the patience, could you explain (or point me to a link) how the two are related?

One last thing, should I change the title of my post to MKV with Dolby Audio not playing (or something like that) to help others with a similar problem?

All the best to you!
Cheers!
EZ

Dolby’s libraries (which we use under license in the EAE) require 2 “inotify” slots per transcode,.

When you run out of slots –

  1. EAE won’t work
  2. Automatic detection of new media fails in some directories but is ok for others.

Go ahead and edit it – It’s your thread :sunglasses:

I have so much to learn…

You don’t want to know how long I’ve been working with Unix & Linux :smiling_imp:

The new stuff surprises me quite often

How it works:

  1. The Dolby libraries have no " programmatic API".

  2. EAE gets audio segments from the transcoder.

  3. It writes them to a file

  4. Asks the dolby libraries to do the conversion.

  5. The transcoder sets a “Notify” watcher so it knows when the Dolby libraries are done writing ( INOTIFY_FILE_CLOSE event )

  6. When Dolby finishes writing and closes the file segment, the notification gets sent by the Linux kernel to the transcoder which now knows it can safely go read the finished audio .
    – If it weren’t ready, you’d get errors (which you saw in your logs)

  7. It picks up that block of audio and integrates it with the video stream it’s sending out.

Easy, right?

:rofl:

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