Plex not able to play MKV files?

Server Version#: 1.30.1.6562
Player Version#: 4.98.2

Plex Media Server Logs_2023-01-12_09-36-34.zip (2.8 MB)

Hello!
I’ve switched over from windows to linux mint. Its been running for a while now, but I noticed there are a few tv shows and movies that dont want to play at all. They just sit and load forever, no time out error or anything. The ones causing the issue are all .mkv files and I have to convert over to .mp4 to get them to work again. I also tried to force it to convert to see if that may help, but it still loads forever.

OS: Linux Mint 20.3 Cinnamon (v5.2.7, Kernel 5.4.0-135-generic)
Cpu: Intel Xeon E5-2620 v2 x12 (running in VMware ESXI 7.0 Update 3)
Ram: 16gb
Gpu: Nvidia GP 107 (GeForce GTX 1050, Driver 5.25.60.11)

PMS is quite capable of playing MKV files. (I use them exclusively)

Thanks for providing the server logs. Your database isn’t need so I removed it.
(Best to keep the DB private unless requested by one of us)

Your logs are showing me the problem is converting the audio.
(The dolby codec can’t find the converted audio).

This raises two possible conditions:

  1. You have PMS monitoring more folders than the default kernel configuration allows. Your kernel is right at the change boundary between 8192 & 65536 default.
    – Do you happen to know how much media is being indexed ?

  2. The transcoder temporary directory is on a network location (NFS / SMB mount).

Which of these is most likely ?

 2023 09:35:16.108 [0x7f27c0665b38] DEBUG - Completed: [XXX.XX.XX.XXX:60667] 200 GET /hubs/home/recentlyAdded?type=2 (13 live) TLS GZIP Page 36-98 224ms 99431 bytes (pipelined: 7)
Jan 12, 2023 09:35:16.333 [0x7f27bce3bb38] DEBUG - [HCl#ab] HTTP requesting GET https://plex.tv/api/v2/shared_sources/owned?machineIdentifier=81a735ecdbdc7a88b4b543f4c18fbe6b8fc18dee
Jan 12, 2023 09:35:16.478 [0x7f27bf60cb38] DEBUG - [HttpClient/HCl#ab] HTTP/2.0 (0.1s) 200 response from GET https://plex.tv/api/v2/shared_sources/owned?machineIdentifier=81a735ecdbdc7a88b4b543f4c18fbe6b8fc18dee (reused)
Jan 12, 2023 09:35:16.479 [0x7f27bce3bb38] DEBUG - [HCl#ac] HTTP requesting GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx
Jan 12, 2023 09:35:18.000 [0x7f27b9974b38] ERROR - [Req#23e/Transcode/1rxggxpngmfqn60xgqjx4lom/fceaa538-61dd-4ce0-8280-2f444c05e0e7] [eac3_eae @ 0x7f6c628ad5c0] EAE timeout! EAE not running, or wrong folder? Could not read '/tmp/pms-334be4bb-ce12-4a8a-b045-2ef1e39fc090/EasyAudioEncoder/Convert to WAV (to 8ch or less)/1rxggxpngmfqn60xgqjx4lom_568646-0-0.wav'
Jan 12, 2023 09:35:18.001 [0x7f27b7788b38] ERROR - [Req#24a/Transcode/1rxggxpngmfqn60xgqjx4lom/fceaa538-61dd-4ce0-8280-2f444c05e0e7] [eac3_eae @ 0x7f6c628ad5c0] error reading output: -5 (I/O error)
Jan 12, 2023 09:35:18.002 [0x7f27bbf94b38] ERROR - [Req#24b/Transcode/1rxggxpngmfqn60xgqjx4lom/fceaa538-61dd-4ce0-8280-2f444c05e0e7] Error while decoding stream #0:1: I/O error
Jan 12, 2023 09:35:18.061 [0x7f27b9b87b38] DEBUG - Request: [XXX.XX.XX.XXX:60667 (WAN)] GET /:/timeline?ratingKey=51151&key=%2Flibrary%2Fmetadata%2F51151&playbackTime=0&playQueueItemID=10176372&state=playing&hasMDE=1&time=0&duration=2655000 (12 live) #248 TLS GZIP Signed-in Token (Nsgansera) (Chrome)
Jan 12, 2023 09:35:18.061 [0x7f27b9b87b38] DEBUG - [Req#248] Client [hj0itvzw5esu6puk1s7qn9hu] reporting timeline state playing, progress of 0/2655000ms for guid=, playbackTime=0ms ratingKey=51151 url=, key=/library/metadata/51151, containerKey=, metadataId=51151, source=
Jan 12, 2023 09:35:18.065 [0x7f27b9b87b38] DEBUG - [Req#248] [Now] User is Nsgansera (ID: 1)
Jan 12, 2023 09:35:18.065 [0x7f27b9b87b38] DEBUG - [Req#248] [Now] Device is Chrome (Chrome).
Jan 12, 2023 09:35:18.065 [0x7f27b9b87b38] DEBUG - [Req#248] [Now] Profile is Web

Ok thanks! Its interesting that the temp directory was on the SMB share instead of locally, I manually set it to a local directory, and tested a mkv file. It still was loading forever, but switching to the AC3 5.1 audio steam fixed it and is working, but still hit and miss. Movies are a little better since I can change the audio channel, but some tv shows only have one audio channel.

Is there a specific kernel version you recommend I should try instead?

Also, I have about 420 movies, 88 Tv shows, and 20 other test files and folders for my demo reels. Windows says there is about 23,500 files between everything so there is quite a bit there for it to go through, but it seemed to be fine when it was on windows. Although, I am somewhat new to Linux still, so I may have easily configured something wrong.

doing generous math:

420 + ( 88 Series * 7 seasons/series * 20 episodes/season == 1120 ) + 20 test files

1560 media files … Not 23,500 files

(It’s Friday. :slight_smile: )

Please be VERY careful:

  1. Don’t put media inside the Plex Media Server folders. It confuses the HECK out of it.

  2. 23,500 files for 1500 media items sounds about right.

12320

I think you may have done 8 * 7 * 20 :slight_smile: . Still not 23,500…

That is probably more accurate. I just did a quick select on all of the media folders, and went into properties to view the file count. So it probably counted a bunch of extras like the sub titles, optimized versions, etc.

Anyways. After a restart everything seems to be working well so far! Tv and movies are playing the mkv files fine now. Just takes a minute to load, and it shows that its transcoding the audio stream for most of them. So maybe it was just the transcode temp directory was off!

In case anyone comes across the thread. I gave up on .mkv files. Seems to still be hit and miss, even when trying to transcode it. I’ve used chatgpt to help create a script to search the whole folder and convert all .mkv files to .mp4 and its been working great now.

Here is the script I used if its useful for anyone else!

#!/bin/bash

# Set the directory containing the files to be converted
DIR="insert directory path here"

# Create an array to hold the files to be converted
declare -a files_to_convert=()

# Find all .mkv files in the directory tree and add them to the array
while IFS= read -r -d '' file
do
  echo "Adding file to conversion queue: $file"
  files_to_convert+=("$file")
done < <(find "$DIR" -type f -name "*.mkv" -print0)

# Process the files one at a time
for file in "${files_to_convert[@]}"
do
  echo "Converting file: $file"
  HandBrakeCLI --input "$file" --output "${file%.*}.mp4" --encoder nvenc_h264
  rm "$file"
done

echo "Conversion complete"

MKV files work just fine.

[chuck@lizum media.2031]$ find . -name \*.mkv -print | wc  -l
11381
[chuck@lizum media.2032]$ find . -name \*.mp4 -print | wc  -l
1126
[chuck@lizum media.2033]$ 

MKV work fine in plex.

However if you are happier dealing with mp4 format and if your doing a copy from mkv to mp4 then wouldn’t the following be far more efficient and faster …

ffmpeg -i input.mkv -c copy output.mp4

Batch it with a for loop …

for f in *.mkv; do ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"; done

Weird, it works fine for my movies. But TV shows are still spotty. I’ve just ran the script and its working for now. I may play around with it a little more to see if re-installing Plex may fix the issue. That way I wont have to convert every new file I import.

I dont believe i had this issue at all when it was on a windows server. I’m now running Linux Mint 20.3, Is there a specific codec I need to install to get it working? or should it just work pretty much out of the box?

ChatGPT commands deleted my data

@Nsgansera

I’m sorry for taking so long to see this ----

I just realized your problem — MINT

  1. Not supported

  2. Flakes out and fails at the stupidest things without warning

EVERY SINGLE PERSON who uses Mint — HAS ISSUES.

THE MOMENT Mint is removed, things work.

Use Ubuntu and your problems will vanish .

Ah ok! I’ll have to try that out then! I’ve been using Mint for a while on my desktop and its been great! (Mostly because I dont have to worry about updates pending breaking it until I reboot anymore lol.)

Mint is great for “Light Weight” linux.

It’s not “server grade” – which you need for PMS.

Ubuntu will look a little different but the behavior is rock solid.

Every time a user comes to us with a nonsensical problem; like yours
(or that NFS doesn’t work; or permissions don’t work; etc etc) –

the common element is “Mint”

I am very sorry I didn’t catch that in your opening post. :frowning:

As for updates, Ubuntu does the same thing… It’s ALWAYS nagging me to update the things I have installed (a lot) haha

All good! Thanks for the help! I just started looking into it again since school is over now.

I mostly started the switch to Linux because it was getting annoying to have to go into the vm and reboot the server just because a pending update. ever since the switch its had quite a few updates pending, but it still works perfectly fine!

Just recently switched to linux, I have Ubuntu LTS starting up for the new server, but I was mostly on Mint since I knew a few different studios use it, so I figured I should get a little more familiar with it! Will be looking into getting MoonRay installed in another VM to get a render server up and running soon too!

Interesting! I definitely did a few tests with some random files locally before I let it have access to the file share. Even then, I at least have a cloud backup, and a local backup at a different location if anything happened to the files where I have to recover them!

Be careful with VMs.

To be fair, You’re playing with something and putting PMS in a Linux VM, while learning linux, to use Plex ?

That’s a tall order.

PLEASE don’t make it complicated just because you think you need to.

Kubernetes isn’t supported here. If you’re using it, and get in trouble, you’re on your own. It took me 6 months to free up a small nuc to help with Promox (they’ve been waiting for years for some help; and it’s still not officially supported).

Walk first, Learn, Run later :slight_smile:

Even I didn’t learn Linux in a day (took over 2 years for me in my 30’s)

Definitely! I’m just using Vmware ESXI, easy enough for me to use since I use it for work all the time. Only a little bit trickier to get the gpu running, but setting hypervisor.cpuid.v0 = FALSE in the config fixed that for me and Plex is working perfectly now! MKV files are loading perfectly fine, maybe even faster now and transcoding is working great now! Thanks for your help!

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