[chore] 增强易用性:修改配置文件中的默认配置:hls、flv、mpegts的文件输出地址由绝对路径/tmp修改为相对路径./lal_record

pull/114/head
q191201771 3 years ago
parent abb92c9074
commit 2fc5c3194a

1
.gitignore vendored

@ -5,6 +5,7 @@ coverage.html
*.flv *.flv
logs logs
testdata testdata
lal_record
/pre-commit.sh /pre-commit.sh
/coverage.txt /coverage.txt

@ -34,7 +34,7 @@
// - `/hls/{streamName}/{streamName}-{timestamp}-{index}.ts` // - `/hls/{streamName}/{streamName}-{timestamp}-{index}.ts`
// `/hls/{streamName}-{timestamp}-{index}.ts` // `/hls/{streamName}-{timestamp}-{index}.ts`
// 注意hls的url_pattern不能和httpflv、httpts的url_pattern相同 // 注意hls的url_pattern不能和httpflv、httpts的url_pattern相同
"out_path": "/tmp/lal/hls/", //. HLS文件保存根目录 "out_path": "./lal_record/hls/", //. HLS文件保存根目录
"fragment_duration_ms": 3000, //. 单个TS文件切片时长单位毫秒 "fragment_duration_ms": 3000, //. 单个TS文件切片时长单位毫秒
"fragment_num": 6, //. m3u8文件列表中ts文件的数量 "fragment_num": 6, //. m3u8文件列表中ts文件的数量
"cleanup_mode": 1, //. HLS文件清理模式 "cleanup_mode": 1, //. HLS文件清理模式
@ -56,10 +56,10 @@
"addr": ":5544" //. rtsp推流地址 "addr": ":5544" //. rtsp推流地址
}, },
"record": { "record": {
"enable_flv": true, //. 是否开启flv录制 "enable_flv": true, //. 是否开启flv录制
"flv_out_path": "/tmp/lal/flv/", //. flv录制目录 "flv_out_path": "./lal_record/flv/", //. flv录制目录
"enable_mpegts": true, //. 是否开启mpegts录制。注意此处是长ts文件录制hls录制由上面的hls配置控制 "enable_mpegts": true, //. 是否开启mpegts录制。注意此处是长ts文件录制hls录制由上面的hls配置控制
"mpegts_out_path": "/tmp/lal/mpegts" //. mpegts录制目录 "mpegts_out_path": "./lal_record/mpegts" //. mpegts录制目录
}, },
"relay_push": { "relay_push": {
"enable": false, //. 是否开启中继转推功能,开启后,自身接收到的所有流都会转推出去 "enable": false, //. 是否开启中继转推功能,开启后,自身接收到的所有流都会转推出去

@ -23,7 +23,7 @@
"enable": false, "enable": false,
"enable_https": false, "enable_https": false,
"url_pattern": "/hls/", "url_pattern": "/hls/",
"out_path": "/tmp/lal/hls/", "out_path": "./lal_record/hls/",
"fragment_duration_ms": 3000, "fragment_duration_ms": 3000,
"fragment_num": 6, "fragment_num": 6,
"cleanup_mode": 1, "cleanup_mode": 1,
@ -40,9 +40,9 @@
}, },
"record": { "record": {
"enable_flv": false, "enable_flv": false,
"flv_out_path": "/tmp/lal/flv/", "flv_out_path": "./lal_record/flv/",
"enable_mpegts": false, "enable_mpegts": false,
"mpegts_out_path": "/tmp/lal/mpegts" "mpegts_out_path": "./lal_record/mpegts"
}, },
"relay_push": { "relay_push": {
"enable": false, "enable": false,

@ -23,7 +23,7 @@
"enable": true, "enable": true,
"enable_https": false, "enable_https": false,
"url_pattern": "/hls/", "url_pattern": "/hls/",
"out_path": "/tmp/lal/hls/", "out_path": "./lal_record/hls/",
"fragment_duration_ms": 3000, "fragment_duration_ms": 3000,
"fragment_num": 6, "fragment_num": 6,
"cleanup_mode": 1, "cleanup_mode": 1,
@ -40,9 +40,9 @@
}, },
"record": { "record": {
"enable_flv": false, "enable_flv": false,
"flv_out_path": "/tmp/lal/flv/", "flv_out_path": "./lal_record/flv/",
"enable_mpegts": false, "enable_mpegts": false,
"mpegts_out_path": "/tmp/lal/mpegts" "mpegts_out_path": "./lal_record/mpegts"
}, },
"relay_push": { "relay_push": {
"enable": false, "enable": false,

@ -23,7 +23,7 @@
"enable": true, "enable": true,
"enable_https": false, "enable_https": false,
"url_pattern": "/hls/", "url_pattern": "/hls/",
"out_path": "/tmp/lal/hls/", "out_path": "./lal_record/hls/",
"fragment_duration_ms": 3000, "fragment_duration_ms": 3000,
"fragment_num": 6, "fragment_num": 6,
"cleanup_mode": 1, "cleanup_mode": 1,
@ -40,9 +40,9 @@
}, },
"record": { "record": {
"enable_flv": false, "enable_flv": false,
"flv_out_path": "/tmp/lal/flv/", "flv_out_path": "./lal_record/flv/",
"enable_mpegts": false, "enable_mpegts": false,
"mpegts_out_path": "/tmp/lal/mpegts" "mpegts_out_path": "./lal_record/mpegts"
}, },
"relay_push": { "relay_push": {
"enable": false, "enable": false,

@ -83,5 +83,6 @@ done
rm -rf ./pkg/logic/logs ./pkg/rtmp/logs ./pkg/httpflv/logs ./pkg/hls/logs rm -rf ./pkg/logic/logs ./pkg/rtmp/logs ./pkg/httpflv/logs ./pkg/hls/logs
#rm -rf ./pkg/logic/testdata ./pkg/rtmp/testdata ./pkg/httpflv/testdata ./pkg/hls/testdata #rm -rf ./pkg/logic/testdata ./pkg/rtmp/testdata ./pkg/httpflv/testdata ./pkg/hls/testdata
rm -rf ./pkg/logic/lal_record ./pkg/rtmp/lal_record ./pkg/httpflv/lal_record ./pkg/hls/lal_record
echo 'done.' echo 'done.'

Loading…
Cancel
Save