Skip to main content
Developers can stream live camera into a Lens by connecting a RTSP Video Reader data connector to the input data stream of a Lens. Prior to streaming live video to a lens, a developer should first setup their RTSP camera and be aware of the RTSP URL needed to access the camera. This can be done via the RTSP third-party software and not via the Archetype platform. Like all data stream connectors, the RTSP Video Reader can be identified and configured via the following stream type and stream config:
stream_type: rtsp_video_reader
stream_config:
  rtsp_url: "your_rtsp_camera_url"
This can be passed to Newton as an event:
event:
  type: input_stream.set
  event_data:
    stream_type: rtsp_video_reader
    stream_config:
      rtsp_url: "your_rtsp_camera_url"

Parameters

You can pass the following parameters to the RTSP Video Reader via the stream_config.
ParameterDescriptionRequired
file_idThe file_id of the video you wish to pass to the Video File Reader. The file_id should correspond to a valid file you’ve uploaded via the files API.Yes
target_image_sizeAn array containing the width and height in pixels that the video should be resized to, which can help reduce the amount of data streamed through the platform and increase inference speed. Skipping this parameter will result in the default video size being used.No
target_frame_rate_hzThe speed in frames per second at which the video stream should be read. Skipping this parameter will result in the default video sample rate being used.No