电子 - 如何在电子应用程序中使用 ffmpeg [英] electron - how to use ffmpeg within an electron app

查看:20
本文介绍了电子 - 如何在电子应用程序中使用 ffmpeg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在最后一个版本 (v0.31.0) 中,electron 带有一个静态链接的 FFMpeg 库(不是命令行工具,请参阅 #2588)

In the last release (v0.31.0) electron comes with a statically linked FFMpeg library (not the command line tool, see #2588)

我知道 ffmpeg 的许多 nodejs 模块,但它们看起来都像命令行工具的 api,那么我怎样才能理想地访问与 electron 捆绑的 ffmpeg 库并编码流?

I am aware of the many nodejs modules for ffmpeg, but they all look like an api to the command line tool, so how can I ideally access the ffmpeg library bundled with electron and encode a stream?

推荐答案

这目前是不可能的,因为 node.js 没有像样的 ffmpeg 库.意思是,只有这样抽象 CLI.但是,可以将 ffmpeg 编译和链接为节点本机插件,这似乎还没有人做过.因此,不幸的是,建议是编写这种抽象并将 lib 包含到您的电子构建中

This is currently not possible, since there is no decent ffmpeg library for node.js. Meaning, there are only such that abstract the CLI. However it is possible to compile and link ffmpeg as node native addon, which simply no-one seems to have done yet. So the advice, unfortunately, would be to write this kind of abstraction and include the lib into your electron build

这篇关于电子 - 如何在电子应用程序中使用 ffmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆