首先,我不知道为什么 mediainfo 决定在他们的模板上使用“.csv”扩展名,但它根本不是逗号分隔的值,它是一个纯文本文件,你可以使用其他文件扩展名只要它仍然是一个纯文本文件,您可以使用 mediainfo CLI 来使用此模板,如下所示:
mediainfo --Inform="file://template.csv"
典型的模板如下所示:
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
...并将输出如下内容:
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.
您也可以调用 mediainfo CLI 来显示一个参数:
mediainfo --Inform="General;%Duration%"