nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Trigger exec_pull on http connection

Open rgordeev opened this issue 8 years ago • 2 comments

Hello! Is it possible to trigger exec_pull on http connection? For example, I have following configuration

rtmp {
    server {
        listen 1935;
        application hls {
            live on;
            hls_path /data;
....
        }
    }
}
...
http {
    server {
        listen 8080;

        location /hls/ {
            alias /data/;
...
        }
    }
}

I would like to have an exec_pull triggered on HLS http request, i mean if i request for

GET http://<my-host-address>:8080/hls/<stream-name>/index.m3u8

Nginx would try execute command like

ffmpeg -i input-sdp-file.sdp -c:v libx264 -an -f flv rtmp://localhost:1935/hls/$name

first and start streaming from requested http endpoint (and only if it fails return 404), where $name corresponds to <stream-name> from http request?

Also, I would like to know if it's possible to configure on_play and on_play_done for HLS http connections? I mean, does http request like

GET http://<my-host-address>:8080/hls/<stream-name>/index.m3u8

trigger on_play event, and expiration tirgger on_play_done?

rgordeev avatar Aug 31 '17 10:08 rgordeev

Have you figured out how to do it? @rgordeev I'm interested

absentio avatar Mar 17 '20 18:03 absentio

still nothing, after 5 years? :)

aik avatar Feb 27 '25 09:02 aik