fluent-ffmpeg / node-fluent-ffmpeg

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

Support RTMP, RTSP, RTP as output #245

Closed matteos closed 10 years ago

matteos commented 10 years ago

FFmpeg can be used to push a stream towards remote servers or clients using different protocols. However, the current codebase prevents such outputs, because the normalization applied to the target string breaks protocol identifiers.

this.options.outputfile = path.normalize(target);

My suggestion is to implement a new method, "saveToStream" for example, and move the normalization check to the "saveToFile" method.

FfmpegCommand.prototype.saveToStream = function(targetstream, callback) {
       this._process(targetstream);
};

and

FfmpegCommand.prototype.saveToFile = function(targetfile, callback) {
 this._process(path.normalize(targetfile));
};
njoyard commented 10 years ago

Normalization should just be removed, it is useless. Le 9 mai 2014 17:29, "Matteo" notifications@github.com a écrit :

FFmpeg can be used to push a stream towards remote servers or clients using different protocols. However, the current codebase prevents such outputs, because the normalization applied to the target string breaks protocol identifiers.

this.options.outputfile = path.normalize(target);

My suggestion is to implement a new method, "saveToStream" for example, and move the normalization check to the "saveToFile" method.

FfmpegCommand.prototype.saveToStream = function(targetstream, callback) { this._process(targetstream); };

and

FfmpegCommand.prototype.saveToFile = function(targetfile, callback) { this._process(path.normalize(targetfile)); };

— Reply to this email directly or view it on GitHubhttps://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/245 .

njoyard commented 10 years ago

Also, this will be fully supported in 2.x

njoyard commented 10 years ago

Note to self: write tests for this feature.

njoyard commented 10 years ago

Works in 2.x

azarus commented 7 years ago

Works in 2.x

So can you please explain how?