Daniel,
It should be easy enough for you to directly create the file in QuickTime format. Start with a review of the QuickTime File Format document:
http://developer.apple.com/documentation/QuickTime/FileFormatSpecification-date.html
The basic process would be:
1) Write a 'wide' atom (8 bytes) and the header of an 'mdat' atom (8 bytes) at the beginning of the file.
2) Copy the raw data into the file, formatted in a manner compatible with the QuickTime raw format. Keep track of the total length written.
3) Write the 'moov' atom, with all the contained descriptive atoms, to the file. This doesn't amount to much data (a few hundred bytes maybe) but will take understanding the QuickTime syntax and semantics to create correctly. Using Dumpster on a few sample QuickTime RAW files should help.
4) Rewind the file and re-write the 'mdat' header to indicate the total size of the raw data plus the header. If that size exceeds 2**31, overwrite both the 'wide' atom and 'mdat' header into an 'mdat' header in 64-bit size format (16 bytes).
Creating the 'moov' atom and its contents from scratch is tedious but straightforward coding. And, it doesn't have to run in real time (it all happens at the end of your capture, as you prepare to close the file. In the QuickTime API there relevant struct declarations are in CInclude/MoviesHeader.h and CInclude/Movies.h. Beware endian issues if you are running on a little-endian environment: those structs are written in native byte order, the QuickTime file must be big-endian.
I'm a QuickTime novice, so I can't advise you as to whether this is easier than using the API to write the atoms for you.
-- Shal
At 04:57 PM 10/22/2005, Daniel Côté wrote:
>Hello :
>
>I have a simple problem with my Video Rate Microscopy Software. I
>stream live video to disk at 30 frames per second in a "very raw"
>format: 500 x 500 pixels of RGBA values, straight from the
>acquisition board. Because of other constraints (I analyze the data
>in real-time), I really need this streaming to be fast (well, who
>doesn't?). The problem is that I need an extra step after the
>acquisition to convert my Raw format to the Quicktime movie format. I
>know the difference between my file format and the real Quicktime RAW
>format is very small (as I have hexdump'ed , my RAW and the Quicktime
>RAW conversion and compared them). Ideally, I would write the
>Quicktime header myself when I create the stream file and add any
>other little atom that is needed to save *directly* to Quicktime RAW
>that can be edited and incorporated in any document easily without
>the extremely annoying extra step of having to go through my little
>conversion app that makes the raw file into an actual Quicktime
>movie. That would save me the trouble of making a simplistic "Video
>Converter" that I really don't care about. Is this something
>possible or am I just looking for trouble? I have found the quicktime
>API daunting.
>
>
>Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden
This email sent to email@hidden