DGMPGDec的D2V项目文件的Python解析器
pyd2v的Python项目详细描述
pyd2v型
dgmpdec D2V项目文件的Python解析器
pip install pyd2v
文件
快速示例
# pip install pyd2v
from pyd2v import D2V
# ...
# Choose Input File
input_file = "/home/user/Desktop/video.d2v"
# Parse Input File
d2v = D2V(filename=input_file)
# Print D2V Version and Settings Options, which will be shown with the accessible variable names.
print(d2v)
# Print Input Video Files
print(d2v.videos)
# Print Frame Rate
print(d2v.settings["Frame_Rate"])
# Print first frame data
print(d2v.data[0])
可访问变量
成功的D2V解析将导致从D2V对象访问以下选项。在
- 版本:D2V版本,
16
当前是原始DGIndex的最新版本,上次更新是在2010年。在 - 视频:由DGIndex索引的视频文件路径的列表。如果在DGIndex中禁用了“使用完整路径”,则它将只是一个文件名。在
- 设置:将根据输入数据返回用户提供的和自动评估的各种设置。有关以下设置的详细信息。在
- 数据:索引MPEG视频流的数据,每个条目都是一个I帧,它将描述下一个I帧之前的以下非I帧。在
- 数据类型:最常见的视频类型是什么,例如
88.4% FILM
,PAL
,99.9% NTSC
。在
设置
Auto-evaluated Settings | Possible Values | Description |
---|---|---|
Stream_Type | 0=Elementary Stream | Defines the type of MPEG stream. |
1=Program Stream | ||
2=Transport Stream | ||
3=PVA Stream | ||
Transport_Packet_Size | [188, 204] | Specifies the size in bytes of the transport packets. Used only for Stream_Type=2. |
MPEG_Type | 1=MPEG-1, 2=MPEG-2 | Defines the type of MPEG stream. |
Aspect_Ratio | MPEG-2: "1:1", "4:3", "16:9", "2.21:1" | Defines the Aspect Ratio of the video specified in the MPEG stream. |
MPEG-1: "1:1", 0.6735, ["16:9", 625], | ||
0.7615, 0.8055, ["16:9", 525], 0.8935, | ||
["4:3", 625], 0.9815, 1.0255, 1.0695, | ||
["4:3", 525], 1.575, 1.2015 | ||
Picture_Size | [width, height] | Defines the size of the video after clipping has been applied. |
Frame_Rate | rate [num, den] | 'rate' defines output framerate * 1000. |
- 项目
标签: