美文网首页
FFMpeg命令行学习笔记(5)ffmpeg中的amerge指令

FFMpeg命令行学习笔记(5)ffmpeg中的amerge指令

作者: WSGNSLog | 来源:发表于2016-10-18 16:35 被阅读140次

    6.15 amerge
    Merge two or more audio streams into a single multi-channel stream.
    将两个或多个音频流合并成单个多通道流。

    The filter accepts the following options:

    inputs
    Set the number of inputs. Default is 2.

    If the channel layouts of the inputs are disjoint, and therefore compatible, the channel layout of the output will be set accordingly and the channels will be reordered as necessary. If the channel layouts of the inputs are not disjoint, the output will have all the channels of the first input then all the channels of the second input, in that order, and the channel layout of the output will be the default value corresponding to the total number of channels.
    如果输入的通道布局不相交,并且兼容,则将相应地设置输出的通道布局,并且根据需要重新排序通道。如果输入的通道布局不是不相交的,则输出将具有第一输入源的所有通道,然后按照该顺序具有第二输入源的所有通道,并且输出的通道布局将是对应于总通道数的默认值。
    For example, if the first input is in 2.1 (FL+FR+LF) and the second input is FC+BL+BR, then the output will be in 5.1, with the channels in the following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the first input, b1 is the first channel of the second input).
    例如,如果第一输入在2.1(FL + FR + LF),第二输入是FC + BL + BR,则输出将在5.1中,通道按照以下顺序:a1,a2,b1, a3,b2,b3(a1是第一输入的第一通道,b1是第二输入的第一通道)。
    On the other hand, if both input are in stereo, the output channels will be in the default order: a1, a2, b1, b2, and the channel layout will be arbitrarily set to 4.0, which may or may not be the expected value.
    另一方面,如果两个输入都是立体声的,则输出声道将以默认顺序:a1,a2,b1,b2,并且频道布局将被任意设置为4.0,其可以是或可以不是期望值。
    All inputs must have the same sample rate, and format. If inputs do not have the same duration, the output will stop with the shortest.
    所有输入必须具有相同的采样率和格式。
    如果输入的持续时间不相同,输出将以最短的时间停止。
    6.15.1 Examples

    Merge two mono files into a stereo stream:

    amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
    

    Multiple merges assuming 1 video stream and 6 audio streams in input.mkv:

    ffmpeg -i input.mkv -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6] amerge=inputs=6" -c:a pcm_s16le output.mkv

    相关文章

      网友评论

          本文标题:FFMpeg命令行学习笔记(5)ffmpeg中的amerge指令

          本文链接:https://www.haomeiwen.com/subject/gvrtuttx.html