将 7 个音频通道合并到一个 ffmpeg xstack 中

将 7 个音频通道合并到一个 ffmpeg xstack 中

我的视频运行良好 - 我想将所有 7 个视频的音频混合到输出中

[a0][a1][a2][a3][a4][a5][a6]amix[aout] <-- 我认为命令必须在某处实现

到目前为止我的命令看起来像这样

ffmpeg \
   -i /Users/Malthe/test//1.mkv \
   -i /Users/Malthe/test//2.mkv \
   -i /Users/Malthe/test//3.mkv \
   -i /Users/Malthe/test//4.mkv \
   -i /Users/Malthe/test//5.mkv \
   -i /Users/Malthe/test//8.mkv \
   -i /Users/Malthe/test//9.mkv \
  -filter_complex " \
      [0:v] setpts=PTS-STARTPTS, scale=wuxga [a0]; \
      [1:v] setpts=PTS-STARTPTS, scale=wuxga[a1]; \
      [2:v] setpts=PTS-STARTPTS, scale=wuxga [a2]; \
      [3:v] setpts=PTS-STARTPTS, scale=wuxga[a3]; \
      [4:v] setpts=PTS-STARTPTS, scale=wuxga[a4]; \
      [5:v] setpts=PTS-STARTPTS, scale=wuxga[a5]; \
      [6:v] setpts=PTS-STARTPTS, scale=wuxga [a6]; \
      [a0][a1][a2][a3][a4][a5][a6]xstack=inputs=7:layout=0_0|w0_0|w0+w1_0|0_h0|w0_h0|w0+w1_h0|0_h0+h1[out] \
      " \
    -map "[out]" \
      -c:v libx264 -preset slow -crf 0 -level:4 -profile:high -b:v 2500k -c:a  copy  output.mov

答案1

关闭。

ffmpeg \
   -i /Users/Malthe/test//1.mkv \
   -i /Users/Malthe/test//2.mkv \
   -i /Users/Malthe/test//3.mkv \
   -i /Users/Malthe/test//4.mkv \
   -i /Users/Malthe/test//5.mkv \
   -i /Users/Malthe/test//8.mkv \
   -i /Users/Malthe/test//9.mkv \
  -filter_complex " \
      [0:v] setpts=PTS-STARTPTS, scale=wuxga [a0]; \
      [1:v] setpts=PTS-STARTPTS, scale=wuxga[a1]; \
      [2:v] setpts=PTS-STARTPTS, scale=wuxga [a2]; \
      [3:v] setpts=PTS-STARTPTS, scale=wuxga[a3]; \
      [4:v] setpts=PTS-STARTPTS, scale=wuxga[a4]; \
      [5:v] setpts=PTS-STARTPTS, scale=wuxga[a5]; \
      [6:v] setpts=PTS-STARTPTS, scale=wuxga [a6]; \
      [a0][a1][a2][a3][a4][a5][a6]xstack=inputs=7:layout=0_0|w0_0|w0+w1_0|0_h0|w0_h0|w0+w1_h0|0_h0+h1[outv]; \
      [0:a][1:a][2:a][3:a][4:a][5:a][6:a]amix=inputs=7[outa]
      " \
    -map "[outv]" -map "[outa]" \
      -c:v libx264 -preset slow -crf 0 -level:4 -profile:high -c:a aac output.mov

(使用 crf 或比特率;对于 5760x3240 来说,2500k 的比特率太低了)

相关内容