nginx-rtmp pushing from one application to another

11,602

you can watch it if you put into vlc exactly this: "rtmp://example.com/source/$name". if you want to use $name as variable, you need to remove it from rtmp push completely, so your setup will look like this:

rtmp {
server {
    listen 1935;
    chunk_size 4096;

    application live {
        live on;
        record off;

        push rtmp://localhost:1935/source/;
    }

    application source {
        live on;
        record off;
    }
}
}
Share:
11,602

Related videos on Youtube

RikuXan
Author by

RikuXan

Updated on September 18, 2022

Comments

  • RikuXan
    RikuXan over 1 year

    I'm trying to push a RTMP stream with the nginx-rtmp-module (set up after this manual) from one of its applications into another one. A minimal example of my config (nginx.conf) looks as following.

    rtmp {
        server {
            listen 1935;
            chunk_size 4096;
    
            application live {
                live on;
                record off;
    
                push rtmp://localhost:1935/source/$name;
            }
    
            application source {
                live on;
                record off;
            }
        }
    }
    

    My streaming setup (with OBS) points the broadcast to example.com/live with the StreamKey ($name in nginx) jackbox. Now when trying to watch the stream in VLC, the URL rtmp://example.com/live/jackbox works, however rtmp://example.com/source/jackbox doesn't. Am I misunderstanding what push is supposed to do, or is there any other problem?

    If anyone needs more information about the setup, please feel free to ask.