nginxvideo-streamingrtmplive-streaming

Custom backup for RTMP-push streams with nginx-rtmp-module


I need to backup RTMP streams that I send to my server (nginx with nginx-rtmp-module): in case one of them fails, I need another to be automatically substituted when I grab it from the server.

Is it possible?


Solution

  • I have figured out a bit tricky way to do this and put the solution on Github

    It is a bunch of Shell scripts that allows you to do the following (assuming your server has DNS yourserver.ex:

    Send your main stream to rtmp://yourserver.ex/main/somekey, backup stream to rtmp://yourserver.ex/backup/somekey and watch the result on rtmp://yourserver.ex/out/somekey. (More instructions on Github)

    There could be a slight delay in switching streams, however, it works better than nothing.