gpt4 book ai didi

javascript - 使用 nodejs fluent-ffmpeg 流式传输到 icecast 服务器

转载 作者:行者123 更新时间:2023-12-04 23:24:33 25 4
gpt4 key购买 nike

我正在尝试进行 api 调用来表达哪个调用 ffmpeg 将流输出到 icecast。

我可以用 child_process 做到这一点, 但已找到 fluent-ffmpeg对于nodejs。

如果我添加

.save('icecast://source:hackme@localhost:8000/test')

我得到一个无效的参数错误,如果我使用
.output('icecast://source:hackme@localhost:8000/test')

我没有收到错误,对调用网页的正确响应,但没有 ffmpeg过程。

有谁知道 fluent-ffmpeg输出到 icecast .
var ffmpeg = require('fluent-ffmpeg');
app.get('/ffmpeg', function(req, res) {
var ffmpegPath = '/usr/bin/ffmpeg';
proc = new ffmpeg('/home/russ/radio_audio/fore/BaBeL74.wav')
.output('icecast://source:hackme@localhost:8000/test');
proc.setFfmpegPath(ffmpegPath);
res.send('ok');
});

最佳答案

尝试在 nodejs 中使用 icecast 的 icy 模块

icy module nodejs

关于javascript - 使用 nodejs fluent-ffmpeg 流式传输到 icecast 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54074445/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com