Node-fluent-ffmpeg: Need a way to -map '0:a' -map '1:a' -map '[output]'

Created on 13 Jun 2015  路  4Comments  路  Source: fluent-ffmpeg/node-fluent-ffmpeg

-map '0:a' 
-map '1:a' 
-map '[output]'

I need it to NOT wrap it with 0:a and 1:a with [ ].
It throws an error.

Is there a way to -map without using the argument of complexFilter?

Feature Question

Most helpful comment

You can use .outputOptions(['-map 0:a', '-map 1:a', '-map [out]']).

All 4 comments

Also, I should add your documentaiton says that ffmpeg will automatically save all unused inputs to the output. But this isn't true for multiple input complex filtergraph. Only the first audio stream is used so the other one is trashed unless I'm able to specify 0:a and 1:a without square brackets.

This will force them to output.
I don't want to run them through the filtergraph in any way.

Essentially, this is the command that is problematic to achieve with the abstraction fluent-ffmpeg as I'm seeing it currently... unless I just don't know about a particular output map function I can use at the end to map things manually. I'm sure you've done something I just can't figure out where to put them.

ffmpeg \
  -i "./test/archive-6/ab573a28-f2c2-4b0a-a54b-3b8367a484c5.mp4" \
  -i "./test/archive-6/4f8654d5-2851-4158-bbad-a0638f612d65.mp4" \
  -filter_complex "\
    [0:v] scale=iw/2:ih/2, pad=2*iw:ih [left];\
    [1:v] scale=iw/2:ih/2 [right];\
    [left][right] overlay=main_w/2:0 [out]\
  " \
  -map [out] \
  -map 0:a \
  -map 1:a \
  ./output.mp4

You can use .outputOptions(['-map 0:a', '-map 1:a', '-map [out]']).

Closing this because it has not had any activity for months. Feel free to reopen if you still have issues/questions :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Laurian picture Laurian  路  4Comments

Rubinhuang9239 picture Rubinhuang9239  路  3Comments

LauraWebdev picture LauraWebdev  路  3Comments

odigity picture odigity  路  4Comments

xyk2 picture xyk2  路  3Comments