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

时间:2014-06-02 16:08:45

标签: ffmpeg

考虑以下两个文件

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 个答案:

答案 0 :(得分: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