| 143 | | From the above, we can see that converting to **fltp** or **s16 with -rematrix_maxval 100** have the exact same max and mean volume, while converting to **s16** directly without setting **-rematrix_maxval** results in lot weaker volume. If I convert from 2-channel **flt** to 2-channel **s16**, the volume will not be affected at all. |
| | 143 | I also tried converting 2-channel **flt** to 2-channel **s16** and check the volome as below, output: **stereo-s16-from-2-ch-flt.mkv** |
| | 144 | {{{ |
| | 145 | % ffmpeg -y -i stereo-flt.mkv -c:a pcm_s16le stereo-s16-from-2-ch-flt.mkv |
| | 146 | Input #0, matroska,webm, from 'stereo-flt.mkv': |
| | 147 | Stream #0:0: Audio: pcm_f32le, 48000 Hz, 2 channels, flt, 3072 kb/s (default) |
| | 148 | Stream mapping: |
| | 149 | Stream #0:0 -> #0:0 (pcm_f32le (native) -> pcm_s16le (native)) |
| | 150 | Output #0, matroska, to 'stereo-s16-from-2-ch-flt.mkv': |
| | 151 | Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s (default) |
| | 152 | }}} |
| | 153 | |
| | 154 | Checked the volume of **stereo-flt.mkv** and **stereo-s16-from-2-ch-flt.mkv** (both have the exact same max and mean volume): |
| | 155 | {{{ |
| | 156 | % ffmpeg -i stereo-flt.mkv -af "volumedetect" -vn -sn -f null /dev/null |
| | 157 | Input #0, matroska,webm, from 'stereo-flt.mkv': |
| | 158 | Stream #0:0: Audio: pcm_f32le, 48000 Hz, 2 channels, flt, 3072 kb/s (default) |
| | 159 | Stream mapping: |
| | 160 | Stream #0:0 -> #0:0 (pcm_f32le (native) -> pcm_s16le (native)) |
| | 161 | Output #0, null, to '/dev/null': |
| | 162 | Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default) |
| | 163 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] n_samples: 6383616 |
| | 164 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] mean_volume: -21.6 dB |
| | 165 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] max_volume: 0.0 dB |
| | 166 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] histogram_0db: 1466 |
| | 167 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] histogram_1db: 1310 |
| | 168 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] histogram_2db: 3452 |
| | 169 | [Parsed_volumedetect_0 @ 0x7fc091f09c80] histogram_3db: 4591 |
| | 170 | |
| | 171 | |
| | 172 | % ffmpeg -i stereo-s16-from-2-ch-flt.mkv -af "volumedetect" -vn -sn -f null /dev/null |
| | 173 | Input #0, matroska,webm, from 'stereo-s16-from-2-ch-flt.mkv': |
| | 174 | Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default) |
| | 175 | Stream mapping: |
| | 176 | Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native)) |
| | 177 | Output #0, null, to '/dev/null': |
| | 178 | Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default) |
| | 179 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] n_samples: 6383616 |
| | 180 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] mean_volume: -21.6 dB |
| | 181 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] max_volume: 0.0 dB |
| | 182 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] histogram_0db: 1466 |
| | 183 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] histogram_1db: 1310 |
| | 184 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] histogram_2db: 3452 |
| | 185 | [Parsed_volumedetect_0 @ 0x7fcbc5604080] histogram_3db: 4591 |
| | 186 | }}} |
| | 187 | |
| | 188 | From the above, we can see that converting to **fltp** or **s16 with -rematrix_maxval 100** have the exact same max and mean volume, while converting to **s16** directly without setting **-rematrix_maxval** results in lot weaker volume. Also we can see that converting from 2-channel **flt** to 2-channel **s16**, the volume is not affected at all. |