Stream Reader
This function block plays network streams (YouTube, Twitch, HTTP/RTSP and similar) in the background and keeps the latest frame ready for other blocks to consume. It is designed for continuous stream previewing and downstream processing with controls for playback rate, requested quality and frame rate limiting.
π₯ Inputs
This function block does not have any inputs.
π€ Outputs
Image Any The latest frame retrieved from the provided streaming source (keeps updating as the stream plays).
πΉοΈ Controls
Status Displays current state and helpful messages (e.g., waiting, connecting, live, paused, reconnecting).
Stream URL Enter the stream address or link you want to play (examples: public live links, HTTP livestreams, or provider links).
Playback speed Adjust playback rate (range shown in the UI). Use values below 1.0 for slow motion or above 1.0 for faster playback.
Preferred quality Request a preferred stream quality when multiple renditions are available (e.g., Best, 1080p, 720p).
FPS limit Limit the outgoing frame rate produced by this block. Set to 0 to use the source's native frame rate.
Pause playback Toggle to pause/resume the stream without closing the connection.
π¨ Features
Background streaming: plays remote streams on a background process so the UI remains responsive while keeping the latest frame available.
Robust connection handling: shows clear status messages (connecting, live, paused, reconnecting) and attempts to recover from transient errors.
Playback control: control playback speed and request a specific rendition when available.
Frame rate limiting: reduce downstream load by capping frames per second.
Optional remote frame upload: when configured, captured frames can be sent to a remote uploader for storage or logging.
Pause without losing last frame: pausing keeps the last frame available for inspection or processing.
π Usage Instructions
Enter a streaming link into
Stream URL.Adjust
Preferred qualityif you want a specific rendition.Set desired
Playback speedandFPS limitto control how the stream is delivered to downstream blocks.Use
Pause playbackto temporarily halt frame updates while keeping the connection.Connect this block's output
Image Anyto visualization or processing blocks to consume live frames.
π Evaluation
When active, this function block continuously fetches frames from the configured stream and provides the most recent frame through the Image Any output. Status messages update to reflect connection state. If paused, frame updates stop but the last frame remains available.
π‘ Tips and Tricks
To preview the live stream interactively, connect the
Image Anyoutput to theShow Imageblock so you can open the image viewer and inspect frames.Reduce CPU/GPU load by connecting
Image Anyto anImage Resizerblock before heavy AI blocks likeObject Detection (D-FINE),Mask Detection,Pose Estimation.For long-term recording or debugging, pipe the output to
Record Video,Image LoggerorImage Write.Use
Background Subtractoron the stream output to detect motion or extract foreground regions for downstream detectors (e.g.,Object Detection - Custom).If you need to focus on a specific area of the scene, use
Image ROI,Image ROI SelectorImage ROI Polygonbefore detection or measurement blocks (likeFind ObjectorHistogram On Line).Combine with
Object_Detection_TrackerandDraw Detectionsto track and visualize detected objects across frames from the stream.For OCR on live streams, connect the output to
OCRorOCR (EasyOCR)after applying suitable cropping (Image ROI Select) and image enhancement (Contrast OptimizationorDenoising).If the stream source is large or unstable, try lowering
FPS limitor reducingPreferred qualityto improve stability and reduce bandwidth.
π οΈ Troubleshooting
If the status shows "Waiting for stream link", ensure
Stream URLis a full URL including the scheme (e.g.,http://,https://,rtsp://).If connection fails or frequently reconnects, try lowering requested quality or reducing the FPS limit to ease bandwidth and processing.
If frames stop updating while status shows live, toggle
Pause playbackoff and on to force a refresh.If you need to debug connection messages, monitor the block's
Statuslabel for textual hints about connection progress or errors.
Last updated
Was this helpful?