Log in

View Full Version : mxf in avisynth


Floatingshed
6th June 2013, 09:55
I've been unable to get any mxf's into Avisynth, so decided to de-mux first. Really this is a FFMBC question but there isn't a section for that...!

I can de-mux the video like this:

ffmbc -i test.mxf -t 60 -vcodec copy video.m2v

or the audio like this:

ffmbc -i test.mxf -t 60 -acodec copy -vn audio.wav

But trying to do both at the same time fails:

ffmbc -i test.mxf -t 60 -vcodec copy video.m2v -acodec copy audio.wav

The error is: [wav @ 01eca520] NONE codec not supported in WAVE format
Could not write header for output file #1

ffmpeg appears to de-mux both audio and video at once (using the same command) but the resulting audio is mangled.

Any help much appreciated.

Thanks.

hanfrunz
6th June 2013, 12:01
Can please give us more information about this MXF file? How many tracks? What kind of audio codec?
Where does it come from?

regards
hanfrunz

Floatingshed
6th June 2013, 12:43
Certainly.
The mxf contains one m2v video file and 4 pcm audio files.
It was produced (I think) on an avid editor and is a promotional video for a Portugese shopping centre! (I am the voice-over on it!)
My object here is to make a more compatible version to use as a demo of my work.

poisondeathray
6th June 2013, 14:08
I've been unable to get any mxf's into Avisynth,


ffms2

Floatingshed
6th June 2013, 14:37
ffms2

Tried that, ffaudiosource only returns the first audio track.

paradoxical
6th June 2013, 15:16
Tried that, ffaudiosource only returns the first audio track.

Use separate FFAudioSource calls and specify a different track number for each call.

Floatingshed
7th June 2013, 17:12
Use separate FFAudioSource calls and specify a different track number for each call.

Aha! So that's where I was going wrong. Thanks.

I've sorted it out now, although I'm still curious about ffmbc's reluctance...

jordanh
8th June 2013, 00:10
, although I'm still curious about ffmbc's reluctance...

You nailed it. Ufortunately audio handling of MXF Files is not only in ffmpeg based stuff complicated. It is one of the most common "incompatibility" problems of MXF in general.
Basically for understanding the problem you first have to understand that there are different ways to transport audio in MXF:
-) with or without audio header (typically wav or AES)
-) devided into multiple tracks or multiple channels in one stream
* SD/D10: 8 ch / 1 track
* HD/XDCAMHD: 8 ch / 8 tracks
* some dirty mxf: 2 ch / 1 track
* other dirty mxf: 4ch / 2 tracks

Now, what you did was to ask default wav for output from ffmbc, without specifying any channel layout. If i was the developer of ffmbc, i would for sure use 2ch / 1 track for default wav layout.