New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing Streams not working #1013
Comments
Seems I got the same error when I try to use a stream as input or use a stream for output. But will work fine after I change the stream to file path. |
SAME |
someone solved? |
This is mentioned nowhere in the FFmpeg Docs, but to use a streaming gif you have to set the input format as |
Hey @federicocarboni . Good insight. It works now with const ffmpeg = require('fluent-ffmpeg');
const fs = require('fs');
const file = fs.createReadStream('gif');
ffmpeg(file).inputFormat('gif_pipe').ffprobe((err, data) => {
console.log(data, err)
}) |
Why is this not working ?Actually, Ugly workaroundBy looking at Thus you can simply do: const ffmpeg = require("fluent-ffmpeg");
const fs = require("fs");
const file = fs.createReadStream("nyan-gif");
ffmpeg(file).ffprobe(["-f", "gif_pipe"], (err, data) => {
console.log(data, err);
}); |
I had a very similar error message with the same use-case (using Ubuntu, not sure if that's the source of the difference or not):
And @federicocarboni 's solution to add EDIT: actually it does not 🙁 . When processing multiple files with this, the error is no longer thrown but the resulting files are corrupted (not all of them but most of them). |
I have the same issue, work well with filename but failed with stream.
|
@shtse8 What's the original format? e.g. what are you converting from? .mp4? For example MP4 does not support streaming along with many other formats. |
@federicocarboni The original format I was working with is indeed MP4. Thanks for pointing out that MP4 doesn't support streaming, along with several other formats. Appreciate the clarification. |
Version information
Code to reproduce
If I run the following code it throws an error, but if instead I change the
createReadStream
for the path directly it works just fine. I need to use an input stream for my application and I can't figure out why it's not working. Thanks in advance 😄This is the ffmpeg command generated:
Expected results
Processing the file correctly
Observed results
Throws following error:
The text was updated successfully, but these errors were encountered: