How do you want the video stored? Do you want to be able to view it in a typical media player later, or would you rather store the raw format which isn't necessarily playable? I don't think OpenCV is a requirement here.
I want it in a raw format. Also, are there any libraries (if any) you suggest using then?