VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. I have 2 different types of MXF files I'm dealing with. One XDCAM35 and the other is XDCAM50. Both have 4 channels of mono audio. I am trying to figure out a way to demux only the first 2 channels of audio and then combine them into a Stereo WAV file.

    My problem lies in the fact that both seem to map the audio in a different way.

    The XDCAM35 looks like this...

    Stream #0:0: Data: none
    file_package_name: Source Package
    data_type : vbi_vanc_smpte_436M
    Stream #0:1: Video: mpeg2video (Main), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 1
    6:9], max. 35000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    file_package_name: Source Package
    Stream #0:2: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s

    Stream #0:3: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s

    Stream #0:4: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s

    Stream #0:5: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s



    and the XDCAM50 looks like this...


    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1
    :1 DAR 16:9], 50000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    file_package_name: Source Package
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s

    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s

    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s

    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s


    They map the audio on different streams. I'm trying to code a program that will accept an input MXF file, demux only the first 2 channels of audio, and make it into a stereo WAV, which I'll later encode to aac.

    Is there an easy way of using ffmpeg to demux the first 2 audio channels assuming it doesn't know the type of file it's expecting beforehand? Or is there a better program that will allow me to do this easier?
    Last edited by nesburf; 8th Jun 2015 at 13:42.
    Quote Quote  
  2. You can use map_audio_channel with ffmbc . I think another way is to use -af amerge or pan with ffmpeg using -filter complex

    ffmbc -i input_xdcam35.MXF -map_audio_channel 0:2:0:0:0:0 -map_audio_channel 0:3:0:0:0:1 -acodec pcm_s16le output_xdcam35.wav

    ffmbc -i input_xdcam50.MXF -map_audio_channel 0:1:0:0:0:0 -map_audio_channel 0:2:0:0:0:1 -acodec pcm_s24le output_xdcam50.wav

    The syntax for -map_audio_channel is
    Input file : Input stream : Input channel : Output file : Output stream : Output channel

    so if you have files with other configurations or stream mappings, just change the numbers
    Last edited by poisondeathray; 8th Jun 2015 at 13:54.
    Quote Quote  
  3. Ok, I got that working, now is there a way to mix the audio channels together.
    So input track1 ---> left and right output
    input track2 ----> left and right output

    I know there is a way to do this with SoX...is there a way to do this with ffmpeg or ffmbc?
    Quote Quote  
  4. ah perfect, figured it out
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!