Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th December 2005, 05:56   #1  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
OMF Import Filter

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.

Last edited by tateu; 13th December 2005 at 06:42.
tateu is offline   Reply With Quote
Old 12th December 2005, 09:31   #2  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
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.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 13th December 2005, 18:55   #3  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
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
hanfrunz is offline   Reply With Quote
Old 13th December 2005, 19:09   #4  |  Link
CirTap
Registered User
 
Join Date: Feb 2005
Location: Germany
Posts: 169
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
__________________
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
CirTap is offline   Reply With Quote
Old 13th December 2005, 19:31   #5  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
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.
tateu is offline   Reply With Quote
Old 13th December 2005, 19:45   #6  |  Link
CirTap
Registered User
 
Join Date: Feb 2005
Location: Germany
Posts: 169
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
__________________
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
CirTap is offline   Reply With Quote
Old 13th December 2005, 20:03   #7  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
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.

Last edited by tateu; 13th December 2005 at 20:35.
tateu is offline   Reply With Quote
Old 13th December 2005, 20:45   #8  |  Link
CirTap
Registered User
 
Join Date: Feb 2005
Location: Germany
Posts: 169
well, don't bother with audio (now) ...
Quote:
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" :-)
__________________
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
CirTap is offline   Reply With Quote
Old 14th December 2005, 02:54   #9  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
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...
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 14th December 2005, 03:11   #10  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
Quote:
Originally Posted by Mug Funky
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.

Last edited by tateu; 14th December 2005 at 03:18.
tateu is offline   Reply With Quote
Old 14th December 2005, 09:41   #11  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Quote:
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
Wilbert is offline   Reply With Quote
Old 14th December 2005, 10:09   #12  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
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...
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 14th December 2005, 10:31   #13  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
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.

Last edited by tateu; 14th December 2005 at 10:40.
tateu is offline   Reply With Quote
Old 15th December 2005, 09:18   #14  |  Link
peter100m
Registered User
 
Join Date: Mar 2005
Posts: 36
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.
peter100m is offline   Reply With Quote
Old 18th December 2005, 13:21   #15  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
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.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 14th February 2006, 15:46   #16  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Quote:
Originally Posted by tateu
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
hanfrunz is offline   Reply With Quote
Old 14th February 2006, 19:42   #17  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
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, and the latest test version 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.
tateu is offline   Reply With Quote
Old 14th February 2006, 20:08   #18  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
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 is offline   Reply With Quote
Old 7th April 2006, 10:18   #19  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 535
Hello tateu,

will this filter also work with avid mxf files?
If not, is it possible to add mxf support?

hanfrunz
hanfrunz is offline   Reply With Quote
Old 7th April 2006, 10:28   #20  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
No, it is built around Avid's OMF toolkit which does not have mxf support.

There is this library 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 because that would probably be beyond my skill level to implement.
tateu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.