首页 文章

其他编解码器的缩混默认值

提问于
浏览
2

请考虑以下两个文件

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mp4':
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x784
Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'b.mp4':
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1038
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp

a.mp4有6声道AC3音频,b.mp4有6声道AAC音频 . 如果我像这样下混a.mp4

ffmpeg -i a.mp4 -c:v copy -ac 2 outfile.mp4

它将使用来自ac3dec.c的默认缩混系数

但是,如果我像这样下载b.mp4

ffmpeg -i b.mp4 -c:v copy -ac 2 outfile.mp4

这些默认值在哪里定义?

1 回答

  • 3

    “中心混音级别”和“环绕声混音级别”的默认值为

    // In file libswresample/swresample.c
    "set center mix level"      , OFFSET(clev), AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}
    "set surround mix level"    , OFFSET(slev), AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}
    

    这是

    // In file libswresample/swresample.c
    #define C_30DB  M_SQRT1_2
    

    这是

    //       In file libavutil/mathematics.h
    // included from libavutil/avutil.h
    //          from libavutil/opt.h
    //          from libswresample/swresample.c
    #define M_SQRT1_2      0.70710678118654752440
    

    swresample.c

    mathematics.h

相关问题