There example on the net and code given in Learn OpenCv,Orielly.
After many attempts the out.avi file is written with 0 bytes. I wonder where i went wrong.
T
It's a codec issue. Try out all the possible codecs (option -1 in cvCreateVideo). In my case Microsoft Video 1 worked well.
-1
cvCreateVideo
1