Node-fluent-ffmpeg: muxer does not support non seekable output

Created on 9 Dec 2014  路  8Comments  路  Source: fluent-ffmpeg/node-fluent-ffmpeg

Trying to transcode using the following setup

var command = ffmpeg(this.options.url, { timeout: 24*60*60 })
        .videoCodec('libx264')
        .audioBitrate('128k')
        .audioCodec('libfaac')
        .outputOptions([
            '-profile:v', 'high',
            '-strict', '-2',
            '-threads', '0'
        ])
        .fps(25)
        .format('mp4')
        .on('start', function(data) {
            console.log('\nffmpeg:start', data);
        })
        .on('codecData', function(data) {
            console.log('\nffmpeg:codecData', data);
        })
        .on('progress', function(data) {
            console.log('\nffmpeg:progress', data);
        })
        .on('error', function(err, stdout, stderr) {
            console.log('\nffmpeg:error', err);
            console.log('\nffmpeg:stdout', stdout);
            console.log('\nffmpeg:stderr', stderr);
        })
        .on('end', function() {
            console.log('ffmpeg:end');
            self.emit('finished');
        })
        .pipe(out, { end: true });

Where this.options.url is an online avi file. Using .save('./output.mp4'); works fine instead of .pipe(out, { end: true });

When using the pipe output it gives me

muxer does not support non seekable output

Off-topic / ffmpeg

Most helpful comment

All 8 comments

That's a known limitation of some output formats, which need to be able to seek the output (for example, write frames and then go back to the beginning to write index/keyframe data). There's nothing we can do here, you'll just have to use a streamable format if you want to output it to a stream.

:+1: thank you

You think node will support this sometime soon or shall I ask this question elsewhere?

I don't think so, streams are not intended to be seekable in the first place (that's what files do).

@daciwei

thanks, that fixed the issue.

I find this issue looking for something to use for ffmpeg stdin/stdout in python, question is from years ago, hasn't been touched in ages

then @vijayantkatyal comments half an hour after I open it

What a world.

Anyway: We worked out a way around a similar issue in Python by using a python buffer object instead, it is seekable so ffmpeg was alright with it

@sudofox If you could post the solution somewhere that'd be great. I am trying to pipe a stream to ffmpeg and then stream it using ffserver. I have to use mp4 since it seems webm (which works fine in the setup) is not supported by many systems. (Safari, IE, Chrome on IOS :( )

hey @jaames ^ if you have a moment?

Was this page helpful?
0 / 5 - 0 ratings