Plex claims audio language is "Unknown" even though file metadata includes language info

Server Version#: 1.31.2.6810
Player Version#: 4.103.2

I recently discovered that a lot of my TV media does not include language info in the metadata, so I’m going through and remedying that. As I’m going through everything, I found at least one instance where the metadata does include audio language info. But Plex still refuses to use that data.

The screenshot shows that the “Get Info” shows English, but at the same time the info page for that episode shows Unknown. I have tried both “Refresh Metadata” and “Analyze” and it still remains as Unknown.

Also, here is the full mediainfo output of this file. Notice the Audio track does show English as the language.

$ mediainfo "/data/media/tv/TV Shows/Beavis and Butt-Head (1993) [imdb-tt0105950] [tvdb-75863]/Season 02/Beavis and Butt-Head (1993) - S02E08 - Sick [DVD][AC3 2.0][x264].mkv"
General
Unique ID                                : 93763345612293532846862570136541990748 (0x468A29DB23E63448D02C39C00C6A0F5C)
Complete name                            : /data/media/tv/TV Shows/Beavis and Butt-Head (1993) [imdb-tt0105950] [tvdb-75863]/Season 02/Beavis and Butt-Head (1993) - S02E08 - Sick [DVD][AC3 2.0][x264].mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 169 MiB
Duration                                 : 10 min 42 s
Overall bit rate                         : 2 204 kb/s
Encoded date                             : UTC
Writing application                      : HandBrake 0.10.2 2015060900
Writing library                          : Lavf55.12.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 10 min 42 s
Bit rate                                 : 1 968 kb/s
Width                                    : 648 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.211
Stream size                              : 151 MiB (89%)
Writing library                          : x264 core 142 r2479 dd79a61
Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.601

Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 10 min 42 s
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 14.7 MiB (9%)
Title                                    : Stereo
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

What could be causing this?

The language tag has been set on the video stream, not the audio stream.
Tagging the video with a language is only useful for indicating the language of either the title card and credit roll, or burned-in subtitles.

But if it is the language of the spoken language you are looking for, you need to tag the audio stream(s).


Looking a little bit closer now, I have another idea:
Get MKVtoolnixGUI and drag your file into it.
You will probably see something like this:

The “Global Tags” and “Tags” I’ve marked in red, can contain contradictory information to the traditional MKV tags which appear in the “Language” column above.
It is almost always best to remove these tags completely (simply untick the check boxes in front of their lines) and remux the file.

You can even create a global preference in MKVToolnix to do this automatically each time.
Handbrake is one of the apps which insist in writing these tags, even though the information in them is usually garbage.

You circled the video section in get info. Notice how it says H264 right above that? No DD track is as high as 2012kbps bitrate either. Always set the video to und (undetermined) since language is only involved in audio and subtitles. You can’t have an English, Japanese, Spanish, etc video. It looks like Plex isn’t grabbing the tag, since MediaInfo shows it though.

Ah, I see. Ok. So why does the mediainfo output show English for the audio as well?

Also, not what you asked, but the imdb and tvdb tags in the folder names need to be {braces} not [brackets] to work. You also only need 1.

See my edited post above.

Thanks for this, yes I do see those tags. I’m trying to do this on a headless server, and automate the process through a script. Is there a way to do this without the GUI? I have a lot of files to get through.

There are command line versions of all tools in the MKVtoolnix family.

You may find this of use: How to remove tag spam and set language in several MKV files at once

This should do it, though I’ll take no responsibility if this is messing up your files.
(Test it first in a folder with a few copies of your actual video files! You have been warned.)

Script for MacOS:

#!/usr/bin/env bash
for f in *.mkv
do
 echo -n $f  ' '  
 mkvpropedit --delete title --tags all:"" "${f}"
done

Thank you! Yes I was just working on something similar to this, but this helps immensely! Thanks! (And of course no responsibility if anything goes sideways)

Actually the server is running Ubuntu, but I can likely use it just the same…

Yeah, you only have to adapt the “shebang” line at the top.

Works like a charm! You, sir, are a savior. Thanks a ton!

I have it set like this. It eliminates all the extra tags Otto suggests you remove as the default for all your videos

I don’t run a script for batch files. Highlight all the videos inside the folder and drag that into the window
(Don’t drag the folder in the window)

Make sure it says English here for the audio track

I did it actually a little bit differently. It reduces collateral damage a bit.

I wouldn’t automatically filter out tracks based on their language tags. I encountered already a lot of files with wrong language tags – even freshly ripped from official DVD/Bluray.

You are using the wrong brackets btw. If you want Plex to actually use the ID numbers to aid with matching, put them inside of {curly} brackets.

That’s what I was saying above

Strangely enough, it seems to work like this as well. I’ve had my naming like this since before Plex was recognizing the brackets at all, and I rarely have a mismatch.

That’s because you are adhering to the basic naming guide as well. As long as you use the official title and release (year), Plex is quite accurate at matching.
Only in very rare instances, there is actually a need to use the ID number. For instance if there are two identically-titled releases in the same year (yes, this actually happened a few times).

I forgot about this batch tool that goes with MKVToolnix

JMkvpropedit download <–Google (don’t know what OS you’re using)

It’s unbelievably fast. I’ve done like 200 movies at a time and it only took about a minute

Sidenote, not to pick on your naming but…

I’ve also seen some people having trouble using multiple square brackets for file info

You’re probably safe for tv episodes because it’s supposed to ignore everything after the s02e08 but I wouldn’t do that for movies

[DVD][AC3 2.0][x264].mkv

vs.

[DVD AC3 2.0 x264].mkv

I thought Plex treated things in [brackets] as invisible… So your files are being treated as…

TV Shows/Beavis and Butt-Head (1993)  /Season 02/Beavis and Butt-Head (1993) - S02E08 - Sick .mkv

Which is extremely close to the naming structure as is, and I believe trailing spaces are ignored as well, so it would be almost exact, with the exception of the (1993) in the actual mkv filename.

My naming scheme is a whole lot different than Plex wants and it still finds everything. Need a .plexmatch file for some larger TV Shows that fragment, but it’s pretty robust in what it grabs.