THIS POST HAS BEEN PARTLY SUPERSEDED BY THE MUCH FASTER METHOD SHOWN HERE: http://johnwarburton.net/blog/?p=50731 BUT SOME METADATA IS OMITTED.
This post shows how to convert almost any kind of video and audio into native Avid Op-Atom MXF files, suitable for placement directly in Avid’s MXF media files directory. The method is fast, and uses only open source software. Crucially, conversion takes place on any machine, not just an Avid-equipped computer.
A side note regarding AMA: it’s sometimes (?) a little flaky when linking to files that aren’t from a small subset of QuickTime, or that have their own manufacturer-tested plugins.
In this example, I am importing footage into a 25fps HD project. The Avid codec is its own DNxHD, running at 145MBit/s.
Use FFmpeg to convert your incoming footage into uncompressed audio files, and into Avid’s native video format. Note that the video is not encapsulated beyond the raw DNxHD format: but this format contains almost enough information about the file to enable import to take place. Frame rate, for example, seems to be missing.
So, convert the incoming video into DNxHD and uncompressed audio with FFmpeg like this:
ffmpeg -i "bach.flv" -vcodec dnxhd -b:v 145M -an -sws_flags lanczos -vf "scale=1920:1080, smartblur=1.0:-1.0" bach-video.dnxhd -vn -ar 48000 -acodec pcm_s16le bach-audio.wav
I have scaled the video to the correct size using what I consider to be the best scaling algorithm (Lanczos), and have added a little crispness to avoid too much softening. Obviously, you will not want to do this to footage that is already the correct dimensions and does not need restoration.
Now, we must prepare these files for Avid, in the same way that Avid itself imports files. They must be encapsulated as Avid-flavour MXFs (Op-Atom). Here, the BBC and EBU-supported raw2bmx utility, from bmxlib, comes into play. Again, this is open source software, and this is a very simple command line. Much more metadata can be included, and you’ll need to think about this if you’re going to reconform the project at any stage.
On this command line, I instruct raw2bmx to wrap both the video file and the stereo audio file into MXF. The project name is given, as is a tape name. The output file location together with the file prefix is given.
You will also need to specify the frame rate, using the ‘-f’ option, if your footage is not 25fps. The rates acceptable are: 23976, 24, 25, 2997, 30, 50, 5994 and 60. The incoming DNxHD is specified by “–vc3_1080p_1237”, naming the codec, picture size and flavour. All such flavours are listed in the help for raw2bmx.
raw2bmx -t avid -f 25 --project BACH --clip "BACH001" -o "I:\Avid MediaFiles\MXF\1\BACH001" --vc3_1080p_1237 bach-video.dnxhd --wave bach-audio.wav
In your Avid Mediafiles directory, a number of MXF files will appear: Avid’s Media Tool will pick these up as clips with combined video and audio (if that’s what you’re converting), and you can drag the clips to whichever bin you wish. Note that the raw2bmx tool is terse in its progress reporting. It prints nothing until the end of the wrapping process.
Recent builds of FFmpeg can be downloaded here, and the bmxlib project is on Sourceforge here.