[FFmpeg-user] amix vs amerge / how to

Media Mouth communque at gmail.com
Sun Jun 9 03:46:34 EEST 2024


Following up...

Here's an attempt at re-mapping audio using "channelmap" as opposed to amix, amerge, or join

input.mxf is a 4-audio channel video file
Goal of this test to move a1 to a3, a2 to a4,  a3 to a1, a4 to a2 and output the results to a 

ffmpeg -i input.mxf \
-filter_complex "channelmap=channel_layout=quad:map=0-2|1-3|2-0|3-1" \
output.mov

Here's the stdout

ffmpeg version 3.1.11 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: 
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Input #0, mxf, from 'input.mxf':
  Metadata:
    product_version : 1.0.47.10029.1
    application_platform: MXF::SDK (4.7.6) on Mac OS X
    product_uid     : d49f75ba-4965-4cfa-9d11-cd87206287e0
    uid             : e103e154-25da-11ef-80db-804a1469dc20
    generation_uid  : e103e155-25da-11ef-9902-804a1469dc20
    company_name    : Avid Technology, Inc.
    product_name    : Avid MediaProcessor Plug-In
    modification_date: 2024-06-08 21:05:48
    material_package_umid: 0x060A2B340101010501010D1213C5AB48E0DF86046904068872F3804A1469DC20
    timecode        : 09:21:59:23
  Duration: 00:00:03.29, start: 0.000000, bitrate: 121676 kb/s
    Stream #0:0: Video: dnxhd, yuv422p(bt709/unknown/unknown), 1920x1080, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D1213591381E0DF860469040688E37F804A1469DC20
      file_package_name: Source Package
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D1213591381E0DF860469040688E37F804A1469DC20
      file_package_name: Source Package
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D1213591381E0DF860469040688E37F804A1469DC20
      file_package_name: Source Package
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D1213591381E0DF860469040688E37F804A1469DC20
      file_package_name: Source Package
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D1213591381E0DF860469040688E37F804A1469DC20
      file_package_name: Source Package
[Parsed_channelmap_0 @ 0x7fb6757014e0] input channel #1 not available from input layout 'mono'
[Parsed_channelmap_0 @ 0x7fb6757014e0] input channel #2 not available from input layout 'mono'
[Parsed_channelmap_0 @ 0x7fb6757014e0] input channel #3 not available from input layout 'mono'
[Parsed_channelmap_0 @ 0x7fb6757014e0] Failed to configure input pad on Parsed_channelmap_0
Error configuring complex filters.
Invalid argument



> On Jun 8, 2024, at 15:09, Media Mouth <communque at gmail.com> wrote:
> 
> I'm looking to take Avid MXF outputs with up to 20 audio tracks, and mix them down to various combinations, e.g. Stereo Mix, Stereo music, mono dialogue only, Mono DM&E splits, etc etc. all kinds of permutations and combinations.
> 
> So the basic pipeline: Export MXF from Avid with "Direct Out" (i.e. all timeline audio tracks sent to discreet channels in the MXF) and then use FFmpeg to mix down the audio tracks in any combo.
> If we can figure this out, it will make our post production far more efficient.
> 
> I perused FFmpeg's docs and various forums, but have yet to find clear, comprehensive way to use -map, -filter_complex / amerge and/or amix to achieve this.
> 
> Thanks
> 
> C. Munque.



More information about the ffmpeg-user mailing list