美文网首页
ffmpeg # -c copy 拷贝所有的流

ffmpeg # -c copy 拷贝所有的流

作者: FlyingPenguin | 来源:发表于2018-08-01 20:56 被阅读1093次
    ffmpeg -i test.mp4 -c copy output.mkv
    
    

    -c copy WILL copy all the streams。表明要拷贝所有的流

    -c[:stream_specifier] codec (input/output,per-stream)
    -codec[:stream_specifier] codec (input/output,per-stream)
    Select an encoder (when used before an output file) 
    or a decoder (when used before an input file) for one or more streams. 
    codec is the name of a decoder/encoder or a special value copy (output only) to indicate that the stream is not to be re-encoded.
    

    For example

    ffmpeg -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT
    

    encodes all video streams with libx264 and copies all audio streams.

    For each stream, the last matching c option is applied, so

    ffmpeg -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT
    

    will copy all the streams except the second video, which will be encoded with libx264, and the 138th audio, which will be encoded with libvorbis.

    References:

    https://ffmpeg.org/ffmpeg-all.html

    相关文章

      网友评论

          本文标题:ffmpeg # -c copy 拷贝所有的流

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