我有两个视频,一个没有音频(第二个)。尝试合并它们时出现此错误:
mkvmerge concat1.webm +concat2.webm -o output.webm
mkvmerge v5.8.0 ('No Sleep / Pillow') built on Oct 19 2012 13:07:37
Automatically enabling WebM compliance mode due to output file name extension.
'concat1.webm': Using the demultiplexer for the format 'Matroska'.
concat2.webm': Using the demultiplexer for the format 'Matroska'.
'concat1.webm' track 0: Using the output module for the format 'VP8'.
concat2.webm' track 0: Using the output module for the format 'VP8'.
concat2.webm' track 1: Using the output module for the format 'Vorbis'.
No append mapping was given for the file no. 1 (concat2.webm'). A default mapping of 1:0:0:0,1:1:0:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.
Error: The file no. 0 ('concat1.webm') does not contain a track with the ID 1, or that track is not to be copied. Therefore no track can be appended to it. The argument for '--append-to' was invalid.
有没有办法指示mkvmerge
简单地延长第一个音轨?
答案1
据我所知,您无法mkvmerge
独自完成此操作。当我遇到此问题时,我曾经ffmpeg
添加静音音频(具有匹配的采样率、通道数和每样本位数)。以下示例将 48 kHz 采样率的静音单声道音频添加到视频中没有再压缩。
ffmpeg -i in.mkv -f lavfi -i "aevalsrc=0::s=48000" -shortest -c:v copy out.mkv
也可以看看: