Sign inSign up

chenshaoze/recordserver2

By chenshaoze

Updated about 7 years ago

使用springboot框架开发的m3u8格式视频录制服务

Image
0

304

chenshaoze/recordserver2 repository overview

部署

创建docker-compose.yml文件

version: '3'  
services:  
  recordserver:  
     image: chenshaoze/recordserver2  
     container_name: recordserver-docker  
     ports:  
       - "8081:8080"  
     volumes:  
       - ./record:/record  
     environment:  
       TZ : "Asia/Shanghai"  

使用docker-compose up命令启动服务
录制的文件会在./record文件夹中

使用

  • 开始录制
    向/record/start发送post请求,参数为json格式,例如:
{"src":"http://localhost:8081/stream/test.m3u8","dst":"current_record_dir/test.m3u8"}

接收的数据也为json格式,例如:

{
    "result": {
        "id": 1,
        "src": "http://localhost:8081/stream/test.m3u8",
        "dst": "current_record_dir/test.m3u8",
        "recording": true,
        "duration": 0
    }
}
  • 停止录制
    向/record/stop发送post请求,参数为json格式,例如:
{"id":1}

接收的数据也为json格式,例如:

{
    "result": {
        "id": 1,
        "src": "http://localhost:8081/stream/test.m3u8",
        "dst": "current_record_dir/test.m3u8",
        "recording": false,
        "duration": 76.634995
    }
}

Tag summary

Content type

Image

Digest

Size

84.3 MB

Last updated

about 7 years ago

docker pull chenshaoze/recordserver2