QTKit, QTCaptureMovieFileOut and custom frames

Discussion in 'Mac Programming' started by mcdreamer, Sep 30, 2011.

  1. mcdreamer macrumors newbie

    Sep 30, 2011
    Hello all,

    I am new to Mac development so I hope I'm not asking anything too basic here. I could easily have missed something.

    What I want to do is write some code to output a QuickTime MOV file containing "custom" frames (ie. I don't want to use an iSight or other capture device as my input) and a sound track provided by a WAV file. I have been looking at QTKit as a way to do this and QTCaptureMovieFileOutput seems like the thing I want to use. It looks like I need a custom QTCaptureInput subclass that provides the video that I want. Is this correct? Or is there already an existing input class that allows me to provide my own frames (or at least read image files I've specified from disk)? I haven't really looked into the audio side of things yet but I'm hoping I can add another QTCaptureInput which already exists to provide the audio.

    Note, on Windows I'm doing this with DirectShow by adding my own custom source filter for video and an existing source filter for audio.

    Any thoughts?
  2. foidulus macrumors 6502a

    Jan 15, 2007
    If all you want to do is create a movie from a bunch of images saved on disk and add a soundtrack then QTMovie is probably going to be a lot easier, just create a QTMovie object and use the addImage:forDuration:withAttributes:

    If you want to do something more complex(like feed raw data in real time) then you will have to customize the QTCaptureInput. Never did that, but I guess it wouldn't be too hard.

Share This Page