Node-fluent-ffmpeg: Only one input stream is supported

Created on 1 May 2016  路  5Comments  路  Source: fluent-ffmpeg/node-fluent-ffmpeg

Hi,
Library is serving me well - great job! But I now need to merge multiple input streams into one file/output.
I see it is purposely not supported "for now":
https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/blob/master/doc/inputs.js.html

Any indication as to when it will be, and advice on workarounds or why it is not currently supported?
Thanks
Dan

Question

Most helpful comment

What about adding this:
fluent-ffmpeg-multistream

All 5 comments

Hi @danielbanfield

Contrary to what the comments seem to mean, there is no short- or long-term plans to support multiple input streams. Input streams are handled by piping them to ffmpeg process standard input. There is only one standard input, so there you have it :)

In theory, we could handle several stream inputs by piping each of them to a named pipe (UNIX FIFO) and then instructing ffmpeg to read from those pipes. The problem is : nodejs does not support fifos because they have the potential of deadlocking the event loop.

So unfortunately this is currently not possible, and I don't see any way that this could become possible in the future.

Thanks for the quick reply (I did read it on the day but didn't get round to reply). Good to know the limitation on this to think around the problem. In the end I just

  • streamed from source to disk
  • addinput for the files to perform merge
  • serve merged file
  • cleaned up the files afterward

Since I didn't have a hard requirement for real-time merging.

Good to see you found a workaroung. I'm closing this issue, then.

What about having it in an ArrayBuffer?

What about adding this:
fluent-ffmpeg-multistream

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jfrux picture jfrux  路  4Comments

LauraWebdev picture LauraWebdev  路  3Comments

Rubinhuang9239 picture Rubinhuang9239  路  3Comments

elartix picture elartix  路  5Comments

joergbirkhold picture joergbirkhold  路  5Comments