I'd like to post my own response to this, now that I know the answer :-)
1) I didn't find any way to use a bulk write operation, into a movie.
2) Yes - this helps. The biggest gains were had by ensuring that
the timer loop calling SGIdle (and also performing video capture) was
as efficient as possible. This meant moving the compression and
AddMediaSample2 calls onto another thread. In addition, I ended up
adding frames to the movie (and calculating their durations)
myself. That is, I no longer create a video track in my
SequenceGrabber (so now, it's used to capture and compress audio only).
Neil
On 25/09/2006, at 5:41 PM, Neil Clayton wrote:
Hi,
I've got some existing code using a SequenceGrabber to write a
video/audio movie, using a custom VDIG. This all works fine.
I'm in the process of using ICM compression/decompression so that I
can enable the output of non-keyframes in H264, using ideas and
concepts from the CaptureAndCompressIPBMovie code along with
additions from Brad Ford (AAC audio) last year.
This all works, but it seems slower than the existing sequence
grabber code. For testing, Im not using H264 - I'm using the
Apple Intermediate Codec. When capturing full screen on a macbook
pro, using the original non-ICM code I'm getting something in the
order of 15fps (that includes capture, compression and writing to
disk).
When using the ICM code, it's down to about 10fps.
My questions are these:
1) Would I improve performance using AddSampleTableToMedia, if I
buffer compressed frames and don't add them to the movie one by one?
2) Is there any point me putting the write code onto a separate
thread, so that I can return control to QT as soon as possible?
I'm quite aware that I've not posted code. This is intentional as
I want to focus on the broad picture at the moment - as in, I'm
interested if threading and internal buffering is worth the work
before I go down that route, or if I'm thinking about this the
wrong way.
I'd like to take the time to also thank all those (Apple and
others) who have taken the time to answer questions. I spent
quite some time today looking through old emails in an attempt to
get AAC audio compression going (it was in the end trivial to get
working), and I noticed some of my old posts. Reading them, I
felt for those who had to answer them (gaaaa!). So I wanted to
thank you for putting up with me :-)
I sincerely hope this email makes more sense that some of my
previous 'communications'!
Regards,
Neil Clayton
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40cloudnine.net.nz
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden