No issues just pure sync 8)
This old chestnut is finally solved, at least for Mac OSX 10.6+
Basically it takes QTKit to do it -> no mucking round with timestamps, recording audio and video separately, recombining them with QT7 SDK, FFMPEG, a blunt sword, etc etc…
Just hit record and it works…
I got this happening on it’s own over here, by implementing this, but decided to extend James George’s most excellent work on QTKit Video Playing and Grabbing over here (or on his-github).
So I present you with a beefed up ofxQTVideoGrabber that:
* Records video and audio in sync (you can turn the audio off if you just want the video, but I didn’t make it do the reverse -> let me know if that would be good)
* Adds setting devices by name (overloaded so you can still use ID numbers)
* Adds setting codec by name (didn’t do it by ID -> let me know if that would be good)
* You can init the grabber without any preview or textures etc if you want to just have recording functionality without the draw
I’ve tested it with my built in iSight and with a HVX-202 and it did fine with 1080i (!!) footage and my built-in mic (though it seemed to choke on the DVCPro HD Audio input…mhmm)
One thing to note: the only sizes available for the recorded videos are the native size of the capture device…no matter what you set the width and height of the preview to it will NOT change the video output. Only changing codec types affects the size of the video output (downwards not upwards)…this is a limitation of the method (for more info see here).
addon and example src are attached below OR you can head on over to my fork of Jame’s addons on my-github.
Either way, may the force be with you.
M
PS: thanks to Sam Fox at HydraPoesis for supporting the pursuit of this evil…and perhaps now we should delve into the even greater axis of e: DirectShow and the amcap example that comes with win sdk -> perhaps that way doth lie windoze sync’d recording???