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

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

问题描述

在最后一个版本(v0.31.0)中,电子带有静态链接的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,所以我怎么能理想情况下,访问与电子捆绑在一起的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?

推荐答案

目前尚不可行, code> ffmpeg 库为node.js.意思是,只有这样抽象的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天全站免登陆