MyRecorder example - compressing video

  • Hi,
    i'm playing with the MyRecorder example from Apple (http://developer.apple.com/samplecode/MYRecorder/index.html
    ). I found the new QTKit really nice to use. Since the video recorded
    from the iSight is really big (it's uncompressed), I tried to see how
    to compress the video recorded to the hard disk, but without succes.
    I found that the class QTCaptureFileOutput has a method called
    setCompressionOptions:forConnection:  which sounds good for the
    purpose, but it needs an instance of the class QTCaptureConnection
    which I'm not able to easily get, so i think I'm missing something.

    --
    Luca Torella
    <lucatorella...>
  • Im not sure if this example (OpenGLScreenCapture) does what you want
    the way you want. You can check out how it does compression though.
    Looks pretty simple.

    Filipe

    On 2007/12/17, at 19:38, Luca Torella wrote:

    > Hi,
    > i'm playing with the MyRecorder example from Apple (http://developer.apple.com/samplecode/MYRecorder/index.html
    > ). I found the new QTKit really nice to use. Since the video
    > recorded from the iSight is really big (it's uncompressed), I tried
    > to see how to compress the video recorded to the hard disk, but
    > without succes.
    > I found that the class QTCaptureFileOutput has a method called
    > setCompressionOptions:forConnection:  which sounds good for the
    > purpose, but it needs an instance of the class QTCaptureConnection
    > which I'm not able to easily get, so i think I'm missing something.
    >
    > --
    > Luca Torella
    > <lucatorella...>
  • On 17 Dec 2007, at 19:38, Luca Torella wrote:
    > i'm playing with the MyRecorder example from Apple (http://developer.apple.com/samplecode/MYRecorder/index.html
    > ). I found the new QTKit really nice to use. Since the video
    > recorded from the iSight is really big (it's uncompressed), I tried
    > to see how to compress the video recorded to the hard disk, but
    > without succes.
    > I found that the class QTCaptureFileOutput has a method called
    > setCompressionOptions:forConnection:  which sounds good for the
    > purpose, but it needs an instance of the class QTCaptureConnection
    > which I'm not able to easily get, so i think I'm missing something.

    QTCaptureFileOutput inherits from QTCaptureOutput, an abstract
    superclass that contains a single method, -(NSArray *)connections
    which returns an array of QTCaptureConnection objects.  The connection
    you need will be in that list.  If you are capturing audio as well as
    video you might need to go through and set compression options
    appropriately on each of the connections but if you are just capturing
    the iSight video then there will only be one element in the array.

    Cheers,
    Nicko
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today