ohseekay
ohseekay

Reputation: 805

How to understand MediaInfo CSV files

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?

Upvotes: 3

Views: 4528

Answers (3)

AmigoJack
AmigoJack

Reputation: 6109

The CSV files mostly have 7 columns, but can have up to 9. The latter correspond to the enum info_t type:

  1. Info_Name = unique name of a parameter to be used in f.e. Get().

  2. Info_Text = actually only used for the parameter StreamKind, which then has values like Video, Audio, Text... Most likely this is about self reflexion, so that you find yourself in which of the CSV files you're currently in.

  3. Info_Measure = measure unit of parameter:

    • with leading space it can be used to add it to a value - typical units are:
      ms, bps, channel, Hz, fps, bit, dB, byte, warppoint, frame, slice per frame, pixel and more.
    • without leading space Yes to indicate trueness (and supposely No for falseness).
  4. Info_Options = always 5 characters, which correspond by position to the enum infooptions_t type:

    1. InfoOption_ShowInInform = Y or N: Show this parameter in Inform()'s result
    2. InfoOption_Reserved = this is always a space, because it is reserved for future use
    3. InfoOption_ShowInSupported = Y or N: Internal use only, must be shown in Info_Capacities()
    4. InfoOption_TypeOfValue = value returned by a standard Get() can be one of these data types:
      • T = Text
      • I = Integer, up to 64 bit (textually in base 10)
      • F = Float(ing point) (textual decimal separator is ., not sure if exponent is ever used)
      • D = Date (in halfway ISO format with timezone: YYYY-MM-DD hh:mm:ss UTC)
      • B = Binary data encoded in Base64
      • C = (supposely) TimeCode (which textually comes in HH:MM:SS:FF format)
    5. InfoOption_ShowInXml = Y or N or space: Show in XML (a space supposely means it's not applicable to XML at all)
  5. Info_Name_Text = (Translated name of parameter), but never seen in any CSV file.

  6. Info_Measure_Text = (Translated name of measure unit), but never seen in any CSV file.

  7. Info_Info = Explanation of parameter with further details.

  8. Info_HowTo = (How this parameter is supported - could be:

    • N = No
    • B = Beta
    • R = Read only
    • W = Read/Write

    ), but never seen in any CSV file.

  9. Info_Domain = domain of this value (with values like:
    Technical, Legal, Title, Entity, Classification, Temporal, Spatial, Identifier, Info, Personal...).

Upvotes: 0

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.

Upvotes: 1

Rodrigo Polo
Rodrigo Polo

Reputation: 4774

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 [email protected]
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%"

Upvotes: 1

Related Questions