Images are not written to VideoStream on Manjaro GNU/Linux
Opened this issue · 0 comments
Deleted user commented
This code produced an empty buffer on Manjaro GNU/Linux, although it runs absolutely correctly on GNU/Linux Mint 17.
#!/usr/bin/env python2
from SimpleCV import Camera, VideoStream
from datetime import datetime
from time import sleep
cam = Camera()
def get_buffer_name():
now = datetime.now()
return 'buffer{}'.format(now.second)
def write_video(video_len):
buffer_video_name = '{}.avi'.format(get_buffer_name())
vs = VideoStream(filename=buffer_video_name)
delay = 1./25
current_video_len = 0
while current_video_len < video_len:
img = cam.getImage()
sleep(delay)
vs.writeFrame(img)
current_video_len = vs.framecount/25
if __name__ == '__main__':
write_video(5)
Images from Camera are actually taken and can be saved which I have tested with my little lab work.