feat(v1): configurable low-latency capture options
Config gains source.transport (tcp/udp), timeout_seconds and low_latency; build_ffmpeg_options assembles OPENCV_FFMPEG_CAPTURE_OPTIONS and app.py sets it into the environment before opening the stream, so tuning lives in config/settings instead of a launch script. Settings tab exposes a dropdown/number/checkbox rather than the raw option string. 64 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,8 @@ class FrameWorker(QtCore.QThread):
|
||||
self._stop = False
|
||||
|
||||
def run(self) -> None:
|
||||
# OpenCV reads this env var when it opens the stream, so set it first.
|
||||
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = self._config.ffmpeg_capture_options
|
||||
mode = SourceMode.STREAM if self._config.source_mode == "stream" else SourceMode.REPLAY
|
||||
source = VideoSource(self._config.source_url, mode=mode)
|
||||
pipeline = FallPipeline.from_config(self._config, self._pose_adapter)
|
||||
@@ -162,7 +164,8 @@ def _camera_fields(path: Path) -> Dict:
|
||||
return {}
|
||||
if "host" not in source:
|
||||
return {}
|
||||
return {k: source.get(k) for k in ("host", "port", "channel", "username", "password")}
|
||||
fields = ("host", "port", "channel", "username", "password", "transport", "timeout_seconds", "low_latency")
|
||||
return {k: source.get(k) for k in fields if k in source}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user