Get subtitle list using mediainfo in Windows

3

4

I'm using mediainfo in order to see the media information about a mkv file.

I see that it give me the details about subtitle like:

Text #1
ID                                       : 3
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : The same subtitle format used on BDs/HD-DVDs
Language                                 : English
Default                                  : Yes
Forced                                   : No

and so on...

It is possible, for custom template to have like:

SUBTiTLE: .............. English
SUBTiTLE: .............. French

and so on ?

If so, how ?

I tried to put only for Text:

$if(%Language%,Language : %Language%)

but it seems that not working

Snake Eyes

Posted 2015-10-23T05:46:16.380

Reputation: 205

Answers

6

MediaInfo.exe "--Output=Text;%ID%: %Format%$if(%Language/String%, SUBTiTLE: .............. %Language/String%)\r\n" File.mkv

Output:

5: UTF-8
6: VobSub SUBTiTLE: .............. French
7: VobSub SUBTiTLE: .............. English
8: VobSub SUBTiTLE: .............. French

Jérôme, developer of MediaInfo

Jérôme Martinez

Posted 2015-10-23T05:46:16.380

Reputation: 301

If I run command under command prompt, nothing happens, just open mediainfo gui program... – Snake Eyes – 2015-10-26T11:25:27.347

Can you tell mw how to create custom template for mediainfo ? Or can you create one (you might create faster than me) and I will import myself – Snake Eyes – 2015-10-26T11:40:44.390

You are trying with the GUI (Graphical User Interface). You need to use the CLI (Command Line Interface) version, check the download section on the MediaInfo website, in order to run the command I provided. On Windows, you can create your template in the Preferences. – Jérôme Martinez – 2015-11-25T15:49:15.417

This command strips away titles, such as "SDH" and "traditional"/"simplified" (Chinese) — is it possible to show also this information? – user598527 – 2018-07-30T15:40:25.620

It strips titles because this is the request to strip all except what is desired, so titles includes. You can add e.g. "$if(%Title%, %Title%)" for adding titles. – Jérôme Martinez – 2018-07-30T19:16:50.977