Developing Mac OS X movie capture

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
arlduc
Posts: 20
Joined: 18.04.2005
With us: 19 years 7 months
Location: nyc

Developing Mac OS X movie capture

Post #1by arlduc » 24.05.2005, 20:19

I'm trying to implement some kind of synchronous movie capture-- Snapz Pro isn't cutting it because it drops so many frames at an inconsistent rate. And capturing on Windows won't really work either because I need to capture at 1920x1080.

Any general pointers? And specific pointers on these topics would be particularly helpful:

1. using Xcode (I used to use CodeWarrior a long time ago... but it's been a LONG TIME!)

2. which part of the Celestia src should be modified for image output?

3. Any Quicktime programmers have suggestions on what routines to implement for this purpose?

thanks in advance.
arlene ducao
production designer | 3d animator
american museum of natural history
http://www.sciencebulletins.amnh.org

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #2by hank » 25.05.2005, 05:02

To get you started:

Celestia defines a virtual class MovieCapture and includes a subclass AVICapture. You will need to create a subclass QTCapture for the QuickTime movie capture code. That will be most of the work. The existing Celestia code will call the methods in the subclass as needed to create the movie.

For the GUI you'll need to create a dialog box to allow the user to set the movie capture parameters (filename, movie size, and movie framerate), equivalent to HandleCaptureMovie and ChooseMovieParamsProc in winmain.cpp. You can adapt the movie capture method BeginMovieCapture from winmain.cpp.

Good luck!

- Hank

Topic author
arlduc
Posts: 20
Joined: 18.04.2005
With us: 19 years 7 months
Location: nyc

Post #3by arlduc » 26.05.2005, 19:36

thanks Hank.

what is the Mac OS X front end-- is there some kind of analogous file to winmain.cpp?

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #4by hank » 27.05.2005, 12:44

Arlene,

Have you been able to build the XCode project for Celestia successfully? That's probably the place to start.

I guess CelestiaController.m is roughly analogous to winmain.cpp. That's where I think I'd put the code to handle the NSSavePanel for the movie setup, including the call to BeginMovieCapture (which I'd put in CelestiaAppCore.mm).

- Hank

folks
Posts: 19
Joined: 22.07.2004
With us: 20 years 3 months
Location: Sunshine Coast, Canada

Mac OS X Movie Capture

Post #5by folks » 02.06.2005, 20:10

Arlene I have been looking at much the same thing for the same reasons.

I was going to have a look at how it is done in the open source Breve project http://www.spiderland.org/breve/

Celestia Development: Recent OS X CVS Commits provides straight forward instructions for compiling current code with XCode. Use Build Menu | Build Results to set style to Deployment instead of development before compiling.

Thanks for the directions Hank. I was just trying to remember where to look.
- Scott
Mac OS X 10.4.1 :: Nvdia GForce4 MX 32 MB :: Dual 867MHz G4 :: Celestia 1.4 :: XCode 2.0


Return to “Development”