2

There are several CSV files in the Developers/List_Of_Parameters folder, but I'm not sure how to decipher them.

Take the following string for instance:

BitRate/String;;;Y NT;;;Bit rate (with measurement);

I infer that BitRate/String is the exact name of the parameter, and Bit rate (with measurement) provides a description of this parameter. Other than that, I don't know if the blanks in-between have any significance. Also, what does Y NT stand for, and similarly what do the other values in that column mean?

ohseekay
  • 795
  • 3
  • 20
  • 37

2 Answers2

1

First, I don't know why mediainfo decided to use ".csv" extension on their templates but it isn't a comma-separated values at all, it is a plain/text file and you can use other file extensions as long at it remains a plain/text file, you can use mediainfo CLI to use this templates like this:

mediainfo --Inform="file://template.csv"

A typical template will look like this:

General;Name.........: %FileName%.%FileExtension%\r\nSize.........: %FileSize/String%\r\nDuration.....: %Duration/String3%\r\n
Video;Resolution...: %Width%x%Height%\r\nCodec........: %Codec/String% %Format_Profile%\r\nBitrate......: %BitRate/String%\r\nMax Bitrate..: %BitRate_Maximum/String%\r\nFramerate....: %FrameRate% fps\r\nAspect Ratio.: %DisplayAspectRatio/String%\r\n
Audio;Audio........: %Language/String% %BitRate/String% %BitRate_Mode% %Channel(s)% chnls %Codec/String%\r\n
Text;%Language/String%
Text_Begin;Subs.........: 
Text_Middle;, 
Text_End;.\r\n

...and will output something like this:

Name.........: My Video.m4v
Size.........: 8.23 GiB
Duration.....: 02:20:02.880
Resolution...: 1920x800
Codec........: AVC High@L3.0
Bitrate......: 7 504 Kbps
Max Bitrate..: 27.1 Mbps
Framerate....: 23.976 fps
Aspect Ratio.: 2.40:1
Audio........: English 448 Kbps CBR 6 chnls AC3
Audio........: Spanish 448 Kbps CBR 6 chnls AC3
Subs.........: English, Spanish.

You can also call mediainfo CLI just to show one parameter:

mediainfo --Inform="General;%Duration%"
Rodrigo Polo
  • 4,314
  • 2
  • 26
  • 32
  • So everything has to be on one line, \r\n is required for newlines, and everything after General/Video/Audio has to be encapsulated in quotes? – MarcusJ Jan 18 '15 at 01:47
  • 1
    If you want only one value, use the short form: `--Inform="General;%Duration%"`, if you want to use a tempalte, use a CSV `--Inform="file.csv"`, yes, `\r\n` is the way you make a newline in a template. – Rodrigo Polo Jan 18 '15 at 04:42
  • 1
    Defining multiple parameters in command line is also possible, for example, I want to get both *video duration* and *FPS* separated by new line: `mediainfo --Inform=$'General;%Duration%\\n\nVideo;%FrameRate%' video_clip.mp4`. This is useful for wrapping the command in shell script without the need of extra config files. – Meow Jan 19 '16 at 03:05
  • @MarcusJ If you are in Linux/UNIX environment, use `\n` instead of `\r\n`. – Meow Jan 19 '16 at 03:43
  • 1
    "I don't know why mediainfo decided to use ".csv" extension on their templates but it isn't a comma-separated values at all" Long story short, Excel automatically opens CSV files only if the separator is a semicolon in some regions (e.g. France, depends of regional settings), poor choice from me a long time ago but I don't have the time for changing that for the moment (and it is not a lot used). Jérôme, developer of MediaInfo – Jérôme Martinez Jan 19 '16 at 18:59
  • Thanks for that example Meow. It's nontrivial to work out how to get mediainfo to display multiple parameters from different categories at the command line. For posterity, the important part is that mediainfo needs an actual newline to get it to begin a new category, not just a literal `\n`. Another example: `mediainfo --Inform=$'General;path=%CompleteName%\nImage; width=%Width%\\n' path/to/image.png` – dmnd Jan 27 '16 at 21:06
1

MediaInfo definitely lacks of documentation :(, due to lack of time for doing it. on my ToDo-list, but no ETA for it.

Small hints:

Other than that, I don't know if the blanks in-between have any significance.

Check the info_t enum.

Also, what does Y NT stand for, and similarly what do the other values in that column mean?

Check the infooptions_t enum.

Still poor documentation but a bit less poor ;-).

Jérôme, developer of MediaInfo.

Jérôme Martinez
  • 1,118
  • 5
  • 10