View Full Version : OMF Import Filter
tateu
12th December 2005, 06:56
There is probably very little demand for this filter, but for those few of us with AVID systems that use AviSynth in our daily workflow...
I've made some decent progress on an OMF import filter that I first released a few months ago. While still far from complete (and far from bug free), this new version can handle a wider variety of OMF files.
http://www.tateu.net/software/dl.php?f=OmfSource
You will need omfToolkit.dll in your system path, which can be downloaded from OMF.zip at:
http://www.aafassociation.org/download/
about 1/3 of the way down the page in the link for "OMF developer libraries."
It handles only a very small subset of the OMF file format - Video Only (audio and other data may cause problems) and can read these formats:
1:1 Uncompressed YUY2 (CDCI)
Mpeg2 I frame only
DV25
Mjpeg (2:1, 15:1, etc.)
Usage is:
OMFInput("FileName.omf", order = -1, levels = 0, info = 0)
OMFInput("FileName.omf")
see OmfSource_usage.htm for some more info.
The output is YUY2 for 1:1, DV25 and Mjpeg. Mpeg2 outputs YV12.
It only works with captured files. There is no support for effect render OMFs or OMFs exported from the timeline. It has only been tested with files captured by AVID Adrenaline and XPress Pro systems and rendered by Adobe After Effects, so there is no guarantee that it will work with files from a different system.
You can download the source from:
http://www.tateu.net/software/dl.php?f=OmfSource_src
If you want to compile it, read the compile.txt file for info.
Mug Funky
12th December 2005, 10:31
thanks for this :) i don't have a use for it, but i have a feeling a friend of mine has a bunch of OMF files sitting around.
hanfrunz
13th December 2005, 19:55
cool! Do you see any chance to make the filter also an export-filter. I have done something similar with my importuncompressed-filter. If you have an uncompressed omf, you can write data back in the same file! So you could: digitize master tape, run avisynthscript for deinterlacing, write back to the same file, play out to digitalbeta. Or you could make 16:9 letterboxing very quick :)
regards,
hanfrunz
CirTap
13th December 2005, 20:09
Hi,
excellent addition!
I believe Nuendo users will love this, too :-)
The manual mentions:
Mpeg2 I frame only (via libmpeg2)
DV25 (via Cedocida DV Codec )
Mjpeg (2:1, 15:1, etc.) (via jpegsrc6b)
so these libs must be in the path as well?
on the long run, audio support would be essential.
Have Fun,
CirTap
tateu
13th December 2005, 20:31
hanfrunz,
Yes, I have plans to try and write an export filter (uncompressed, mjpg, DV25 and mpeg2). I had planned to write the data into a new OMF container, which would require you to import the new file back into your editing software and manually replace all instances of it. I didn't actually think of writing the data back into the same OMF container, but that's a great idea, since it should automatically replace all instances of the file in your editing software. Thanks.
AviSynth deinterlacing is the main reason that I wrote this filter. Almost all of the projects we work on require progressive output. On a recent project a few months ago (back when we were using a Matrox Digisuite system, which captures to AVI) I needed to deinterlace about 150 clips ranging in duration from 5 - 120 seconds. That would have been a pain to do manually so I wrote a perl script that parsed the AVI directory, created an AviSynth script and ran it through Virtualdub. Then we bought an AVID Adrenaline and I realized that this method was no longer an option. That's when I found your uncompressed filter and started looking into the OMF file structure.
I am also planning on a direct stream copy mode. This would copy the raw data into another video container (yuv.avi, mjpg.avi, DV.avi, mpeg2.m2v), into a raw video format or into a sequence of still frames.
And I also have plans to try and write a commandline OMF encoder, with raw format, avi and/or avisynth as input.
CirTap,
No, the libraries are compiled into the filter. The only dll you need is omfToolkit.dll. You only need those libraries if you plan to compile the source code.
Audio import is low on the priority list (we only work with video) but it is definately planned.
CirTap
13th December 2005, 20:45
thanks, tateu, 'cos the DV codec seems to be available as source "only", and I can't compile that stuff :)
now, despite the filter doesn't support audio, it shouldn't harm if the OMF does contain some, right? IIRC an "OMF compliant application" should just ignore the streams it can't handle.
CirTap
tateu
13th December 2005, 21:03
It should ignore it, but the idea of an "OMF compliant application" is almost funny. The OMFtoolkit SDK is years out of date and not even AVID completely adheres to it any more. Since I only have access to an AVID and every manufacturer seems to make their own slight changes to the format, I have no way of testing all the different types of OMFs. If you find one that my filter crashes on or won't import and you have a way of sending the file to me, I'd be happy to take a look and see if I can fix it.
I have not yet tested any OMFs with audio, but I have found several OMFs that I cannot read. So far, I can read everything (except for DV50) captured by my AVID system or rendered by Adobe After Effects but OMFs that were created by an AVID effect render or by an AVID import/export are sometimes unreadable or have crashed my filter. I'll see if I can export an OMF with audio, later this afternoon, to check what happens when I try to read it.
Update...Just exported an OMF with DV25 video and 2 channels of WAV audio. My filter successfully opened the video and ignored the audio.
CirTap
13th December 2005, 21:45
well, don't bother with audio (now) ...
Since I only have access to an AVID and every manufacturer seems to make their own slight changes to the format, I have no way of testing all the different types of OMFs. maybe the format is just too "open" :-)
Mug Funky
14th December 2005, 03:54
hey, writing-in-place would be a great idea! big space-saver.
too bad i don't have avid :(
though any time you want to look at the mov format... :)
tateu
14th December 2005, 04:11
though any time you want to look at the mov format... :)
Actually...I already have. I downloaded the Quicktime 7 SDK a few months ago and started working on an AviSynth import and export filter. It needs Quicktime 7 installed and can read almost any video format that you have a Quicktime plugin for. The audio import is extremely buggy, though, and AVC video is slow (though I think that is Quicktimes fault because I can't play any AVC movies in the Quicktime player at more than 15-16fps, on a dual 3.0GHz Xeon).
It can also export to video only quicktimes, but you cannot set advanced codec parameters...yet.
I've always planned on releasing it but I haven't done any work on it in a few months or spent too much time testing it. And since DirectShowSource seems to open most Quicktimes, I never thought there was much need for it. The reason I started working on it, was to handle Quicktime reference movies, which DirectShowSource cannot open.
If you or anyone else is interested (and realizing that there are still some issues with it) I could probably spend a few hours cleaning it up and getting an initial (buggy) version ready to release.
Wilbert
14th December 2005, 10:41
If you or anyone else is interested (and realizing that there are still some issues with it) I could probably spend a few hours cleaning it up and getting an initial (buggy) version ready to release.
We are always interested!
Export filter means that you can open scripts in Quicktime? That would be very nice :)
Mug Funky
14th December 2005, 11:09
don't sweat the audio too much - we can strip that out just fine with quicktime player. i noticed ffmpeg doesn't handle anything but stereo particularly well, so i guess it's a grey area in mov's specs or something (6 or 4 channel movs are hellish to demux with anything but QT player). and TMPG's qtreader passes everything as 44.1k and crashes on audio...
one thing i'm interested in is returning something other than RGB, because i've yet to be able to do that with DSS or (obviously) Qtreader.vfp. ffmpeg does it okay, but that requires an intermediate avi file, which defeats the purpose of avisynth somewhat. at work i've been getting an increasing number of blackmagic movs, and would rather not go uyvy to RGB to yv12 if i can help it :). if it's me doing the capping i use avi, but not everyone does that...
[edit]
but don't let this hijack your OMF plugin. movsource should really get its own thread if it's going to happen...
tateu
14th December 2005, 11:31
By export, I meant like ImageWriter. The filter compresses and writes video data to a quicktime movie file. A plugin for quicktime that opens avisynth scripts is probably a little beyond my abilities.
My quicktime filter currently outputs RGB24, RGB32 or YUY2. YV12 is completely broken however. And I just tried YUY2 output from a Blackmagic quicktime and it seems to work. But the way my filter works is by using the installed codec to decode the source video into the requested format. This means it is left up to the quicktime codec to decide how to output the requested colorspace.
I'll see if I can get a test version ready sometime soon, probably over the weekend and then I'll start a new thread for it.
As for my OMF filter, I just added the ability to use a vfw DV50 codec (Matrox DVCPro50) to decode DV50 OMFs. I need to play around and test it some more before releasing it, though.
peter100m
15th December 2005, 10:18
tateu,
thanks a lot! A valuable addition to Avisynth, more source/import filters! Will test some old OMFs soon.
I'm very interested in the Quicktime filter too, would be really useful if we could get YUV-data from Quicktime somehow (if the codecs supports it). The Rawsource filter works on some uncompressed Quicktime sources but has it's internal "decoder/parser", doesn't use Quicktime for data reading.
Mug Funky
18th December 2005, 14:21
hmm. yeah, uncompressed sources could either be handled internally or passed to vfw for decoding (ffdshow is very good for this). or your code could join forces with rawsource - i've tried rawsource on blackmagic stuff, but the frame headers got in the way - the image moved to the right by 4 pixels every frame.
hanfrunz
14th February 2006, 16:46
Yes, I have plans to try and write an export filter (uncompressed, mjpg, DV25 and mpeg2). I had planned to write the data into a new OMF container, which would require you to import the new file back into your editing software and manually replace all instances of it.
Hello tateu,
is there an exportfilter yet? i tried to import a uyuv-file into an avid MC, but quicktime messed up the data by converting it to rgb... so i wished there would be an omfexport filter
regards,
hanfrunz
tateu
14th February 2006, 20:42
No, I haven't done any work on this in a few months.
Where are you getting the quicktime from? If you don't mind having the file flagged as progressive and no alpha channel, you could try running it through my quicktime output filter using raw yuv output mode and Avid's Meridien Uncompressed quicktime codec. When I import from this codec, Media Composer just does a raw copy of the video data.
You'll need Quicktime 7, Avid's quicktime codecs (http://www.avid.com/onlineSupport/supportcontent.asp?browse=go&productID=0&contentID=7952), and the latest test version (http://www.tateu.net/software/QTSource_test_h264.7z) of my quicktime filter.
ConvertToYUY2()
QTOutput("output.mov", format="", raw="uyvy")
I usually open this file in VirtualDub, and press F5 to create the quicktime file.
This will pop open the quicktime compression dialog. Choose "Avid Meridien Uncompressed," "Millions of Colors" and from the Options Dialog: "Meridien Progressive" and the correct Color Input and Video Format of your source.
hanfrunz
14th February 2006, 21:08
I used my AllColorsYUY2 filter to generate an Avid-Meridian uncompressed file, but i forgot the raw="uyvy", maybe that was the problem. I'll check tomorrow.
Thanks,
hanfrunz
hanfrunz
7th April 2006, 11:18
Hello tateu,
will this filter also work with avid mxf files?
If not, is it possible to add mxf support?
hanfrunz
tateu
7th April 2006, 11:28
No, it is built around Avid's OMF toolkit which does not have mxf support.
There is this library (http://sourceforge.net/projects/mxflib/) at sourceforge for C++ MXF file I/O. I certainly can't promise anything, but I'll look into it. Hopefully it's not com interface stuff like the aaf project (http://sourceforge.net/projects/aaf/) because that would probably be beyond my skill level to implement.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.