mediainfo命令行基本用法

--Version
--Version
           Display MediaInfo version and exit
[root@localhost seq]# mediainfo --version
MediaInfo Command line, 
MediaInfoLib - v0.7.95
--Inform=FMT
--Inform=FMT
           Template defined information display.

           FMT is "[xxx;]Text", where xxx can be any one of General, Video,
           Audio, Text, Chapter, Image, or Menu. Text can be the template
           text, or a filename in the form of file:///path
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="General;%FileSize%"
1678950899
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Video;%Format%"
VP9
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Audio;%Format%"
Opus
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Video;%Width%"
7680
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Video;%Height%"
4320
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Video;%FrameCount%"
6390
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Video;%Duration%"
213213
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Audio;%Duration%"
213201
[root@localhost seq]# mediainfo NORWAY_8K.webm --Inform="Video;%DisplayAspectRatio%"
1.778
--Info-Parameters

可以用这个命令查看** --Inform=FMT**可以用到的Text值。

[root@localhost seq]# mediainfo  --Info-Parameters > mediainfo.txt

结果如下:

General 
Count                     : Count of objects available in this stream
Status                    : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
StreamCount               : Count of streams of that kind available
...
GeneralCount              : Number of general streams
VideoCount                : Number of video streams
AudioCount                : Number of audio streams
...
Video_Format_List         : Video Codecs in this file, separated by /
Video_Format_WithHint_Lis : Video Codecs in this file with popular name (hint), separated by /
Video_Codec_List          : Deprecated, do not use in new projects
Video_Language_List       : Video languagesin this file, full names, separated by /
...
CompleteName              : Complete name (Folder+Name+Extension)
FolderName                : Folder name only
FileName                  : File name only
FileExtension             : File extension only
...
 
Video 
Count                     : Count of objects available in this stream
Status                    : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
StreamCount               : Count of streams of that kind available
StreamKind                : Stream type name
StreamKind/String         : Stream type name
StreamKindID              : Number of the stream (base=0)
StreamKindPos             : When multiple streams, number of the stream (base=1)
StreamOrder               : Stream order in the file, whatever is the kind of stream (base=0)
FirstPacketOrder          : Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)
Inform                    : Last **Inform** call
ID                        : The ID for this stream in this file
ID/String                 : The ID for this stream in this file
OriginalSourceMedium_ID   : The ID for this stream in the original medium of the material
OriginalSourceMedium_ID/S : The ID for this stream in the original medium of the material
UniqueID                  : The unique ID for this stream, should be copied with stream copy
UniqueID/String           : The unique ID for this stream, should be copied with stream copy
MenuID                    : The menu ID for this stream in this file
MenuID/String             : The menu ID for this stream in this file
Format                    : Format used
Format/Info               : Info about Format
...

举例:

[root@localhost seq]# mediainfo --Inform="General;%StreamCount%" NORWAY_8K.webm
1
[root@localhost seq]# mediainfo --Inform="General;%Count%" NORWAY_8K.webm
325
[root@localhost seq]# mediainfo --Inform="General;%Video_Format_List%" NORWAY_8K.webm
VP9
[root@localhost seq]# mediainfo --Inform="General;%FileName%" NORWAY_8K.webm
NORWAY_8K

References:

http://manpages.ubuntu.com/manpages/trusty/man1/mediainfo.1.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容