We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i see video on page but it is bit too laggy. so i tried to rewrite two parts of camera.py:
from picamera.array import PiRGBArray from picamera import PiCamera class VideoCamera(object): def __init__(self, flip = False, file_type = ".jpg", photo_string = "photo-taken"): #self.vs = PiVideoStream(resolution=(640, 480), framerate=30) self.vs = PiCamera(resolution=(640, 480), framerate=30) self.rawCapture = PiRGBArray(self.vs) #self.vs.start() #self.vs = PiVideoStream().start()
and
def get_frame(self): #frame = self.flip_if_needed(self.vs.read()) for frame in self.vs.capture_continuous(self.rawCapture, format="bgr"): #ret, jpeg = cv.imencode(self.file_type, frame) self.rawCapture.truncate(0) self.image = frame.array ret, jpeg = cv.imencode(self.file_type, self.image) #self.previous_frame = jpeg return jpeg.tobytes()
dont know if it start working a bit faster... may be a better solution is io.BytesIO() https://stackoverflow.com/questions/40065328/picameravalueerror-incorrect-buffer-length-for-resolution-1920x1080
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i see video on page but it is bit too laggy.
so i tried to rewrite two parts of camera.py:
and
dont know if it start working a bit faster...
may be a better solution is io.BytesIO()
https://stackoverflow.com/questions/40065328/picameravalueerror-incorrect-buffer-length-for-resolution-1920x1080
The text was updated successfully, but these errors were encountered: