Changeset - df28c994365d
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 6 years ago 2019-06-08 07:46:59
drewp@bigasterisk.com
different camera and crop settings for prod
Ignore-this: 8541c1fbd9820dbc8cfb4818de86b7d6
2 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
bin/vidref
Show inline comments
 
@@ -70,9 +70,8 @@ class Snapshot(cyclone.web.RequestHandle
 

	
 

	
 
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):
light9/vidref/videorecorder.py
Show inline comments
 
@@ -206,15 +206,16 @@ class GstSource:
 
        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 @@ class GstSource:
 

	
 
    @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()
0 comments (0 inline, 0 general)