用于加入 MP4 和/或 3GP 文件的 Windows(最好是 .NET 可调用)API?

发布于 2024-07-07 13:32:08 字数 780 浏览 11 评论 0原文

我正在开发我们的后端编码器服务,它可以进行大量的视频转码和少量的视频文件连接。

转码是使用适用于 Windows 的 On2 Flix 引擎完成的,该引擎运行良好,但不幸的是它无法加入文件(至少据我所知 - 帮助和支持都没有提供太多信息)。 我现在对此很满意。

目前,连接是使用 LEADTOOLS 多媒体软件完成的,坦率地说,这是可怕的。 它是单线程的,需要 STA,因为它使用消息泵,这对于服务器应用程序来说并不是完全理想的。 此外,安装会用自己的评估编解码器覆盖我们所有正在工作的编解码器,并且没有办法避免这种情况。

理想情况下,我正在寻找一种 API 来替代 LEADTOOLs Multimedia API,它可以加入 3GP 和/或 MP4 文件。 成本并不是太大的问题。 有人有什么建议吗?

我知道理想的解决方案是在这里编写我们自己的工具,但我们打算在 WMF 中执行此操作,并且尚未完全过渡到 Win2008,因此我们需要几个月的临时解决方案。

更新:

我应该指出,编码绝不是我的专业领域,而且我从未过多处理过非托管代码,因为对于该行业来说相对较新(7年)。 我也没有太多时间,因为我的日常工作是服务层/编码器团队的开发负责人,该团队仅由我和另一个人组成,所以我们根本没有太多时间花在编码器上。

像 Flix 引擎这样的东西,它已经处理了很多底层的复杂性,这比我想要的更多,而不是必须根据输入/输出文件类型等以不同方式调用的低级 API。

如果您有任何建议,如果您能给我指出一些文档以了解它们的使用方式等,那将非常有用。

I'm working on our back-end encoder service which does an awful lot of video transcoding, and a very small amount of joining of video files.

The transcoding is done using the On2 Flix engine for Windows which works very well, but unfortunately it isn't able to join files (at least as far as I can ascertain - neither the help nor the support are very informative). I'm happy with this for now.

The joining, at the moment, is done using the LEADTOOLS Multimedia software which is, franky, dreadful. It's single threaded and requires STA as it uses a message pump which isn't exactly desirable for a server application. In addition the installation overwrites all our working codecs with a load of its own eval ones, and there is no way to avoid this.

Ideally I'm looking for an API to replace the LEADTOOLs Multimedia one, which can join 3GP and/or MP4 files. Cost isn't too much of a problem. Does anybody have any recommendations?

I know the ideal solution is to write our own tool here, but we're intending to do this in WMF and haven't quite transitioned to Win2008 yet so we need a temporary solution for a couple of months.

Update:

I should point out that encoding is by no means my area of expertise, and I've never had much dealing with unmanaged code being relatively new to the industry (7 years). I also don't have very much time because my day job is dev lead of the services-tier/encoder team which consists of just me and one other person, so we simply don't have a lot of time to spend on the encoder.

Something like the Flix engine where a lot of the underlying complexity is already handled is more what I'm looking for than low-level APIs that have to be called differently depending on input/output file types etc.

If you do have any recommendations, it would be really useful if you could point me at some docs for how they are used etc.

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

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

发布评论

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

评论(2

岁月打碎记忆 2024-07-14 13:32:08

FFMPEG 的 libavcodec 和 libavformat 是您的朋友。 它们的用途非常广泛,并且支持的功能基本上比其他任何东西都多,并且实际上是多媒体支持和操作的跨平台标准。

您还可以尝试 MP4box 的库 GPAC,这是一个特定于 MP4 的库,比 FFMPEG 的 API 功能强大得多,但(鉴于名称)仅对处理 MP4 和 3GP 文件有用。

另外,如果您使用 Flix 进行转码,您是否考虑过升级到更现代的东西? FLV1 和 VP6 对于 Flash 视频来说是相当糟糕的格式; 既然 Flash 支持 H.264,那么确实没有理由继续使用这种过时的(对于 VP6,而且价格昂贵)格式。

FFMPEG's libavcodec and libavformat are your friend. They're extremely versatile and support more than basically anything else, and are effectively the cross-platform standard for multimedia support and manipulation.

You could also try MP4box's library, GPAC, which is an MP4-specific library that is much more powerful than FFMPEG's APIs, but is (given the name) only useful for handling MP4 and 3GP files.

Also, if you're using Flix for transcoding, have you considered upgrading to something more modern? FLV1 and VP6 are rather crappy formats for Flash video; now that Flash supports H.264, there's really no reason to continue using such outdated (and, in the case of VP6, expensive) formats.

画骨成沙 2024-07-14 13:32:08

对于 x264:您可以简单地调用可执行文件本身,也可以包含库本身并通过其 API(encoder_open 等)调用它。 使用.NET 可能会更困难; 作为一个 C 程序,它的 API 是围绕 C 构建的,尽管我知道 Windows 和 Linux 上的 C 和 C++ 程序都是调用 API 的。

对于一个简单的程序来说,一个比另一个没有真正的优势:无论哪种方式,x264 只接受单一类型的输入(原始 YV12 视频)并吐出单一类型的输出(H.264 基本流,或者在CLI 应用程序,它还可以混合 MP4 和 Matroska)。

如果您需要一体化解决方案,ffmpeg 可以完成这项工作,因为它可以自动处理解码并将编码传递给 libx264。 如果您需要更具体的帮助,请访问 Freenode IRC 上的#x264。

For x264: you can simply call the executable itself, or you can include the library itself and call it through its API (encoder_open, etc). With .NET its likely more difficult; being a C program, its API is built around C, though I know both C and C++ programs on Windows and Linux have been built that call the API.

There's no real advantage to one over the other for a simple program: either way, x264 only takes a single type of input (raw YV12 video) and spits out a single type of output (H.264 elementary streams, or in the case of the CLI app, it can also mux MP4 and Matroska).

If you need an all-in-one solution, ffmpeg can do the job, as it can automatically handle decoding and pass on the encoding to libx264. If you need more specific assistance, drop by #x264 on Freenode IRC.

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