2.0 KiB
2.0 KiB
Concise Multi-Camera RTMP Streaming Setup Guide
1. Server Setup
- Install Nginx with RTMP module on a computer or cloud server
- Edit Nginx configuration file (usually at /etc/nginx/nginx.conf):
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
push rtmp://localhost/show/stream1;
push rtmp://localhost/show/stream2;
push rtmp://localhost/show/stream3;
push rtmp://localhost/show/stream4;
}
application show {
live on;
record off;
}
}
}
- Start/restart Nginx:
sudo systemctl restart nginx
2. Pixel Device Setup
- Install "Larix Broadcaster" on each Pixel from Google Play Store
- In each Larix Broadcaster app:
- Tap ≡ > Connections > Add > RTMP
- URL: rtmp://[YOUR_SERVER_IP]/live/stream[1-4]
- (Use a different stream number for each device)
- Name the connection and save
3. Viewer Setup
- Create an HTML file with this content:
<!DOCTYPE html>
<html>
<head>
<link href="https://vjs.zencdn.net/7.10.2/video-js.min.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script>
</head>
<body>
<video-js id="stream1" class="vjs-default-skin" controls width="320" height="240">
<source src="rtmp://[YOUR_SERVER_IP]/show/stream1" type="rtmp/mp4">
</video-js>
<!-- Repeat for stream2, stream3, stream4 -->
<script>
var player1 = videojs('stream1');
// Repeat for other streams
</script>
</body>
</html>
- Host this HTML file on a web server
4. Start Streaming
- On each Pixel, open Larix Broadcaster
- Tap the red record button to start streaming
- Open the HTML file in a web browser to view all streams
Troubleshooting
- Ensure all devices are on the same Wi-Fi network
- Check server firewall allows traffic on port 1935
- Verify correct IP addresses in all configurations