streaming-frames
Installation
SKILL.md
Streaming Frames
Overview
stream_video / ovstream_stream_video is the per-frame entry point. It accepts a VideoFrame / ovstream_video_frame_t descriptor that discriminates on which fields are non-zero:
pitch_bytes > 0→ raw CUDA BGRA8 buffer.bufferpoints at GPU memory; the SDK reads it directly and encodes via NVENC. This is the path 95% of apps take.size_bytes > 0→ pre-encoded bitstream (H.264 / H.265 / AV1, or aCUSTOMGStreamer-pipeline payload on RTSP).bufferis a host pointer to the encoded payload; the SDK packetizes and forwards without re-encoding. (Unlike raw CUDA, pre-encoded paths do not accept GPU-resident buffers.)- Both
pitch_bytes == 0andsize_bytes == 0→TENSORinput:bufferis aDLTensor*(DLPack) andwidth/heightare also 0; the SDK reads shape, dtype, stride, and device from the DLTensor itself. Construct viaVideoFrame.from_dlpack(obj)in Python (any framework that exposes__dlpack__— Warp, PyTorch, JAX, CuPy). The server's configuredvideo_inputmust beTENSOR.
The exception above aside, exactly one of pitch_bytes / size_bytes must be non-zero, and the choice must match the server's configured video_input.
Python
Source:
examples/python/basic_stream/main.pysnippetstream-loop
Construct a VideoFrame once, reuse the same buffer pointer across frames, mutate the buffer contents in place between calls.