ffmpeg有很多输入和过滤器

时间:2017-11-11 10:02:44

标签: ffmpeg

我使用这个命令:

ffmpeg -i main.mp3 -i 1.mp3 -i 2.mp3 -i 3.mp3 \
       -filter_complex "\
          [0]volume=1[a0]; \
          [1]adelay=1000[a1]; \
          [2]adelay=2000[a2]; \
          [3]adelay=3000[a3]; \
          [a0][a1][a2][a3]amix=4:duration=first" \
-y merged.mp3

但我有很多意见。超过500.所以我的模式是这样的:

ffmpeg -i main.mp3 -i 1.mp3 -i 2.mp3 -i 3.mp3 ... [n.mp3] \
       -filter_complex "\
          [0]volume=1[a0]; \
          [1]adelay=1000[a1]; \
          [2]adelay=2000[a2]; \
          [3]adelay=3000[a3]; \
          :
          :
          [n]adelay=1000000[aN]; \
          [a0][a1][a2][a3] ... [aN] amix=[n]:duration=first" \
-y merged.mp3

但我在任何平台上都会遇到错误。

Linux的:

:
:
Input #200, mp3, from 'sounds2/200.mp3':
  Metadata:
    encoder         : Lavf56.25.101
  Duration: 00:00:02.95, start: 0.069063, bitrate: 24 kb/s
    Stream #200:0: Audio: mp3, 16000 Hz, mono, s16p, 24 kb/s
[amix @ 0x3cffb20] Value 201.000000 for parameter 'inputs' out of range [1 - 32]
    Last message repeated 1 times
[amix @ 0x3cffb20] Error setting option inputs to value 201.
[Parsed_amix_201 @ 0x3cffa60] Error applying options to the filter.
[AVFilterGraph @ 0x3b44980] Error initializing filter 'amix' with args '201:duration=first'
Error configuring filters.

Cygwin的:

  Stream #199:0 (mp3) -> adelay
  Stream #200:0 (mp3) -> adelay
  amix -> Stream #0:0 (aac)
Press [q] to stop, [?] for help
[Parsed_adelay_171 @ 00000000041fc0c0] Failed to configure input pad on Parsed_adelay_171
Error reinitializing filters!
Failed to inject frame into filter network: Cannot allocate memory
Error while processing the decoded data for stream #200:0
Conversion failed!

视窗:

The command line is too long.

你的解决方案是什么?

0 个答案:

没有答案