eanfs df6486a022 Eanfs v4 (#41)
* [feature] 支持录制完成后上传到Minio

* change module id

* Update mod name

* reset go.mod

* Update for minio uploading

* Update for log

* [feature] support all Recorder

* Update

* Merge branch 'v4' into githubv4

* v4:
  git commit for minio

* fix error

* Update

* Update

* Update for support max Duration

* Update v4.6.5

* Update for chang Config name

* [refactor] update for recording duration

* Update for remove orgion file

* Update mod

* Update

* fix: close mp4 record error

* Update readme

* Fix file not upload Successfully

* feat(recording): 支持录制检查回调

* feat:增加数据库录制检查

* Update 录制文件没有写入结束标志

* 更新依赖包

* fix(record): 自动删除的录像文件。

* Update for sqllite to db error
2025-06-20 16:33:44 +08:00
2020-05-21 13:02:08 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2024-07-26 11:11:18 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2024-09-14 17:17:06 +08:00
2020-04-20 20:00:23 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00
2025-06-20 16:33:44 +08:00

RECORD插件

对流进行录制的功能插件提供Flv、fmp4、hls、裸流格式的录制功能。

插件地址

https://github.com/Monibuca/plugin-record

插件引入

import (
    _ "m7s.live/plugin/record/v4"
)

配置

  • 配置中的path 表示要保存的文件的根路径,可以使用相对路径或者绝对路径
  • filter 代表要过滤的StreamPath正则表达式如果不匹配则表示不录制。为空代表不进行过滤
  • fragment表示分片大小20s代表20秒1m代表1分钟可以组合0代表不分片
record:
  subscribe: # 参考全局配置格式
  flv:
      ext: .flv
      path: record/flv
      autorecord: false
      filter: ""
      fragment: 0
  mp4:
      ext: .mp4
      path: record/mp4
      autorecord: false
      filter: ""
      fragment: 0
  hls:
      ext: .m3u8
      path: record/hls
      autorecord: false
      filter: ""
      fragment: 0
  raw:
      ext: .
      path: record/raw
      autorecord: false
      filter: ""
      fragment: 0

API

  • /record/api/list/recording 罗列所有正在录制中的流的信息
  • /record/api/list?type=[flv|mp4|hls|raw] 罗列所有录制的flv|mp4|m3u8|raw文件
  • /record/api/start?type=flv&streamPath=live/rtc&fileName=xxx&fragment=10s 开始录制某个流,返回一个字符串用于停止录制用的id(fileName是可选的且只用于非切片情况,fragment用于覆盖配置中的切片时间是可选的如果fileName和fragment都存在则忽略fileName)
  • /record/api/stop?id=xxx 停止录制某个流

点播功能

访问格式: [http/https]://[host]:[port]/record/[streamPath].[flv|mp4|m3u8|h264|h265]

例如:

  • http://localhost:8080/record/live/test.flv 将会读取对应的flv文件
  • http://localhost:8080/record/live/test.mp4 将会读取对应的fmp4文件

// GO仓库刷新INDEX

GOPROXY=proxy.golang.org go list -m github.com/eanfs/plugin-record/v4@v4.9.3

GOPROXY=proxy.golang.org go list -m github.com/eanfs/plugin-transform/v1@v1.0.0

Description
提供直播流录制以及回放功能。目前支持录制成flv格式
Readme MIT 536 KiB
Languages
Go 100%