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)
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.
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.
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
With that tidbit of useless knowledge , Now to fix the MKV / EAE problem you have.
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 –
round up to the next multiple of 65536 (e.g. 65536, 131072, 196608, 262144, etc)
edit /etc/sysctl.conf
At the bottom, add fs.inotify.max_user_watches=NEW_VALUE_FROM_ABOVE
(looks like: fs.inotify.max_user_watches=262144 )
Save file
sudo sysctl -p (make new setting active)
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
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?
The transcoder sets a “Notify” watcher so it knows when the Dolby libraries are done writing ( INOTIFY_FILE_CLOSE event )
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)
It picks up that block of audio and integrates it with the video stream it’s sending out.