Created
July 9, 2025 17:25
-
-
Save asvdvl/68e4258c80eef0fab319e003e9d5363a to your computer and use it in GitHub Desktop.
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
| # Raspberry Pi 3 + camera-streamer: /video, /video*, /webrtc endpoints not working | |
| ## Symptoms | |
| - `/stream` endpoint works fine (MJPEG) | |
| - `/video`, `/video.mp4`, `/video.mkv` endpoints return errors | |
| - `/webrtc` endpoint not working | |
| - USB webcam connected, camera-streamer running | |
| - Switching to `resolution: 1920x1080` breaks even MJPEG, returning to 720p fixes /stream | |
| ## Root Cause | |
| RPi 3 has insufficient GPU memory for H264 hardware encoding of USB camera streams. | |
| ## Solution | |
| ### 1. Check current GPU memory: | |
| ```bash | |
| vcgencmd get_mem gpu | |
| # If < 128MB, needs fixing | |
| ``` | |
| ### 2. Edit config safely: | |
| ```bash | |
| sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.backup # backup first | |
| sudo nano /boot/firmware/config.txt | |
| ``` | |
| ### 3. Add GPU memory setting: | |
| **Before any section in `[]`** (no section): | |
| ```ini | |
| gpu_mem=128 | |
| ``` | |
| **Note:** Putting it in `[all]` section didn't work for me, maybe because I tried with 256MB first. | |
| ### 4. Reboot and verify: | |
| ```bash | |
| sudo reboot | |
| vcgencmd get_mem gpu # Should show 128M | |
| ``` | |
| ## ⚠️ Safety Notes | |
| - If something goes wrong, be ready with PC and card reader to edit config.txt | |
| - Don't use values > 256MB on RPi 3 | |
| ## 🧪 Test endpoints after fix: | |
| ```bash | |
| # These should now work: | |
| curl http://localhost:8080/video.mp4 | |
| curl http://localhost:8080/webrtc | |
| # Or via ffprobe: | |
| ffprobe http://localhost:8080/video.mp4 | |
| ``` | |
| --- | |
| *Tested on: RPi 3B+, Bullseye, camera-streamer via crowsnest* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment