changeset 1976:df28c994365d

different camera and crop settings for prod Ignore-this: 8541c1fbd9820dbc8cfb4818de86b7d6
author drewp@bigasterisk.com
date Sat, 08 Jun 2019 07:46:59 +0000
parents f66dbe512025
children 71eac274c98f
files bin/vidref light9/vidref/videorecorder.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/bin/vidref	Sat Jun 08 07:45:25 2019 +0000
+++ b/bin/vidref	Sat Jun 08 07:46:59 2019 +0000
@@ -70,9 +70,8 @@
 
 
 pipeline = videorecorder.GstSource(
-    '/dev/v4l/by-id/usb-Bison_HD_Webcam_200901010001-video-index0'
-    #    '/dev/v4l/by-id/usb-Generic_FULL_HD_1080P_Webcam_200901010001-video-index0'
-)
+    #'/dev/v4l/by-id/usb-Bison_HD_Webcam_200901010001-video-index0'
+    '/dev/v4l/by-id/usb-Generic_FULL_HD_1080P_Webcam_200901010001-video-index0')
 
 
 class Live(cyclone.websocket.WebSocketHandler):
--- a/light9/vidref/videorecorder.py	Sat Jun 08 07:45:25 2019 +0000
+++ b/light9/vidref/videorecorder.py	Sat Jun 08 07:46:59 2019 +0000
@@ -206,15 +206,16 @@
         self.liveImages: BehaviorSubject = BehaviorSubject(
             None)  # stream of Optional[CaptureFrame]
 
-        size = [640, 480]
+        # need to use 640,480 on some webcams or they fail mysteriously
+        size = [800, 600]
 
         log.info("new pipeline using device=%s" % dev)
 
         # using videocrop breaks the pipeline, may be this issue
         # https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/732
         pipeStr = (
-            #f"v4l2src device=\"{dev}\""
-            f'autovideosrc'
+            f"v4l2src device=\"{dev}\""
+            #            f'autovideosrc'
             f" ! videoconvert"
             f" ! appsink emit-signals=true max-buffers=1 drop=true name=end0 caps=video/x-raw,format=RGB,width={size[0]},height={size[1]}"
         )
@@ -259,7 +260,7 @@
 
     @stats.crop.time()
     def crop(self, img):
-        return img.crop((0, 100, 640, 380))
+        return img.crop((40, 100, 790, 310))
 
     def setupPipelineError(self, pipe, cb):
         bus = pipe.get_bus()