0

I have two application blocks in my nginx.conf:

rtmp {
        server {
                listen 1935;
                chunk_size 4096;
                allow publish 127.0.0.1;
                allow publish all;

                application preview {
                        live on;
                        hls on;

                        meta copy;
                        exec ffmpeg -re -i rtmp://localhost:1935/preview/$name -c copy -f flv rtmp://localhost:1935/cloudflare_stream/$stream_key;

                }

                application cloudflare_stream {
                        ...
                }
        }
}

What i want is to be able to stream to preview with the url rtmp://localhost:1935/preview/somename?stream_key=somekey

How can i access the stream_key variable in the application block?

What im tring to do is have preview restream to cloudflare_stream with a different stream key, so that preview can be accessed without using the secret cloudflare stream key.

I have tried using $arg_stream_key, $stream_key, and other variants, but they seem to be blank.

Skauen
  • 11
  • 1

0 Answers0