-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.stream-env.example
More file actions
55 lines (44 loc) · 2.18 KB
/
Copy path.stream-env.example
File metadata and controls
55 lines (44 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# .stream-env.example — copy to .stream-env and fill in.
# Read by /etc/systemd/system/stream.service (installed via
# install-stream-service.sh).
# Mode toggle, read by install-stream-service.sh at install time.
# 1 = synthetic test pattern (lavfi testsrc2 + 1 kHz sine) — needs no capture hardware
# 0 = real capture (V4L2_DEVICE + ALSA_DEVICE)
# Default if unset: test pattern (safe — no device dependency).
# After flipping this value, re-run `sudo bash install-stream-service.sh`
# to regenerate the systemd unit.
TEST_PATTERN=1
# RTMP endpoint URL (the part *before* the stream key).
# Examples:
# rtmp://a.rtmp.youtube.com/live2 (YouTube — primary)
# rtmp://b.rtmp.youtube.com/live2?backup=1 (YouTube — backup)
# rtmp://live.twitch.tv/app
# rtmp://live.restream.io/live
RTMP_URL=rtmp://a.rtmp.youtube.com/live2
# RTMP stream key (the secret). For YouTube: find it in YouTube Studio under
# Live → Stream → Stream key. Use a TEST key while validating the pipeline.
# The full destination given to ffmpeg is ${RTMP_URL}/${RTMP_STREAM_KEY}.
RTMP_STREAM_KEY=REPLACE_ME
# Video capture device. /dev/video0 is the first USB capture (ATEM Mini Pro
# typically lands here). Verify with: v4l2-ctl --list-devices
V4L2_DEVICE=/dev/video0
# ALSA capture device for audio in (from the ATEM USB feed).
# By-name is more robust than hw:N — card numbers can shift between reboots.
# Verify with: arecord -l
ALSA_DEVICE=hw:CARD=Pro,DEV=0
# v4l2 input format. ATEM Mini Pro at 1080p only ships MJPEG over UVC.
INPUT_FORMAT=mjpeg
# Capture resolution. ATEM Mini Pro: 1920x1080.
VIDEO_SIZE=1920x1080
# Capture frame rate. ATEM advertises 30 or 60 fps at 1080p; 30 is the safe
# default for libx264 software encode on Pi 5 (no hardware H.264 encoder).
FRAMERATE=30
# Output video bitrate in kbps. 5500 ≈ 5.5 Mbps — fine for 1080p30 on a
# decent connection. Drop to 3000 for a phone hotspot if you want headroom.
# Twitch caps at 6000.
BITRATE_KBPS=5500
# Rate-control buffer size in kbps. Roughly 2× bitrate.
BUFSIZE_KBPS=11000
# AAC audio bitrate in kbps. 192 = high stereo quality; 256 if audio is the
# priority and bandwidth allows. Twitch accepts up to 320.
AUDIO_BITRATE_KBPS=192