(gfx:start-movie-capture canvas|opengl file-path [record-audio] [compressed?] [codec-quality] [w] [h])


Start capturing all canvas/opengl drawing commands to a new QuickTime Movie file specified by file-path until stop-movie-capture closes the session and completes writing the file to disk. NOTE: If you are capturing an opengl window it is your responsibility to call gl:update-backing-image regularly to update the bitmap image backing the opengl canvas (usually you will do this immediately after you call gl:flush)


  canvas|opengl -- the canvas or opengl that you want to capture

      file-path -- the fully qualified path to the new quicktime file

              w -- Optional Width to compress down to

              h -- Optional Height to compress down to

   record-audio -- boolean specifying whether an audio track should be recorded: default is #t

  codec-quality -- a symbol ( 'low 'normal or 'high) designating the quality of image that you want the codec to achieve.  defaults to 'normal

     compressed -- do you want to compress the data?  default is true which gives aac audio and mpeg4 video compression.  false will give full stereo floating point audio and lossless video.  Of course compression will use more CPU

Returns: boolean


(define canvas (gfx:make-canvas 640 480))

(define path (gfx:make-square 50 50 50))

;; write a compressed movie with audio at high quality

(gfx:start-movie-capture canvas "/tmp/" #t #t 'high 320 240)

(gfx:draw-path (now) canvas path '(0 1 0 1) '(1 0 1 1))

(gfx:stop-movie-capture canvas)

Back to index