以下是我的bat文件:
@echo off
mediainfo --Inform=file://template.txt "in.mp4" >info.txt
以下是我的template.txt
General;File is: %FileName%\r\n
Video;\r\nFormat: %Format%\r\nCodecID: %CodecID%\r\nResolution: %Width%x%Height%\r\nDAR: %DisplayAspectRatio/String% or %DisplayAspectRatio%\r\nPAR: %PixelAspectRatio%\r\nFrameMode: %FrameRate_Mode%\r\nVideoBitrateMode: %BitRate_Mode%\r\nScanType: %ScanType%
Audio;\r\nAudioCodec: %Format%\r\nAudioBitrateMode: %BitRate_Mode%
以下是输出(在info.txt中)
File is: in
Format: AVC
CodecID: avc1
Resolution: 1280x720
DAR: 16:9 or 1.778
PAR: 1.000
FrameMode: VFR
VideoBitrateMode:
ScanType: Progressive
AudioCodec: AAC
AudioBitrateMode: VBR
无论我做什么,我都无法让MediaInfo为任何给定文件提供BitRate_Mode? 以下是mediainfo的CLI帮助文档: Help doc
答案 0 :(得分:3)
我做了详尽的测试,我发现大多数时候mediainfo没有在视频轨道上返回%BitRate_Mode%,但它确实返回%BitRate_Maximum%,如果你将它与%BitRate%进行比较,它是不同的是,这是一个VBR视频,这是我的模板:
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.