-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathingest.conf
55 lines (46 loc) · 1.76 KB
/
ingest.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
53
54
daemon off;
events {
worker_connections 1024;
}
error_log stderr;
rtmp {
server {
listen 1935;
chunk_size 4000;
application encoder {
live on;
exec ffmpeg -i rtmp://localhost:1935/encoder/$name
-c:a libfdk_aac -b:a 128k -c:v libx264 -x264opts keyint=120:min-keyint=120:scenecut=-1 -tune zerolatency -b:v 750k -f flv -g 120 -r 60 -s 640x360 -preset superfast rtmp://localhost:1935/hls/$name_360p878kbs
-c:a libfdk_aac -b:a 128k -c:v libx264 -x264opts keyint=120:min-keyint=120:scenecut=-1 -tune zerolatency -b:v 400k -f flv -g 120 -r 60 -s 426x240 -preset superfast rtmp://localhost:1935/hls/$name_240p528kbs
-c:a libfdk_aac -b:a 128k -c:v libx264 -x264opts keyint=120:min-keyint=120:scenecut=-1 -tune zerolatency -b:v 200k -f flv -g 120 -r 60 -s 426x240 -preset superfast rtmp://localhost:1935/hls/$name_240p264kbs;
}
application hls {
live on;
hls on;
hls_fragment_slicing aligned;
hls_fragment_naming timestamp;
hls_fragment 4s;
hls_playlist_length 600s;
hls_path /data/hls;
hls_nested on;
hls_cleanup on;
hls_variant _360p878kbs BANDWIDTH=878000,RESOLUTION=640x360;
hls_variant _240p528kbs BANDWIDTH=528000,RESOLUTION=426x240;
hls_variant _240p264kbs BANDWIDTH=264000,RESOLUTION=426x240;
}
}
}
http {
server {
listen 80;
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /data;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin * always;
}
}
}