you can use xvid, which is open source. the code should be quite clean, and you can ask specific questions on the xvid.org forum. it uses the vfw framework, but it's already there.. so u'll just have to modify the encodeing/decoding algorithms. cheers and good luck avi