Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Directly generating RAW movies



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.

You can definitely create a movie out of your file. You just create a movie, and create a video track. Then when you create the media for the video track (with NewTrackMedia) pass an alias handle (containing an alias to your raw file) for the dataRef and rAliasType for the dataRefType. Then call AddMediaSampleReferences (or AddMediaSampleReferences64 if your file can be bigger than 2GB) with a suitable image description and sample numbers, offsets, etc.


Once you have a movie in memory, do you need to write it to the same file? If not, just write it to it's own movie file, creating a reference movie. If you do need to write it to the same file as the movie data, just leave space for an 'mdat' atom at the start of the file, then when you have finished writing fill it in so it encompasses all your raw samples, then you should be able to use OpenMovieFile then AddMovieResource to add the movie data on to the end.

Glenn.
_______________________________________________
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
References: 
 >[Q] Directly generating RAW movies (From: Daniel Côté <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.