Sign inSign up

chenshaoze/recordserver

By chenshaoze

Updated over 8 years ago

Record RTMP stream to FLV file.

Image
1

360

chenshaoze/recordserver repository overview

Base from ubuntu 17.10. Use ffmpeg libavformat-dev and libavcodec-dev api to realize the recording operation. You can post http request to start and stop the recording. HTTP port is 4000.

The program is record rtmp stream to flv file. The recording file will save in the "record" directory which path is /opt/RecordServer/record.


StartRecord URL: /startrecord

POST Param: id: flag src: rtmp url dst: local file path

Response(JSON): error: error description, default is 0. duration: FLV video length, seconds. {"error":"0","duration":0}


StopRecord URL: /stoprecord

POST Param: id: flag

Response(JSON): error: error description, default is 0. duration: FLV video length, seconds. {"error":"0","duration":40}


Example: You can create docker-compose.yml file as follows:

version: '3' services: recordserver: image: chenshaoze/recordserver container_name: recordserver-docker ports: - "4000:4000" volumes: - ./record:/opt/RecordServer/record environment: TZ : "Asia/Shanghai" command: bash -c "cd /opt/RecordServer && ./recordserver"

Tag summary

Content type

Image

Digest

Size

195 MB

Last updated

over 8 years ago

docker pull chenshaoze/recordserver