[FFmpeg-user] amid fails when there are more than 8 input channels (in one file)

Bouke / VideoToolShed bouke at videotoolshed.com
Fri May 4 13:42:53 EEST 2018




> On 02 May 2018, at 16:20, Moritz Barsnick <barsnick at gmx.net> wrote:
> 
> On Wed, May 02, 2018 at 15:51:09 +0200, Bouke / VideoToolShed wrote:
>> Strange thing, more than 8 channels give silent output:
>> ffmpeg -i 9Ch_orMore.WAV -filter_complex "[0:0][0:0] amix=inputs=2,pan=mono|c0=c0+c1” -ac 1 mono.wav
>> gives on errors whatsoever, but output is silent.
> 
> "No" errors?

Hi Moritz:

Boukes-portable:~ bouke$ /Volumes/Leo/Tim/ffmpeg   -i /Volumes/Leo/Tim/9chan.wav  -filter_complex '[0:0][0:0]amix=inputs=2,pan=mono|c0=c0+c1,volumedetect' -t 5 -f null -
ffmpeg version 3.3-tessus Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi --enable-version3 --disable-ffplay --disable-indev=qtkit
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, wav, from '/Volumes/Leo/Tim/9chan.wav':
  Metadata:
    comment         : 9chan.wav
    encoded_by      : Avid Media Composer 8.6.1
    originator_reference: 000000000000002a5ae9870f0645a69b
    date            : 2018-05-02
    creation_time   : 11-39-48
    time_reference  : 172800000
    coding_history  : PCM	MODE:STEREO	SAMPLE_RATE:48000	BITS_PER_SAMP:24
                    : DIGITIZE	CARD:DeckLink Studio 2 & 1394 Audio & DirectSound Audio	PERIPHERAL:DeckLink Studio 2 & Avid OHCI
                    :
  Duration: 00:00:15.04, bitrate: 10368 kb/s
    Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 9 channels, s32 (24 bit), 10368 kb/s
[Parsed_volumedetect_2 @ 0x7fa64b522cc0] n_samples: 0
Stream mapping:
  Stream #0:0 (pcm_s24le) -> amix:input0
  Stream #0:0 (pcm_s24le) -> amix:input1
  volumedetect -> Stream #0:0 (pcm_s16le)
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    comment         : 9chan.wav
    encoded_by      : Avid Media Composer 8.6.1
    originator_reference: 000000000000002a5ae9870f0645a69b
    date            : 2018-05-02
    coding_history  : PCM	MODE:STEREO	SAMPLE_RATE:48000	BITS_PER_SAMP:24
                    : DIGITIZE	CARD:DeckLink Studio 2 & 1394 Audio & DirectSound Audio	PERIPHERAL:DeckLink Studio 2 & Avid OHCI
                    :
    time_reference  : 172800000
    encoder         : Lavf57.71.100
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s (default)
    Metadata:
      encoder         : Lavc57.89.100 pcm_s16le
size=N/A time=00:00:05.00 bitrate=N/A speed=2.86x
video:0kB audio:469kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[Parsed_volumedetect_2 @ 0x7fa64b702360] n_samples: 240241
[Parsed_volumedetect_2 @ 0x7fa64b702360] mean_volume: -91.0 dB
[Parsed_volumedetect_2 @ 0x7fa64b702360] max_volume: -91.0 dB
[Parsed_volumedetect_2 @ 0x7fa64b702360] histogram_91db: 240241

Thus, silence.
Same with a 4 channel file (same content on ch. 1 to 4)

Boukes-portable:~ bouke$ /Volumes/Leo/Tim/ffmpeg   -i /Volumes/Leo/Tim/4chan.wav  -filter_complex '[0:0][0:0]amix=inputs=2,pan=mono|c0=c0+c1,volumedetect' -t 5 -f null -
ffmpeg version 3.3-tessus Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi --enable-version3 --disable-ffplay --disable-indev=qtkit
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Guessed Channel Layout for Input Stream #0.0 : 4.0
Input #0, wav, from '/Volumes/Leo/Tim/4chan.wav':
  Metadata:
    comment         : 4chan.wav
    encoded_by      : Avid Media Composer 8.6.1
    originator_reference: 000000000000002a5ae9872706460222
    date            : 2018-05-02
    creation_time   : 11-40-12
    time_reference  : 172800000
    coding_history  : PCM	MODE:STEREO	SAMPLE_RATE:48000	BITS_PER_SAMP:24
                    : DIGITIZE	CARD:DeckLink Studio 2 & 1394 Audio & DirectSound Audio	PERIPHERAL:DeckLink Studio 2 & Avid OHCI
                    :
  Duration: 00:00:15.04, bitrate: 4608 kb/s
    Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 4.0, s32 (24 bit), 4608 kb/s
[Parsed_volumedetect_2 @ 0x7fed73421460] n_samples: 0
Stream mapping:
  Stream #0:0 (pcm_s24le) -> amix:input0
  Stream #0:0 (pcm_s24le) -> amix:input1
  volumedetect -> Stream #0:0 (pcm_s16le)
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    comment         : 4chan.wav
    encoded_by      : Avid Media Composer 8.6.1
    originator_reference: 000000000000002a5ae9872706460222
    date            : 2018-05-02
    coding_history  : PCM	MODE:STEREO	SAMPLE_RATE:48000	BITS_PER_SAMP:24
                    : DIGITIZE	CARD:DeckLink Studio 2 & 1394 Audio & DirectSound Audio	PERIPHERAL:DeckLink Studio 2 & Avid OHCI
                    :
    time_reference  : 172800000
    encoder         : Lavf57.71.100
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s (default)
    Metadata:
      encoder         : Lavc57.89.100 pcm_s16le
size=N/A time=00:00:05.00 bitrate=N/A speed=6.08x
video:0kB audio:469kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[Parsed_volumedetect_2 @ 0x7fed73605840] n_samples: 240405
[Parsed_volumedetect_2 @ 0x7fed73605840] mean_volume: -26.8 dB
[Parsed_volumedetect_2 @ 0x7fed73605840] max_volume: -11.4 dB
[Parsed_volumedetect_2 @ 0x7fed73605840] histogram_11db: 18
[Parsed_volumedetect_2 @ 0x7fed73605840] histogram_12db: 75
[Parsed_volumedetect_2 @ 0x7fed73605840] histogram_13db: 184

But, when I swap Amix with Amerge, all is well also with 9 channels…

I don’t understand it, but it’s good enough for rock ’n roll.

Thanks all!

Bouke

> 
> This works for me (9 inputs):
> $ ffmpeg -f lavfi -i anoisesrc=seed=0 -f lavfi -i anoisesrc=seed=1 -f lavfi -i anoisesrc=seed=2 -f lavfi -i anoisesrc=seed=3 -f lavfi -i anoisesrc=seed=4 -f lavfi -i anoisesrc=seed=5 -f lavfi -i anoisesrc=seed=6 -f lavfi -i anoisesrc=seed=7 -f lavfi -i anoisesrc=seed=8 -filter_complex 'amerge=inputs=9,pan=mono|c0=c0+c1,volumedetect' -t 5 -f null -
> 
> (volumedetect is there to verify that it is not silent.)
> 
> What are you trying to achieve with amix?
> 
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20180504/a38965bd/attachment.sig>


More information about the ffmpeg-user mailing list