gpt4 book ai didi

node.js - 使用node js将aac文件写入光盘

转载 作者:太空宇宙 更新时间:2023-11-04 01:23:45 24 4
gpt4 key购买 nike

我正在使用 node.js Icecast 模块录制互联网广播流。流的格式是AAC。我正在尝试将其作为 AAC 写入磁盘:

const icecast = require('icecast');
const url = 'http://webradio.ffh.de';

let ice;

var fs = require('fs');
var aacfile = fs.createWriteStream('test.aac');

ice = icecast.get(url, res => {
res.pipe(aacfile);
});


setTimeout(()=>{
ice.end();
},5000);

aac 文件 test.aac 为空。我该如何解决这个问题?或者我还能如何将 AAC 流写入磁盘?

最佳答案

我认为该问题与 icecast 模块及其相关,因为您使用的是已弃用的模块,他们有另一个模块执行相同的功能icy

关于node.js - 使用node js将aac文件写入光盘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58257794/

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