Streams¶
Introduction¶
BrainFrame runs analysis primarily on video streams. Streams can come from many sources, like an IP camera, webcam, or video file. BrainFrame supports all major video formats and is expected to support any IP camera that provides an RTSP, HTTP, or MJPEG stream.
This tutorial assumes that the server, client, and any IP cameras are on the same local network. BrainFrame supports analyzing streams on other private networks using our 'Premises' stream proxying system.
Adding a Stream¶
Click the floating action button at the bottom right of the window to add a stream.
The Add Stream dialog will appear. BrainFrame supports three types of video streams: File, webcam, and IP camera. For this example, we will use a video file.
Once a stream is added, you will see a video thumbnail of the stream, live, on the top left. As you add streams, they will fill this screen in a grid. If you add more video streams, the view will look something like this.
If you use the BrainFrame Web Client, you can adjust the information and performance of how videos and detections render on the web page in the Settings menu
- Detections
- Show detections
- Use polygons when available | Always use bounding boxes
- Show labels
- Show attributes (e.g. gender/behavior for a person detection)
- Show tracking
- Show extra data: Check this option to show extra information about the detections, such as classification results.
- Show regions
- Show lines
- Streams:
- Media Mode:
- Thumbnail View: JPEG | HLS, default: JPEG
- Show detections in thumbnail view: Off
- Player View: JPEG | HLS | MJPEG, default: MJPEG
- Task Config View: JPEG | HLS | MJPEG, default: MJPEG
* JPEG Static Picture Mode * HLS Async Video Mode (HTTP Live Streaming) * MJPEG Sync Video Mode (Motion JPEG Live Picture Streaming)- MJPEG Max FPS: 1 - 25, default: 5
- HLS Port (0: the same as the page): 9888
- Advanced
- Theme: Dark | Light
Stream Types¶
Different stream types take different parameters. The following is a quick introduction to what each parameter means.
Files¶
As seen in the above example, file streams simply take a file path. Most common video file types are supported by BrainFrame. When the source video ends, BrainFrame will automatically loop it back to the beginning.
Webcams¶
Webcam streams take a webcam device ID as their only parameter. Webcam device IDs start at zero and increment for each webcam that is connected. For a computer with a single connected webcam, the ID will generally be "0".
IP Cameras¶
IP camera streams take a URL as their main parameter. This URL should point to an RTSP, HTTP, or HTTPS video stream. BrainFrame supports many video encoding formats, including H264, VP8/9, and MJPEG.
For more information on how to get an RTSP URL for your IP camera, take a look at Connecting to IP Cameras.