Comments (4)
Hi @varnish97, what do you mean by private key? What kind of service do you want to use? What you just need is a RTMP URL that contains your key.
from multi-streaming-server.
I would like to assign a private key to each client, so as to provide a broadcast to every person.
Ie I'll explain:
privateKey1 - Youtube (User1), Twitch (User1), Hitbox (User1).
privateKey2 - Youtube (User2), Twitch (User2), Hitbox (User2).
etc....
How would you advise me to do?
from multi-streaming-server.
I didn't do anything like that myself, but if I properly understood what you want to achieve, you need to have a custom RTMP URL for each user. In this project, I use only one URL (rtmp://192.168.42.42:1935/live) which is referring to the live application from the Nginx configuration (here). So basically, what I do would be to create a new application in the Nginx conf for every user, something like this:
rtmp {
server {
listen 1935;
chunk_size 8192;
// Applications for User1
application live-privateKey1 {
live on;
record off;
allow publish {{ my_ip_address }};
deny publish all;
push rtmp://localhost/youtube-privateKey1/${name};
exec ffmpeg -i rtmp://localhost/$app/$name -c:v libx264 -preset veryfast -c:a copy
-b:v 3500k
-bufsize 3500k
-maxrate 3500k
-s 1280x720 -r 30
-f flv rtmp://localhost/twitch-privateKey1/$name;
push rtmp://localhost/dailymotion-privateKey1/${name};
push rtmp://localhost/hitbox-privateKey1/${name};
}
application youtube-privateKey1 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://a.rtmp.youtube.com/live2/{{ youtube_key_user1 }};
}
application twitch-privateKey1 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://live-cdg.twitch.tv/app/{{ twitch_key_user1 }};
}
application dailymotion-privateKey1 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://publish.dailymotion.com/publish-dm/{{ dailymotion_key_user1 }};
}
application hitbox-privateKey1 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://live.hitbox.tv/push/{{ hitbox_key_user1 }};
}
// Applications for User2
application live-privateKey2 {
live on;
record off;
allow publish {{ my_ip_address }};
deny publish all;
push rtmp://localhost/youtube-privateKey2/${name};
exec ffmpeg -i rtmp://localhost/$app/$name -c:v libx264 -preset veryfast -c:a copy
-b:v 3500k
-bufsize 3500k
-maxrate 3500k
-s 1280x720 -r 30
-f flv rtmp://localhost/twitch-privateKey2/$name;
push rtmp://localhost/dailymotion-privateKey2/${name};
push rtmp://localhost/hitbox-privateKey2/${name};
}
application youtube-privateKey2 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://a.rtmp.youtube.com/live2/{{ youtube_key_user2 }};
}
application twitch-privateKey2 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://live-cdg.twitch.tv/app/{{ twitch_key_user2 }};
}
application dailymotion-privateKey2 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://publish.dailymotion.com/publish-dm/{{ dailymotion_key_user2 }};
}
application hitbox-privateKey2 {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://live.hitbox.tv/push/{{ hitbox_key_user2 }};
}
}
}
Then, you just have to send the stream on the corresponding RTMP URL depending on the user (rtmp://192.168.42.42:1935/live-privateKey1 for User1).
But I'm pretty sure there is a better way to do that. Please ask the same question on the Nginx RTMP module project (here), they might have a better answer to your problem.
from multi-streaming-server.
Thank you, great! I also had to rate Conceived in this way, Thank you very much
from multi-streaming-server.
Related Issues (19)
- Problem connecting from OBS to nginx HOT 6
- command: vagrant up, fails when trying to connect to VM HOT 1
- Facebook Live? HOT 2
- Guide to install on dedicated server? HOT 14
- Obs restart loop HOT 10
- nginx configuration for outputting multiple resolutions? HOT 2
- ./bootstrap.sh fails HOT 11
- not pushing to facebook HOT 2
- Multi Instances HOT 8
- Secure RTMP Url with token?
- Could not connect to server HOT 8
- Nginx Conf Watcher missing HOT 1
- Nginx not starting with "vagrant up" HOT 10
- Restart just one service HOT 1
- Issue with remote connection HOT 6
- nginx.conf HOT 13
- Vagrant twitch HOT 3
- New Error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multi-streaming-server.