python读取数据视频,在Python中读取和解析Windows视频文件元数据

I'm working on a project and I need to read and parse video metadata.(duration, date created,title,bit rate , ...)

as far as I know there isn't any good package for Python 3.X for this issue.

1 -- I found these :

but they are designed for python 2.X

2 --

I also know how to use ffmpeg and other libraries that process video files. but they are so slow, I want to simply read the metadata from the windows file.

3 -- I tried to use exifread package to read video metadata , but as far as I found out , it doesn't work on video files.

4 -- there was this question that asked for a way to retrieve only length of videos, but it is unanswered.

I'm looking for this:

file = open(path_to_video_file)

props = python_video_info_parser.get_info(file)

print(props)

platform:

python 3.4

windows 10

解决方案

I hope you found what you are looking for. :)

But if you did not or others are wondering.. I am researching the same sunject and I may have found a solution.

What I have found so far is a command-line tool called exiftool.

If you download this software and use the command line feature you are able to run these commands with the subprocess module.

There is support for a lot of file formats, as shown in the documentation.

I will update this post as soon as I have found a working soltuion. :)

You can download the tool here.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值