Log in

View Full Version : Demuxing XDCAM HD422.mxf audio tracks


WorBry
2nd March 2017, 16:08
I've been helping someone (on another forum) with editing of XDCAM HD422.mxf footage using the linux NLE KDenLive, which runs on the MLT framework (ffmpeg based). KDenLive imports the native mxf files OK, but can't handle multi-audio track import - it only extracts the first (PCM) audio track and his footage was recorded with two audio tracks.

Best prospect is probably extracting the audio tracks and importing the 'missing' track separately. I know ffmpeg/ffmbc can be used to demux mxf files and also merge audio tracks, but he's not familiar with using command line tools and he wants to edit the audio tracks independently.

Anyone know of a freeware tool (Linux and/or Windows) with GUI that can demux mxf audio tracks ?

Tried AVIDemux but it doesn't accept mxf files.

Cheers.

shekh
2nd March 2017, 16:27
Hi, this option exists in VDFM. If the file is accepted by ffmpeg, you go to Audio->source audio to select stream and then File->save wav.

WorBry
2nd March 2017, 17:07
Yes, that works. Thanks shekh.

I wonder though if there's something similar in linux, just as an option. He's running Ubuntu 16.04.

WorBry
3rd March 2017, 14:03
I wonder though if there's something similar in linux, just as an option. He's running Ubuntu 16.04.

There are a couple of options. One using VLC player (via command line) to extract the audio streams in WAV format. Another using the ffmpeg-based version of the linux NLE Cinelerra - Cinelerra GG 5.1 - which imports native XDCAM HD422.mxf clips and loads all four mono audio streams/channels as separate tracks on the timeline. Doesn't come close to KDenLive for video editing/CC features, but could be used in this context for exporting the audio streams.

I'd be inclined to use VDFM though - nice and straightforward.

Kisa_AG
6th March 2017, 14:22
WorBry;1799318]

I do it by the following way:

::start
Set argpath=%~dp0
Start /b /wait %argpath%bin\ffmpeg.exe -i %1 -filter_complex "[0:1][0:2]amerge=inputs=2[aout]" -map "[aout]" %~dpn1.wav
pause
::END

This is a drag-n-drop script, it takes MXF, merges tracks 1 and 2 to stereo and saves it as WAV without any recompression.

===================================================
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 'F:\Cam02_767_0066.MXF':
Metadata:
Duration: 01:43:02.32, start: 0.000000, bitrate: 38550 kb/s
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
file_package_umid: 0x060A2B340101010501010D2313000000705A8FC4E94B4947824F09CE995731EA
Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D2313000000705A8FC4E94B4947824F09CE995731EA
Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D2313000000705A8FC4E94B4947824F09CE995731EA
Stream #0:3: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D2313000000705A8FC4E94B4947824F09CE995731EA
Stream #0:4: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D2313000000705A8FC4E94B4947824F09CE995731EA
[Parsed_amerge_0 @ 0000000002684ce0] No channel layout for input 1
[Parsed_amerge_0 @ 0000000002684ce0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
Output #0, wav, to 'F:\Cam02_767_0066.wav':
Metadata:
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
encoder : Lavc57.66.108 pcm_s16le
Stream mapping:
Stream #0:1 (pcm_s16le) -> amerge:in0
Stream #0:2 (pcm_s16le) -> amerge:in1
amerge -> Stream #0:0 (pcm_s16le)
Press [q] to stop, [?] for help
size= 1159185kB time=01:43:02.32 bitrate=1536.0kbits/s speed=29.3x
video:0kB audio:1159185kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000008%
===================================================


In the same way you can take any of 4 tracks on MXF file.