Skip to content

Commit 5163602

Browse files
feat: Add example environment configuration for Radxa SBC streamer
1 parent 65d8f87 commit 5163602

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

sbc_streamer/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The streamer is configured through environment variables (values shown with defa
1414

1515
| Variable | Description |
1616
| --- | --- |
17-
| `FFMPEG_BINARY=ffmpeg` | Path to the `ffmpeg` executable |
17+
| `FFMPEG_BINARY=ffmpeg` | Path to the `ffmpeg` executable (set to `/usr/local/bin/ffmpeg` when using a custom build) |
1818
| `CAMERA_DEVICE=/dev/video0` | Video4Linux device supplying the camera feed |
1919
| `AUDIO_DEVICE` | Optional ALSA device (e.g. `hw:1,0`) to include audio |
2020
| `INPUT_FORMAT` | Force a V4L2 input format (e.g. `mjpeg`, `yuyv422`) when autodetect fails |
@@ -75,3 +75,8 @@ Copy the resulting `streamer` binary to the Radxa.
7575
```
7676

7777
The service will restart automatically if `ffmpeg` exits and will reconnect after transient network failures.
78+
79+
## Hardware acceleration tips
80+
81+
- For Rockchip hardware encoding, install an `ffmpeg` build compiled with `--enable-rkmpp` or the V4L2 request API and set `FFMPEG_BINARY=/usr/local/bin/ffmpeg` (or whichever path hosts your accelerated binary).
82+
- Update the streamer source if you need to switch codecs (for example, replace `libx264` with `h264_rkmpp`). After editing, rebuild the binary with `go build`.

sbc_streamer/streamer.example.env

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Example environment file for the Radxa SBC streamer
2+
3+
# Path to the accelerated ffmpeg binary
4+
FFMPEG_BINARY=/usr/local/bin/ffmpeg
5+
6+
# Video source configuration
7+
CAMERA_DEVICE=/dev/video0
8+
FRAME_RATE=30
9+
VIDEO_SIZE=1280x720
10+
VIDEO_BITRATE=1500k
11+
# Uncomment if the camera requires a specific pixel format (e.g. mjpeg)
12+
#INPUT_FORMAT=mjpeg
13+
14+
# Optional audio source (ALSA device ID), leave empty to disable audio capture
15+
#AUDIO_DEVICE=hw:1,0
16+
17+
# Relay connection details
18+
RELAY_HOST=rtsp.nene.02labs.me:8554
19+
RELAY_PUBLISH_USER=robot
20+
RELAY_PUBLISH_PASS=replace-with-strong-secret
21+
STREAM_NAME=robot
22+
RTSP_TRANSPORT=tcp

0 commit comments

Comments
 (0)