Starting a Stream
To start a stream through the SDK, use the steps below :1
Create a Stream Object
2
Discover Available Sources
3
Select a Source
4
Start Streaming
Best Practices
Some best practices for streaming:- Verify devices first with
ms.sources()
— ID ordering can change between reboots. - Combine live
Stream
sessions with batchupload()
to cover both real-time and historical footage. - Keep streams short when testing (
ms.start(10)
) to conserve local and network resources. - Use
search
orinquire
during a live session to build interactive dashboards or alerts.
Stream() Constructor
Stream() Constructor
Index that receives the live feed.Must have been created with performance=True
Stream() methods
.sources()
.sources()
Returns List[str]—the display-ready names of cameras or screens detected on your machine.
.set()
.set()
The integer ID shown by
.sources()
.start()
.start()
Optional. Duration to stream in seconds.
Omit or pass
Omit or pass
None
to run until manually stopped.