mkvmerge:如何合并两个视频,一个不带音频?


0

我有两个视频,一个没有音频(第二个)。尝试合并它们会出现此错误:

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简单地扩展第一个音频轨道?

Answers:


1

抱歉,您不能mkvmerge独自做到这一点。遇到此问题时,我通常ffmpeg会添加无声音频(具有匹配的采样率,每个采样的通道数和位数)。下面的示例在重新压缩的情况下将具有48 kHz采样率的无声单声道音频添加到视频中。

ffmpeg -i in.mkv -f lavfi -i "aevalsrc=0::s=48000" -shortest -c:v copy out.mkv

也可以看看:

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.