Skip to content

box: add webcam input and fix bash conditionals#3882

Merged
rickstaa merged 3 commits intolivepeer:masterfrom
rickstaa:feat/box-webcam-input
Mar 20, 2026
Merged

box: add webcam input and fix bash conditionals#3882
rickstaa merged 3 commits intolivepeer:masterfrom
rickstaa:feat/box-webcam-input

Conversation

@rickstaa
Copy link
Copy Markdown
Member

@rickstaa rickstaa commented Mar 18, 2026

Summary

  • Add INPUT_WEBCAM env var to stream.sh for webcam input via v4l2 (e.g. /dev/video0)
  • Document video file and webcam input options in box.md
  • Fix broken [ ... && ... ] conditional in box.sh (caused [: missing ] error) and switch all conditionals to bash [[ ]] for consistency

Test plan

  • Run make box REBUILD=false DOCKER=true and verify no syntax errors
  • Test INPUT_WEBCAM=/dev/video0 make box-stream with a webcam
  • Test INPUT_VIDEO=/path/to/file.mp4 make box-stream with a video file
  • Test default (no input vars) still uses test pattern

rickstaa and others added 2 commits March 18, 2026 17:47
Add INPUT_WEBCAM env var to stream.sh for using a webcam (e.g.
/dev/video0) as video input via v4l2. Document both video file
and webcam input options in box.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace POSIX [ ] with bash [[ ]] throughout box.sh. The original
[ ] with && on line 7 was a syntax error ([: missing ]). Since the
script uses #!/bin/bash, use [[ ]] consistently for safer conditionals.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rickstaa rickstaa requested a review from j0sh March 18, 2026 16:54
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.77913%. Comparing base (ad7d5e4) to head (bb00d7b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #3882         +/-   ##
===================================================
- Coverage   32.81243%   32.77913%   -0.03330%     
===================================================
  Files            171         171                 
  Lines          42042       42042                 
===================================================
- Hits           13795       13781         -14     
- Misses         27212       27227         +15     
+ Partials        1035        1034          -1     

see 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad7d5e4...bb00d7b. Read the comment docs.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rickstaa rickstaa merged commit 7ce5478 into livepeer:master Mar 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants