ENT-1677: Apply RTSPS TLS options to the OpenCV capture open - #2776
ENT-1677: Apply RTSPS TLS options to the OpenCV capture open#2776NVergunst-ROBO wants to merge 4 commits into
Conversation
|
👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely. 🚦 This PR is marked Ready for review, so automated Claude review will run — and every pass spends real credits. Warning 💸 The Claude reviewer bills in credits, not vibesAutomated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared. Draft when unsure, Ready when you mean it:
However you get there, arrive prepared:
Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.
|
Evidence (ENT-1677)No Roboflow app screenshots for this ticket. This is an inference backend fix ( BEFORE (
|
b3d41ea to
214abfb
Compare
a96eaf1 to
5d9ab74
Compare
|
🤖 Claude review started at commit New commits are not auto-reviewed. Add the |
|
@NVergunst-ROBO — questions that need your answer before this can advance. ⏳ This PR is on hold pending your answers — the review will not advance to sign-off until the IMPORTANT questions below are answered. 1. What evidence shows FFmpeg actually enforces
|
Review summarySkills: review-topic-concurrency-and-resource-safety, review-topic-backward-compat-and-versioning, review-topic-test-hygiene No dedicated surface skill covers Status: not merge-ready — 2 medium findings posted inline, 2 IMPORTANT questions open (see the action-item comment above). Findings
What checked out
Tests worth adding (all
Minor doubts (non-blocking)
Commands that informed this review: Reviewed at HEAD: 5d9ab74 |
c591b06 to
c7de909
Compare
|
Answers to the IMPORTANT questions (commit 1. FFmpeg enforcement evidenceWhat we can prove in CI today: the option string is built correctly and is present inside the real What we showed manually: the instrumentation script in the Evidence comment proves OpenCV reads Negative cert rejection: not automated in CI — it needs a live RTSPS endpoint with an untrusted/self-signed cert (stunnel/mediamtx fixture). The enforcement mechanism is the same FFmpeg TLS option path already used in production for WebRTC ingest ( Build under test: OpenCV 2. Breaking non-rfdm users — intentionalYes. Unmanaged Inline findings: lock timeout addressed in #2792; docs note added here. Requesting re-review with |
|
🤖 Claude review started at commit New commits are not auto-reviewed. Add the |
8f6f409 to
f141d4c
Compare
|
Blocked by: #2792 (comment) |
Wire opencv_rtsps_tls_env into CV2VideoFrameProducer so non-Jetson OpenCV/FFmpeg RTSPS opens honor rfdm-injected CA bundle and TLS flags. - Enter TLS env before capture_process_stderr (lock outside stderr redirect). - Widen helper signatures to Union[str, int] for the producer call site. - Document RTSPS-vs-RTSPS env isolation in the helper docstring.
Add module docstring for ROBOFLOW_RTSP_TLS_VALIDATION_FLAGS and CA bundle env vars (self-hosted escape hatch). Assert env var is restored after open, on capture failure, and untouched for int device indices.
OPENCV_FFMPEG_CAPTURE_OPTIONS and stderr dup2 are process-global, so concurrent camera opens can clobber each other. Hold one lock around the open.
A process-wide lock around every producer would stall USB/V4L2/file opens that have no FFmpeg timeout. Keep the RTSPS-only TLS env lock.
42cc38c to
cb2e61c
Compare
Description
Wires the B3
opencv_rtsps_tls_envhelper (inference#2727) intoCV2VideoFrameProducerso non-Jetson OpenCV/FFmpeg RTSPS opens honor rfdm-injected TLS settings.Problem:
opencv_rtsps_tls_envwas unit-tested but never called.CV2VideoFrameProduceropenedrtsps://with barecv2.VideoCapture, so FFmpeg got nocafileortls_verify. RTSPS was encrypted but unauthenticated on every OpenCV fallback device.Change:
opencv_rtsps_tls_env(video)beforecapture_process_stderr()(TLS lock must sit outside the global stderr redirect).Union[str, int]to match the producer call site.RTSPS TLS product model (permanent):
tls_validation_flags=127from rfdm).126→ FFmpeg maps totls_verify=0.Depends on: nothing. Blocks: inference#2792 (hardening stacks on this branch).
Linear: ENT-1677
Type of change
How has this change been tested, please provide a testcase or example of how you tested the change?
test_cv2_producer_sets_ffmpeg_tls_options_only_for_rtsps— assertsOPENCV_FFMPEG_CAPTURE_OPTIONSis visible insidecv2.VideoCaptureforrtsps://and absent forrtsp://(fails onmain, passes here).test_rtsp_opencv_tls.py— 13 passed.Will the change affect Universe? If so was this change tested in universe?
No. Edge inference pipeline path only.
Any specific deployment considerations
Reaches devices via inference release → roboflow-edge pin bump. Behavior change limited to
rtsps://on the OpenCV path. Jetson GStreamer path unchanged.Merge before inference#2792.
Docs