Tag: 转码

发生错误:产生ENOENT,node.js&FFmpeg

我有一个噩梦的时间试图解决这个问题。 我昨天问了一个关于这个问题的问题,但是到目前为止,长话短说,我不能为我的生活弄清楚这一点。 我想要做的就是在一个node.js应用程序中使用FFmpeg将一个.avi文件转码为一个.flv文件,这个工作只是使用FFmpeg的命令行而不是在应用程序中,代码如下: var ffmpeg = require('fluent-ffmpeg'); //make sure you set the correct path to your video file var proc = new ffmpeg({ source: 'C:/Users/Jay/Documents/movie/drop.avi', nolog: true }); //Set the path to where FFmpeg is installed proc.setFfmpegPath("C:\\Users\\Jay\\Documents\\FFMPEG\\bin"); proc //set the size //.withSize('50%') <– error appears after this line // set fps //.withFps(24) // set output […]

在Heroku上使用NodeJS进行HTML5audio转换

我有一个HTML5应用程序,允许用户上传和播放他们的audio文件。 服务器是在Heroku上运行的Node。 为了允许跨浏览器的audio播放,我所理解的是,我必须至less保持每个audio文件的两种格式,比如.mp3和.ogg。 所以,我需要在服务器端自动转码文件。 问题是Heroku不运行ffmpeg。 我发现这个项目创build了一个支持ffmpeg的heroku自定义buildpack,但似乎是Rails应用程序: https : //github.com/dzello/ffmpeg-heroku 。 我正在考虑运行外部服务器进行转码,我的nodejs应用程序将文件发送到该服务器,进行转码,然后重新上传我的nodejs服务器上的新文件。 但是我不知道如何build立这样一个服务器,是否已经有了一个可以做这种工作的现成解决scheme呢? 所以,这是我的问题: 1- Is there a solution to run ffmpeg on heroku+nodejs? 2- How can I set up a transcoding server that communicates with my nodejs+heroku server? 谢谢!