   video capture - saving to an uncompressed AVI file
  Hey.lets say my rendering thread reads all pixels every frame, wraps it in a object and pushes it into a linked list and i have another lower priority thread that at startup creates a new file on my hardrive and then constantly takes available frames from the list and writes it to the open file. when the application closes it waits for that thread to clear out the list and finalize.Question 1: is this a decent way of doing it?Question 2: does anyone know (or know where i could get) the format of uncompressed AVI files - im asuming it wont be that complex since it should contain little more than raw pixel data right?I'l worry about encoding the AVI's later for now i just want to get some basic capture functionality. I can stil use an external video converter to create encoded video's from uncompressed ones.Thnx in Advance![Edited by - EternityZA on June 24, 2009 9:21:13 AM]
Quote:Original Quote by EternityZAQuestion 1: is this a decent way of doing it?This is currently how I handle recording either live video from a camera or if I want to record the back buffer.However, depending on the size of the video and/or image, this could cause vast amounts of memory overhead. If you are queuing the images to put into the video then each image remains in memory. If the writing thread gets behind your image queue will increase in size and thus increase the amount of memory you are using.Quote:Original Quote by EternityZAQuestion 2: does anyone know (or know where i could get) the format of uncompressed AVI files - im asuming it wont be that complex since it should contain little more than raw pixel data right?If you are on windows, you can use the vfw library. This will also allow you to compress the video using any installed codec on your machine. I currently use XVID mostly, but you can still do uncompressed recording if required.- me   ;  That realy helps.Thnx Alot! :p   