box: add webcam input and fix bash conditionals#3882
Merged
rickstaa merged 3 commits intolivepeer:masterfrom Mar 20, 2026
Merged
box: add webcam input and fix bash conditionals#3882rickstaa merged 3 commits intolivepeer:masterfrom
rickstaa merged 3 commits intolivepeer:masterfrom
Conversation
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>
j0sh
approved these changes
Mar 18, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
INPUT_WEBCAMenv var tostream.shfor webcam input via v4l2 (e.g./dev/video0)box.md[ ... && ... ]conditional inbox.sh(caused[: missing ]error) and switch all conditionals to bash[[ ]]for consistencyTest plan
make box REBUILD=false DOCKER=trueand verify no syntax errorsINPUT_WEBCAM=/dev/video0 make box-streamwith a webcamINPUT_VIDEO=/path/to/file.mp4 make box-streamwith a video file