2

以下是我的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

4

1 回答 1

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.
于 2013-09-26T12:55:54.177 回答