DGMPGDec的D2V项目文件的Python解析器

pyd2v的Python项目详细描述


pyd2v型

dgmpdec D2V项目文件的Python解析器

pip install pyd2v

GitHub licenseCodeFactorGitHub issues

文件

快速示例

# 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% FILMPAL99.9% NTSC。在

设置

Auto-evaluated SettingsPossible ValuesDescription
Stream_Type0=Elementary StreamDefines 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_Type1=MPEG-1, 2=MPEG-2Defines the type of MPEG stream.
Aspect_RatioMPEG-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_Raterate [num, den]'rate' defines output framerate * 1000.
^{tb2}$

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
尝试连接到Red5服务器时出现java问题   java实现Runnable的类被认为是ExecutorServices的“Runnable任务”?   java struts2类中的多个@validation   java未能应用插件[class'org.gradle.api.plugins.scala.ScalaBasePlugin']:gradle v2。13   如何使用Java流仅收集长度最大的元素?   从spring引导应用程序连接到firestore的java引发空指针异常   java从SQLite插入和获取真实数据类型会为连续插入获取空值吗?   当存在未知数量的空格时,使用java替代正向查找   部署如何为当今的浏览器部署java小程序(小程序、嵌入、对象)?   @OneToMany和@ManyToOne@Formula之间的java双向关系返回null   java为什么在我的例子中,协议缓冲区的性能比JSON差?   如何部署混合C++/Java(JNI)应用程序?   java如何在程序中显示字符串的完整信息。反恐精英?   java在Hibernate中从持久性上下文中分离实体中的实体