Node-fluent-ffmpeg: lavfi and anullsrc input

Created on 17 Jun 2016  Â·  5Comments  Â·  Source: fluent-ffmpeg/node-fluent-ffmpeg

How do I generate the following...

ffmpeg -i inputfile.mp4 -f lavfi -i anullsrc=cl=1 -shortest -c:v libx264 -c:a aac output.mov

Question

Most helpful comment

.input('color=black:s=640x480:r=25')
.inputFormat('lavfi')

worked

All 5 comments

Please read the documentation and come back here if there is something you can't find a solution for.

I read the docs and still can't do

//ffmpeg -f lavfi -i color=black:s=640x480:r=25 -an -t 10.00 empty.mp4

command
.inputFormat('lavfi')
.inputOption('color=black:s=640x480:r=25')
.noAudio()
.duration(duration)
.output(outputFile.name);

fails with
Error: No input specified
at FfmpegCommand.proto.withInputFormat.proto.inputFormat.proto.fromFormat (/Users/mike/git/transcoder/node_modules/fluent-ffmpeg/lib/options/inputs.js:77:13)

.input('color=black:s=640x480:r=25')
.inputFormat('lavfi')

worked

I'm struggling with the same issue as OP's (@TomKaltz were you able to solve it?) - how to specify anullsrc as input? I'm trying to add a null audio source to an audio-less video stream. The docs say that input can only be either a 1. filename, 2. an image pattern, 3. or a readable stream, so I've tried .input('anullsrc') but it doesn't generate/attaches a null audio to the output video.

@mikebell90's issue seems different, although if he was able to put .input('color=black…') which seems to be neither of the 3 formats specified in the docs then it should be able to work with anullsrc as well, right? Not sure why it isn't working. It might be I'm not using ffmpeg correctly, but just wanted to be sure whether the fluent-ffmpeg does indeed support this option in the input (i.e. anullsrc which is not one of the 3 types mentioned in the docs). Does it?

Edit: I wasn't logging the errors. ffmpeg exited with code 1: anullsrc: No such file or directory
So it does seem that it doesn't support that as an input, or at least not with .input, right? Is there any other way?

Edit 2: Ahh nm, solved! I was missing the .inputFormat('lavfi') (didn't realize that was the important part)

how did you solve this? anullsrc is not accepted by .input()

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timkendall picture timkendall  Â·  7Comments

jfrux picture jfrux  Â·  4Comments

345ml picture 345ml  Â·  6Comments

bsonntag picture bsonntag  Â·  5Comments

LauraWebdev picture LauraWebdev  Â·  3Comments