获取MediaInfo
GET
/api/getMediaInfo
请求参数
Query 参数
path
string
必需
示例值:
D:/1.mp4
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '127.0.0.1:5372/api/getMediaInfo?path=D:/1.mp4'
返回响应
🟢200成功
application/json
Body
data
object
数据
mediaInfo
string
MediaInfo
videoPath
string
视频文件路径
message
string
提示信息
statusCode
enum<string>
状态码
枚举值:
OKFILE_PATH_ERRORVALUE_RANGE_ERRORVALUE_RELATIONSHIP_ERRORMISSING_REQUIRED_PARAMETERPARAMETER_RANGE_ERRORBACKEND_PROCESSING_ERRORUNAUTHORIZED_ACCESS_ERRORGENERAL_ERROR
示例
{
"data": {
"mediaInfo": "General\nComplete name : 1.mp4\nFormat : MPEG-4\nFormat profile : Base Media\nCodec ID : isom (isom/iso2/avc1/mp41)\nFile size : 10.5 MiB\nDuration : 1 min 29 s\nOverall bit rate : 983 kb/s\nFrame rate : 25.000 FPS\nWriting application : Lavf58.12.100\n\nVideo\nID : 1\nFormat : AVC\nFormat/Info : Advanced Video Codec\nFormat profile : High@L5\nFormat settings : CABAC / 6 Ref Frames\nFormat settings, CABAC : Yes\nFormat settings, Reference frames : 6 frames\nCodec ID : avc1\nCodec ID / Info : Advanced Video Coding\nDuration : 1 min 29 s\nBit rate : 916 kb/s\nWidth : 1 080 pixels\nHeight : 1 920 pixels\nDisplay aspect ratio : 0.562\nFrame rate mode : Constant\nFrame rate : 25.000 FPS\nColor space : YUV\nChroma subsampling : 4:2:0\nBit depth : 8 bits\nScan type : Progressive\nBits/(Pixel*Frame) : 0.018\nStream size : 9.73 MiB (93%)\nCodec configuration box : avcC\n\nAudio #1\nID : 2\nFormat : AAC LC SBR\nFormat/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication\nCommercial name : HE-AAC\nCodec ID : mp4a-40-2\nDuration : 1 min 29 s\nBit rate mode : Constant\nBit rate : 62.8 kb/s\nChannel(s) : 2 channels\nChannel layout : L R\nSampling rate : 44.1 kHz\nFrame rate : 21.533 FPS (2048 SPF)\nCompression mode : Lossy\nStream size : 684 KiB (6%)\nDefault : Yes\nAlternate group : 1\n\nCreated by Publish Helper",
"videoPath": "D:/video/1.mp4"
},
"message": "获取MediaInfo成功。",
"statusCode": "OK"
}
修改于 2024-03-27 18:20:17