{"id":31375979,"url":"https://github.com/orangeadmtl/orangead-mock-webcam","last_synced_at":"2026-05-08T07:32:09.211Z","repository":{"id":316295508,"uuid":"1058256646","full_name":"orangeadmtl/orangead-mock-webcam","owner":"orangeadmtl","description":"Mock webcam service using MediaMTX and FFmpeg for RTSP video streaming in testing and development environments","archived":false,"fork":false,"pushed_at":"2025-09-23T19:43:01.000Z","size":5940,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-23T20:29:42.831Z","etag":null,"topics":["development-tools","ffmpeg","linux","macos","mediamtx","mock-webcam","rtsp","testing","video-streaming"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orangeadmtl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-16T20:57:53.000Z","updated_at":"2025-09-23T19:43:05.000Z","dependencies_parsed_at":"2025-09-23T20:39:47.821Z","dependency_job_id":null,"html_url":"https://github.com/orangeadmtl/orangead-mock-webcam","commit_stats":null,"previous_names":["orangeadmtl/orangead-mock-webcam"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/orangeadmtl/orangead-mock-webcam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangeadmtl%2Forangead-mock-webcam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangeadmtl%2Forangead-mock-webcam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangeadmtl%2Forangead-mock-webcam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangeadmtl%2Forangead-mock-webcam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orangeadmtl","download_url":"https://codeload.github.com/orangeadmtl/orangead-mock-webcam/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangeadmtl%2Forangead-mock-webcam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["development-tools","ffmpeg","linux","macos","mediamtx","mock-webcam","rtsp","testing","video-streaming"],"created_at":"2025-09-28T02:53:04.683Z","updated_at":"2026-05-08T07:32:09.126Z","avatar_url":"https://github.com/orangeadmtl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OrangeAd Mock Webcam\n\nA mock webcam service using MediaMTX and FFmpeg to provide RTSP video streaming for testing and development.\n\n## Features\n\n- **Dual-Output Architecture**: Supports both RTSP streaming and local frame generation for optimal AI detection\n- **RTSP Streaming**: Streams a sample video on `rtsp://localhost:8554/webcam`\n- **Local Frame Generation**: Creates WebP frames in `/tmp/webcam/` for low-latency AI detection\n- **Automatic Dependency Management**: Installs required dependencies on macOS (Homebrew, FFmpeg, netcat)\n- **Robust Service Management**: Proper startup, shutdown, and error handling\n- **Cross-Platform**: Supports Linux and macOS (with enhanced macOS support)\n\n## Quick Start\n\n### 1. Setup\n```bash\n./setup.sh\n```\n\nThis will:\n- Install MediaMTX\n- On macOS: Install Homebrew (if needed), FFmpeg, and netcat\n- Verify all dependencies\n\n### 2. Start Service\n\n**Standard Mode (RTSP Only)**:\n```bash\n./start.sh\n```\n\n**Dual-Output Mode (RTSP + Local Frames)**:\n```bash\n./start-dual.sh\n```\n\n### 3. Stop Service\n```bash\n./stop.sh\n```\n\n## Usage\n\n### Testing the Stream\n```bash\n# Using mpv\nmpv rtsp://localhost:8554/webcam\n\n# Using VLC\nvlc rtsp://localhost:8554/webcam\n\n# Using ffplay\nffplay rtsp://localhost:8554/webcam\n```\n\n### Integration with oaTracker\n\n**For Standard Mode (RTSP)**:\nConfigure oaTracker to use the RTSP stream:\n```yaml\ndefault_yolo_source: \"rtsp://localhost:8554/webcam\"\n```\n\n**For Dual-Output Mode (Recommended)**:\nConfigure oaTracker to use local frames for optimal performance:\n```yaml\ndefault_yolo_source: \"/tmp/webcam/\"\n```\n\nThe dual-output mode provides:\n- **\u003c100ms latency** for AI detection via local frames\n- **Live RTSP stream** for viewing and recording\n- **Automatic frame cleanup** to prevent disk space issues\n\n## Requirements\n\n### macOS\n- macOS 10.15+ (automatically handled by setup script)\n- Internet connection for downloading dependencies\n\n### Linux\n- `curl` and `tar` for MediaMTX installation\n- `ffmpeg` must be installed separately\n- `netcat` for port checking\n\n## Files\n\n- `setup.sh` - Setup script with dependency management\n- `start.sh` - Start the mock webcam service\n- `stop.sh` - Stop all services\n- `mediamtx.yml` - MediaMTX configuration\n- `sample.mp4` - Sample video file for streaming\n\n## Configuration\n\nThe MediaMTX configuration can be customized by editing `mediamtx.yml`. Key settings:\n\n- **RTSP Port**: Default 8554\n- **Stream Path**: `/webcam`\n- **Video Quality**: Configured in FFmpeg parameters\n\n## Troubleshooting\n\n### Port Already in Use\n```bash\n# Check what's using port 8554\nlsof -i :8554\n\n# Kill existing processes\n./stop.sh\n```\n\n### Dependencies Missing\n```bash\n# Re-run setup to install dependencies\n./setup.sh\n```\n\n### Stream Not Working\n1. Check if MediaMTX is running: `ps aux | grep mediamtx`\n2. Check if FFmpeg is running: `ps aux | grep ffmpeg`\n3. Test port connectivity: `nc -z localhost 8554`\n\n## Development\n\nFor integration with OrangeAd projects, deploy to `~/orangead/mock-webcam/` on target devices:\n\n```bash\n# Clone to standard location\ncd ~/orangead\ngit clone https://github.com/orangeadmtl/orangead-mock-webcam.git mock-webcam\ncd mock-webcam\n./setup.sh\n./start.sh\n```\n\n## License\n\nPart of the OrangeAd ecosystem. See main project documentation for licensing.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forangeadmtl%2Forangead-mock-webcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forangeadmtl%2Forangead-mock-webcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forangeadmtl%2Forangead-mock-webcam/lists"}