更新时间:2023-01-25 16:23:38
与其传递mp4文件的位置,不如传递ytdl流作为源,就像这样:
Instead of passing the location of mp4 file, pass in the ytdl stream as the source, like so:
stream = ytdl(url)
proc = new ffmpeg({source:stream})
proc.setFfmpegPath('/Applications/ffmpeg')
proc.saveToFile(mp3, (stdout, stderr)->
return console.log stderr if err?
return console.log 'done'
)