How To Fix: Plex Shows 'Unknown' For Audio and/or Subtitle Tracks

I’ve found that in many cases Plex will show ‘Unknown’ for the subtitle track or audio track as well. This is because the property value didn’t get set correctly in the .MKV file. Which I wrote a little script to fix.

Simply open your MCEBuddy profiles.conf file… (On windows located here: C:\Program Files\MCEBuddy2x\config) and then add the following lines to the end of the profile you’re using for converting your video or add it to multiple profiles that you use if you use more than one.

CustomCommandPath=C:\Windows\System32\cmd.exe
CustomCommandParameters="/c del /q "%edlfile%" "%srtfile%" & "C:\Program Files\MKVToolNix\mkvpropedit.exe" "%convertedfile%" --edit track:s1 --set language=eng"
CustomCommandHangPeriod=100
CustomCommandCritical=true
CustomCommandUISession=false
CustomCommandShowWindow=false

A few things to know… I’m using MCEBuddy to convert to .mkv files and I’m merging the subtitle track into the mkv so I don’t need an extra external .srt file. So the first lines delete the edl file and srt files for cleanup. Then the property of the first subtitle track is set to Eng (English).

You’ll need to install MkvEdit first for this to work and if you want to set the property of an audio track, just add an additional line similar to: --edit track:a1 --set language=eng

You can read the mkvpropedit help file for the specific command to set audio track types.

I’ve found this works perfectly and now I don’t have that annoying ‘Unknown’ for my subtitle tracks - since we always have the captions on in our house… and have Plex set to automatically display English subtitles, this was very helpful because Plex will start every show with them automatically now instead of having to select the ‘Unknown’ track.

Hope this helps someone else who’s come across the same issue.

Best,

  • {c}guy

P.S. And a giant THANK YOU to Goose for creating such an awesome and handy piece of software. I LOVE MCEBuddy.

2 Likes

Thanks to @robtheone for this script to add a language code to MP4 files for Plex:

CustomCommandPath=mp4box\mp4box.exe
CustomCommandParameters="%convertedfile%" -lang 1=eng -lang 2=eng
CustomCommandHangPeriod=100
CustomCommandCritical=true
CustomCommandUISession=false
CustomCommandShowWindow=false
1 Like

FYI, this feature has been added to the Release 2.4.9

MCEBuddy will automatically include the language tags in the MKV and MP4 metadata and also include the language tags in the external SRT file.

I’ve just started using MCEBuddy & I’m still getting familiar with the settings, but so far all the mp4 files I’ve trimmed using the “MP4 Unprocessed” profile have “Unknown” audio. I’ve set the language to English in both the General Settings & Advanced Settings. Is there another setting I’ve missed somewhere?

1 Like

I tried adding the @robtheone script to the end of my profiles, but nothing seemed to happen.

I see mp4box.exe inside the MCEBuddy installation folder.

Below is the log extract.

2020-04-21T10:18:38 MCEBuddy.Transcode.CustomCommand --> Custom command parameters read ->
CustomCommandPath = c:\windows\system32\cmd.exe
CustomCommandParameters = “/c mp4box.exe “%convertedfile%” -lang 1=eng -lang 2=eng”
CustomCommandHangPeriod = 100
CustomCommandCritical = True
CustomCommandUISession = False
CustomCommandShowWindow = False
CustomCommandExitCodeCheck = False
2020-04-21T10:18:38 MCEBuddy.Transcode.CustomCommand --> About to run custom command with parameters:
CustomCommandPath = c:\windows\system32\cmd.exe
CustomCommandParameters = “/c mp4box.exe “\HOMEMEDIA-PC\wdultra1tb\Videos-MCEBuddyTemp\working0\Last.Week.Tonight.with.John.Oliver.s07e09.WEBDL-720p_1.mp4” -lang 1=eng -lang 2=eng”
CustomCommandHangPeriod = 100
CustomCommandCritical = True
CustomCommandUISession = False
CustomCommandShowWindow = False
CustomCommandExitCodeCheck = False
2020-04-21T10:18:38 MCEBuddy.AppWrapper.Base --> Launching process c:\windows\system32\cmd.exe
2020-04-21T10:18:38 MCEBuddy.AppWrapper.Base --> Process arguments “/c mp4box.exe “\HOMEMEDIA-PC\wdultra1tb\Videos-MCEBuddyTemp\working0\Last.Week.Tonight.with.John.Oliver.s07e09.WEBDL-720p_1.mp4” -lang 1=eng -lang 2=eng”
2020-04-21T10:18:38 MCEBuddy.AppWrapper.Base --> UI Session Admin Process : False
2020-04-21T10:18:38 MCEBuddy.AppWrapper.Base --> Setting process priority to Normal
2020-04-21T10:18:38 MCEBuddy.AppWrapper.Base --> ‘mp4box.exe’ is not recognized as an internal or external command,
2020-04-21T10:18:38 MCEBuddy.AppWrapper.Base --> operable program or batch file.
–> Process exited with code 1

This worked. Thank you.

1 Like