balena-cam
balena-cam copied to clipboard
Change video resolution
Is it possible at all to change the video resolution? It appears to be drastically low quality :( I was hoping for some environment variable to use for this
in app/server.py change lines 15-16
self.cap.set(3, 640)
self.cap.set(4, 480)
640 = width 480 = height
If you want them to be environment variables, do something like
import os
...
CAP_WIDTH = os.environ.get("CAP_WIDTH", 640)
CAP_HEIGHT = os.environ.get("CAP_HEIGHT", 480)
...
self.cap.set(3, CAP_HEIGHT)
self.cap.set(4, CAP_WIDTH)