Skip to content

Commit 657f6c7

Browse files
author
luowei
committed
添加对视频流的录制配置...
1 parent 591e1bc commit 657f6c7

File tree

12 files changed

+149
-4
lines changed

12 files changed

+149
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/logs
22
/temp
3-
/html/media
3+
#/html/media
44
/nginx_b
55
/ffplay
66
/ffmpeg

conf/conf.d/rtmp4.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#����������Լ���IPΪ��192.168.31.230���Է���IPΪ:192.168.31.232��
21

32
rtmp{
43
server{

conf/conf.d/rtmp5.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#����������Լ���IPΪ��192.168.31.230���Է���IPΪ:192.168.31.232��
21

32
rtmp{
43
server{

conf/conf.d/rtmp6.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
rtmp{
3+
server{
4+
listen 1935;
5+
chunk_size 8192;
6+
7+
application vod {
8+
meta copy;
9+
play html/media;
10+
}
11+
12+
}
13+
}

conf/conf.d/rtmp7.conf

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#����������Լ���IPΪ��192.168.31.230���Է���IPΪ:192.168.31.232��
2+
3+
rtmp{
4+
server{
5+
listen 1935;
6+
chunk_size 8192;
7+
8+
application vod {
9+
meta copy;
10+
play html/media;
11+
}
12+
13+
#ÿ��¼����ԭ�����ļ�׷��
14+
application live1 {
15+
live on;
16+
meta copy;
17+
record all;
18+
record_append on;
19+
record_path html/media/record;
20+
21+
}
22+
23+
#ÿ��¼�������µ��ļ�
24+
application live2 {
25+
live on;
26+
meta copy;
27+
record all;
28+
record_unique on;
29+
record_path html/media/record;
30+
31+
}
32+
33+
34+
application live3 {
35+
live on;
36+
meta copy;
37+
38+
#ֻ����Ƶ¼������
39+
recorder audio{
40+
record audio manual;
41+
record_suffix .audio.flv;
42+
record_path html/media/record/audio;
43+
}
44+
45+
#�ֿ�¼�ƣ�ÿ1800�봴��һ���ļ�
46+
recorder chunked{
47+
record all;
48+
record_interval 1800s;
49+
record_suffix -%Y-%m-%d-%M%M.flv;
50+
record_path html/media/record/chunked;
51+
}
52+
}
53+
54+
#�ֶ�¼��
55+
application manualRec {
56+
live on;
57+
recorder rec1 {
58+
record all manual;
59+
record_unique on;
60+
record_suffix all.flv;
61+
record_path html/media/record;
62+
63+
}
64+
}
65+
##Publish the stream with the following command
66+
#ffmpeg -i "html\media\a.mov" -c:v copy -c:a nellymoser -ar 44100 -ac 1 -f flv rtmp://127.0.0.1/manualRec/mystream
67+
68+
#curl http://127.0.0.1/control/record/start?app=manualRec&name=mystream&rec=rec1
69+
#curl http://127.0.0.1/control/record/stop?app=manualRec&name=mystream&rec=rec1
70+
71+
}
72+
}

conf/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rtmp_auto_push on;
1515
include conf.d/http3.conf;
1616

1717
#rtmp config
18-
include conf.d/rtmp5.conf;
18+
include conf.d/rtmp7.conf;
1919

2020
#mail config
2121
#include conf.d/mail.conf

html/img/a.jpg

88.8 KB
Loading

html/img/b.jpg

66.1 KB
Loading

html/img/c.jpg

118 KB
Loading

html/media/b.flv

11 MB
Binary file not shown.

0 commit comments

Comments
 (0)