fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.92k stars 880 forks source link

Version 0.3.0 broken #41

Closed kishorenc closed 12 years ago

kishorenc commented 12 years ago

I did a npm install fluent-ffmpeg on Ubuntu 10.10, and this version throws the following error when I tried a simple mp3 to ogg conversion.

Error: Source is not a ReadableStream
    at new FfmpegCommand (/home/kishore/Others/app/node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js:21:13)
    at new <anonymous> (/home/kishore/Others/app/node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js:241:10)
    at convertFile (/home/kishore/Others/app/test.js:6:16)
    at Object.<anonymous> (/home/kishore/Others/app/test.js:23:1)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

This is the simple program I tried (modified from one of the examples):

var fs = require('fs'),
    ffmpeg = require('fluent-ffmpeg');

function convertFile(fPath) {
    console.log('Converting file: '+fPath);
    var proc = new ffmpeg({
        // input source, required
        source: fPath,
        // timout of the spawned ffmpeg sub-processes in seconds (optional, defaults to 30)
        timeout: 30,
        // default priority for all ffmpeg sub-processes (optional, defaults to 0 which is no priorization)
        priority: 0,
        // set a custom [winston](https://github.com/flatiron/winston) logging instance (optional, default null which will cause fluent-ffmpeg to spawn a winston console logger)
        logger: null,
        // completely disable logging (optional, defaults to false)
        nolog: false
    });
    proc.saveToFile(fPath.substr(0, fPath.lastIndexOf('.')) + '.ogg', function(retcode, error) {
        console.log('file has been converted succesfully');
    });
}

convertFile('/home/kishore/test.mp3');

I believe the examples do not work on 0.3.0? I then did a npm install of the master tarball and the file conversion worked.

schaermu commented 12 years ago

I did a lot of changes in the past few weeks, so it may very well be that there were some issues. Ubuntu shouldn't be much of an issue, since travis-ci is running on ubuntu 11 (current build is just failing because of some missing videocodec library).