1

我有以 avi 格式编写的视频文件,我想使用 Python 分析这些视频。为此,我想将视频的每一帧表示为 2D 矩阵。

我怎样才能做到这一点?谷歌搜索给了我 PyMedia 作为一种方式吗?这真的是最好的选择还是我应该考虑其他一些方法?

如果 PyMedia 是一个不错的选择,谁能给我一个链接,我可以在其中获取 exe 文件以从二进制文件在 Windows 上安装模块?

顺便说一句,一般来说,将 Python 用于这些目的是一个好主意吗?我非常喜欢 Python,因为它简单,我更喜欢使用它,但如果它真的不适合视频分析,我准备使用其他东西。

添加了一些人声称 PyMedia 已经“死了” 这是真的吗?

4

1 回答 1

1

Yeah, the latest news on the PyMedia web site is dated 01 Feb 2006. That's a pretty bad sign.

The most active and up-to-date open project for manipulating video is ffmpeg. Apparently there is a recently updated python wrapper for it: http://code.google.com/p/pyffmpeg/

In general Python is much too slow for doing any sort of pixel analysis of video. Therefore there will be practically zero libraries of any reasonable level of quality and support for helping at the pixel level of granularity. There are well supported libraries for working at an image level of granularity though. PIL seems to be a popular choice: http://www.pythonware.com/products/pil/

于 2010-11-13T14:14:18.420 回答