0

I have successfully setup nginx-rmtp-module for live streaming, i have tested it with obs software, it works great !

But i am having trouble to save the video on s3bucket for future use.

This is what i setup:

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

                application live {
                        live on;
                        record off;
                        hls on;
                        hls_path /var/www/html/stream/hls;
                        hls_fragment 3;
                        hls_playlist_length 60;

                        dash on;
                        dash_path /var/www/html/stream/dash;
                }
        }
}

and this is http

server {
    listen 8088;

    location / {
        add_header Access-Control-Allow-Origin *;
        root /var/www/html/stream;
    }
}

types {
    application/dash+xml mpd;
}

It works great, no complain at all ! But i am finding a way to push to my s3bucket. i want when a user go live, i want to save that video on s3bucket for future use.

i have google lots but coudlnt find any solution, is it possible?

  • You could mount S3 to your server, then NGINX can write files to the directory. Or you could use HTTP callback, to upload the file. – Winlin Jun 28 '22 at 02:29
  • Yes, Can you show me how can i write http callback for s3 in nginx? I was thinking to mount it, i will do it later but before i want to in http callback way. can you please show me an example? –  Jun 28 '22 at 03:01
  • HTTP Callback is not a very simple slolution, when you got the callback, you can move the file to another directory, or upload to S3, please refer to https://github.com/ossrs/srs-cloud/blob/main/hooks/hls.js – Winlin Jul 17 '22 at 06:05

0 Answers0