# a small example of how to use the libquicktime support to record .mov or .avi files # note that some combinations of container and codec might not be supported. load-opengl load-lqt 320 240 display 2d animation # setup display qt-recorder REC # create recorder object "opening:" p "/tmp/dump.video" dup p cr REC create # create output file # set container and codec # ` avi ` mov REC container! # supported codecs. see: # http://libquicktime.sourceforge.net/doc/apiref/group__video__codecs.html "jpeg" # "raw " # "yuv2" # "yv12" # "dvcp" REC codec! # some simple animation : drawit .2 scale normal transx normal transy 1. square m-push 1.2 transx 1 0 0 rgb .5 square m-pop 1.2 transy 0 1 0 rgb .5 square ; :: drawit # draw scene display>rgb # grab screen to rgb bitmap REC write # write it to the file ; is drawer : done { REC close # close file { } is drawer # stop drawing } is drawer ; "type 'done' to close the video file." p cr interactive