SimpleCV icon indicating copy to clipboard operation
SimpleCV copied to clipboard

Updating VideoStream to cv2, refactoring and added codec kwarg

Open maraujop opened this issue 12 years ago • 0 comments

  • Removing code lines commented out
  • Updated VideoStream to use newer cv2 VideoWriter, cv.createVideoStream is considered legacy.
  • Calculating frametime once in the constructor, this value doesn't change. This way extra calculations are avoided.
  • Added a codec parameter, so that codec can be set from the outside and setting default to a newer codec like xvid. iyuv doesn't work in many operating systems and it uses a lot of space for a video file.

To be honest, I know these might be many changes to go in a single commit in a single PR, sorry about that. In reality, these are quite minor changes.

iyuv creates huge video files, that's why I changed it to a newer codec and I've made possible to change it.

I believe the explanation of framefill is a little hard to follow. My first PR actually had a wrong misunderstanding of how it works. I've forced pushed a new commit (removing some changes, updating the description of this PR) that were hiding framefill away.

When framefill is set to True, the video output will be realtime, in the sense that it will be the same speed as the processing of video has been, not that the video will go at the same speed of the real life time, not sure if I explain myself. I actually would expect False to be the default.

If there is anything you want to discuss, let me know.

Cheers, Miguel

maraujop avatar Aug 18 '13 12:08 maraujop