Add random/pixel_streaming.md

This commit is contained in:
2024-09-16 16:53:26 +00:00
parent 26f518c663
commit 7f8f949f11

74
random/pixel_streaming.md Normal file
View File

@@ -0,0 +1,74 @@
# Concise Multi-Camera RTMP Streaming Setup Guide
## 1. Server Setup
1. Install Nginx with RTMP module on a computer or cloud server
2. Edit Nginx configuration file (usually at /etc/nginx/nginx.conf):
```nginx
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;
}
}
}
```
3. Start/restart Nginx: `sudo systemctl restart nginx`
## 2. Pixel Device Setup
1. Install "Larix Broadcaster" on each Pixel from Google Play Store
2. 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
1. Create an HTML file with this content:
```html
<!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>
```
2. Host this HTML file on a web server
## 4. Start Streaming
1. On each Pixel, open Larix Broadcaster
2. Tap the red record button to start streaming
3. 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