最好的 Python 视频处理库?

发布于 2024-07-07 09:32:19 字数 729 浏览 5 评论 0原文

我想为我正在编写的 Python 应用程序添加一些简单的视频编辑功能,并通过谷歌搜索找到:

  1. pymedia
  2. pyglet (使用媒体模块)
  3. gst-python

要求:

  1. 占用空间小。 我已经在使用 wxPython (只是因为),它很容易使最终的 EXE 文件膨胀,所以最好是我用来实现此视频编辑功能的任何内容都不会显着增加膨胀。
  2. 该库仍应积极维护。
  3. 它不需要专有许可,因此 FMOD 是不可能的。
  4. 最小依赖性
  5. 不是一个成熟的视频编辑器。 不需要花哨的裤子。 只是能够跳到视频的不同部分,并抓取帧或为视频部分的开始和结束放置(多个)标记以删除位。
  6. 跨平台 - 最终应该能够在 Windows、Linux 和 OS X 上运行。

如果您使用过上面列出的任何视频编辑库或我在您的 Python 应用程序中尚未遇到的其他库,我想知道每个库的陷阱以及它们如何相互比较。 如果您还知道 avbin 的 Python 绑定,我想知道在哪里可以找到它。

gst-python(带有 Python 绑定的 Gstreamer)似乎没有很好的文档记录。 它似乎还与 pyGTK 紧密结合,后者也是一个相当大的工具包。

I'd like to include some simple video editing functionality for the Python application I'm writing and googling comes up with:

  1. pymedia
  2. pyglet (using the media module)
  3. gst-python

Requirements:

  1. Small footprint. I'm already using wxPython (just because), which bloats up the final EXE file pretty easily so preferably whatever I use to implement this video editing functionality shouldn't add to the bloat significantly.
  2. The library should still be actively maintained.
  3. It shouldn't require proprietary licensing, so FMOD is out of the question.
  4. Minimal dependencies
  5. Not a full-blown video editor. No need for fancy pants stuff. Just the ability to skip to different parts of a video and either grab a frame or put (multiple) markers for start and end of video sections to lop off bits.
  6. Cross platform - should be able to run on Windows, Linux and OS X at the end of the day.

If you've used any of the above video editing libraries listed above or others I have yet to come across in your Python application, I'd like to know the pitfalls for each and how they stack up against each other. If you also know of a Python binding for avbin, I would like to know where to find it.

gst-python (Gstreamer with Python bindings) doesn't seem to be very well documented. It also appears to be tightly coupled with pyGTK, which is also a pretty big toolkit.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

平生欢 2024-07-14 09:32:19

我建议你再看看 gst-python! 它与 pyGTK 耦合。 您可以完全单独使用它,不依赖于 Python 绑定或 GTK 的 C 库。 我编写了几个使用 gst-python 而不是 GTK 的命令行实用程序。

确实,gst-python 文档并不是那么好。 然而,C API 和模块的文档确实非常广泛,并且来自 C API 的映射Python API 非常简单。 还有一个非常活跃的 Gstreamer 社区,我很幸运在邮件列表和 IRC 上找到了帮助!

I would recommend that you look again at gst-python! It is not coupled with pyGTK. You can use it completely separately, with no dependencies on either the Python bindings or the C libraries of GTK. I've written several command-line utilities that use gst-python and not GTK.

It's true that the gst-python docs are not so great. However, the documentation for the C API and modules is really very extensive, and the mapping from the C API to the Python API is very straightforward. And there is a very active Gstreamer community and I had good luck finding help on the mailing lists and IRC!

人│生佛魔见 2024-07-14 09:32:19

我现在正在使用 pyglet 开发一个项目,我非常喜欢它。 他们的网站现在速度很慢,但通常他们文档页面上的编程指南是一个很好的介绍去图书馆。 他们的标准 API 文档也非常详尽。

我现在无法详细说明我们的项目是什么,但是当您说您需要时

不是一个成熟的视频编辑器。 不需要
对于花哨的裤子的东西。 只是
能够跳到不同部分
视频并抓取一帧或放置
(多个)开始和结束标记
视频部分以删除比特。

我可以验证 pyglet 将使编码变得轻而易举。

浏览一下你的列表的其余部分,我现在不能支持/反对文件大小,但 pyglet 正在积极维护(事实上,就在两周前,开发人员在错误跟踪器上对我很有帮助),是 BSD获得许可,不依赖任何东西(可选的 AVBIN 支持其他文件格式),它适用于我们的 Windows 和 Linux。

到目前为止,我们遇到的唯一跨平台问题是,就 Linux 上的声音而言,您可以选择 OpenAL,它将立体声文件混合为单声道,而 ALSA 不会为您提供任何音量控制,而正在播放声音。 他们声称这两个问题都存在于上游并且正在解决中。

I'm working on a project using pyglet right now and I absolutely love it. Their website is going slow right now, but normally the programming guide on their documentation page is an excellent introduction to the library. Their standard API documentation is also very thorough.

I can't really go into the specifics right now of what our project is, but when you say you need

Not a full blown video editor. No need
for fancy pants stuff. Just the
ability to skip to different parts of
a video and either grab a frame or put
(multiple) markers for start and end
of video sections to lop off bits.

I can verify that pyglet will make coding this a breeze.

Going through the rest of your list, I can't speak for/against the file size right now, but pyglet is being actively maintained (in fact the devs were quite helpful to me on the bug tracker just two weeks ago), is BSD licensed, depends on nothing (with optional AVBIN support for additional file formats), It works for us on Windows and Linux.

So far the only cross-platform gotcha we have come to is that as far as sound is concerned on Linux, you've got the option of OpenAL which will mix down stereo files to mono and ALSA which will not give you any volume control while a sound is playing. They claim that both of these problems are with upstream and are being worked on.

瞎闹 2024-07-14 09:32:19

gst-python 根本不与 pygtk 耦合 - 它只是碰巧共享一个通用对象模型(pygobject)和一种帮助生成绑定的方法。 但是您可以轻松使用 gst-python 而无需 pygtk - 以 Flumotion 为例。

gst-python isn't coupled with pygtk at all - it just happens to share a common object model (pygobject) and a way to help generate bindings. But you can easily use gst-python without pygtk - take Flumotion as an example.

凉城 2024-07-14 09:32:19

我目前也处于同样的困境。 我很幸运能够与 Ardome 媒体库项目的开发人员取得联系。

该库是一个基于过滤图的系统。 它是自由地基于
http://www.khronos.org/openml/ 我想。

它目前在 Linux 和 OS X 上运行,并有待与 Windows 集成。

I am currently in the same predicament. I have been fortunate to get in touch with the developers of the Ardome Media Library project.

This library is a filter graph based system. It is freely based on the
http://www.khronos.org/openml/ I think.

It currently runs on Linux and OS X with pending Windows integration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文