如何将两个音频合并为一个,但使用第一个音频的长度?

How can I combine two audios into one, but using the length of the first audio?

有两个音频。我需要将它们相互连接(两个通道),但长度与第一个相同。我在 Stack Overflow 上找到了一条命令,它部分解决了我的问题:ffmpeg -i AgAD3RMAAvgr.ogg -i audio.mp3 -filter_complex amix=inputs=2:duration=longest output.mp3.

使用duration=first:

ffmpeg -i AgAD3RMAAvgr.ogg -i audio.mp3 -filter_complex amix=inputs=2:duration=first output.mp3

参见amix filter documentation