basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Can't use Camera Properties in gstreamer RTSP Server #125

Closed Svenamm closed 2 months ago

Svenamm commented 2 months ago

I have a class for a simple RTSP Server:

`

class BaslerRTSPServer: def init(self, port = "8554", device_serial_number=None):

    self.port = port
    self.device_serial_number = device_serial_number
    Gst.init(None)
    Gst.debug_set_default_threshold(Gst.DebugLevel.WARNING)

    self.server = GstRtspServer.RTSPServer()
    self.server.props.service = self.port

    factory = GstRtspServer.RTSPMediaFactory()
    factory.set_launch( 
        f"pylonsrc device-serial-number={self.device_serial_number} cam::PixelSize=Bpp8! videoconvert ! x264enc tune=zerolatency !video/x-h264 , profile=baseline, bitrate=10000, speed-preset=veryfast, key-int-max=30, framerate=10/1! queue ! rtph264pay name=pay0 pt=96"
        )
    factory.set_shared(True)
    mount_points = self.server.get_mount_points()
    mount_points.add_factory("/test", factory)

    self.server.attach(None)`

Everything works well if I don't use camera properties. When I include one like in the example I always get an error for any of the cam properties.

0:00:06.052153760 295933 0x2e1e7980 ERROR GST_PIPELINE grammar.y:453:gst_parse_element_set: could not set property "cam::PixelSize" in element "pylonsrc0" to "Bpp8!" 0:00:06.065198464 295933 0x2e1e7980 WARN rtspmediafactory rtsp-media-factory.c:1659:default_create_element: recoverable parsing error: could not set property "cam::PixelSize" in element "pylonsrc0" to "Bpp8!"

The Camera I'm using is Basler daA1280-54uc (24803162).

Any help would be appreciated.

Svenamm commented 2 months ago

there was I mistake on my side. This is solved.