﻿# Branched video pipelines: isolate a slow recording branch from live inference

Branched video pipelines: isolate a slow recording branch from live inference. A practical streaming-video guide with failure mechanisms, a controlled scenario, acceptance evidence and primary references.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/sv-tee-recording-branch-blocks-inference/
Language: en

A pipeline sends the same captured stream to preview, recording and inference. A slow recorder stalls all branches, even though the GPU inference stage has available capacity.

## The media mechanism

GStreamer tee duplicates flow but does not create independent execution and buffering policies for every branch. Separate queues provide thread boundaries; their own saturation can still propagate backpressure.

## Establish the pipeline boundary

Give each tee branch its own explicit scheduling and buffering policy. A queue creates a thread boundary, but a non-leaky full queue can still propagate backpressure to the tee and affect sibling branches.

Choose which service promise dominates under a stalled recorder. Complete recording, bounded memory and uninterrupted fresh inference cannot be assumed simultaneously under arbitrary prolonged overload. State the selected tradeoff and make its outcome visible to the application.

Test the recorder stall long enough to reach the configured bound. A brief test that fits inside available buffering proves only temporary absorption. Compare inference dispatch identities during saturation and after recovery, and verify that recorder reconnection does not replay obsolete frames into the inference branch. Keep branch-local loss separate from source-wide capture interruption in the report.

## A constructed failure case

Stop draining the recording branch temporarily. An accepted design either preserves the promised inference behavior or emits the declared overload outcome, instead of silently accumulating unbounded video.

## A practical validation procedure

Throttle the recorder while keeping the synthetic source and inference fixed. Observe each branch queue and capture-to-inference timeline. Define which branch may block or drop and test the consequence at its configured bound.

Keep an unchanged control and a deliberate failure case. Change the relevant setting or interruption independently, then compare observed frame identities and state transitions. Measure through recovery as well as the first error; a restarted worker can retain obsolete results or references.

## Evidence for acceptance

Keep branch topology, queue settings and evidence of inference continuity during recorder slowdown.

## Recovery and limits

Finite queues cannot isolate an indefinitely stalled lossless recorder without another resource or failure policy.

Define whether recovery drains, discards or isolates pending frames before resuming ordinary service. Preserve compact diagnostic identities and the fixture configuration. Avoid treating a new connection or a live process as proof that previous in-flight work has finished safely.

## References and interpretation

Primary references: [GStreamer tee and branch scheduling](https://gstreamer.freedesktop.org/documentation/coreelements/tee.html); [GStreamer queue limits and leakage](https://gstreamer.freedesktop.org/documentation/coreelements/queue.html).

This is a proposed operational validation, not an executed Retrivium benchmark. Documentation defines interfaces and supported behavior; the actual pipeline needs its own evidence. Repeat the check after relevant plugin, decoder, source or preprocessing changes.

## Related reading

Continue with [TinyML on Frame glasses: faster inference, slower complete pipeline](/journal/frame-tinyml-on-glasses-inference-pipeline-latency/); [Appsink and a slow frame consumer: bound retention at the application handoff](/journal/sv-appsink-slow-puller-bounded-retention/). Their adjacent context does not replace the specific frame-flow acceptance check described here.
