I have a custom RTMP server powered by nginx-rtmp.
This is my configuration:
server {
listen 1935;
chunk_size 4000;
ping 10s;
ping_timeout 5s;
application live {
live on;
wait_key on;
play_restart on;
}
}
When a broadcaster wants to start a live stream, s/he will publish the content to rtmp://myserver.com/live/someUserDefinedStreamName
.
When a viewer wants to watch a live stream, s/he will get the stream url from an API endpoint, and this is the problem.
The someUserDefinedStreamName
is literally "public", which means everyone can publish content to this url to pretend as the broadcaster.
Any suggestion on this problem to prevent the viewers from knowing the original stream url?
For example, broadcaster publishes content to rtmp://myserver.com/live/someUserDefinedStreamName
while viewers can watch the stream with rtmp://myserver.com/live?someHashString
, but how?