Set Audio Language tag MP4/MKV

Yep. Copy the below and save as WhatEverYouLike.cmd…

@ECHO OFF

ECHO.



ECHO Set all Undetermined(und) audio language to English(eng) in current folder.
ECHO.
ECHO.

FOR %%A IN (*.mkv) DO (
    FOR /F %%I IN ('mkvmerge.exe --identify "%%A" ^| FIND /C "Track ID"') DO (
        IF %%I GTR 0 (
	    FOR /L %%T IN (0,1,%%I) DO (
		mkvmerge.exe -I "%%~dpnxA" | FINDSTR /C:"Track ID %%T: audio" | FINDSTR /C:"language:und">NUL
		IF NOT ERRORLEVEL 1 ECHO Undetermined audio language found. & ECHO    "%%~nxA" & mkvpropedit.exe "%%~dpnxA" -e track:%%I -s language=eng & ECHO. & ECHO. & ECHO.

)
)
))

ECHO The end...
PAUSE
EXIT

You will need the programs mkvmerge.exe and mkvpropedit.exe and must be placed in the same location as this command script… This will scan the current directory and set all *.mkv files but you can modify to suit your needs… Good luck.

EDIT: Forgot to include the versions I was using.
mkvmerge v7.8.0
mkvpropedit v7.8.0
I imagine the newest versions would work but I haven’t tested.

2 Likes