forked from ngrie/rtmpie
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rtmp_nginx_dev.conf
52 lines (42 loc) · 1.31 KB
/
rtmp_nginx_dev.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
user nginx;
events {}
http {
server {
listen 80;
server_name localhost;
location /thumbnails/ {
root /var;
}
location /control {
rtmp_control all;
}
location /live {
flv_live on;
chunked_transfer_encoding on;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
}
}
}
rtmp {
server {
listen 1935;
listen [::]:1935 ipv6only=on;
drop_idle_publisher 10s;
application live {
live on;
record off;
on_publish http://host.docker.internal:8000/rtmp-events/publish;
on_publish_done http://host.docker.internal:8000/rtmp-events/publish-done;
on_play http://host.docker.internal:8000/rtmp-events/play;
on_play_done http://host.docker.internal:8000/rtmp-events/play-done;
recorder preview {
record keyframes;
record_max_frames 4;
record_path /tmp/thumbnail_recordings;
record_interval 20s;
exec_record_done ffmpeg -i $path -vcodec png -vframes 1 -an -f rawvideo -s 320x240 -ss 00:00:01 -y /var/thumbnails/$name.png;
}
}
}
}