record

package module
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 13 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

record插件

record plugin for monibuca

实现了录制Flv文件的功能,并且支持再次使用录制好的Flv文件作为发布者进行发布。

默认配置

配置中的Path 表示要保存的Flv文件的根路径,可以使用相对路径或者绝对路径

[Record]
Path = ""
AutoRecord =false

API

  • /api/record/flv/list 罗列所有录制的flv文件
  • /api/record/flv?streamPath=live/rtc 开始录制某个流
  • /api/record/flv/stop?streamPath=live/rtc 停止录制某个流
  • /api/record/flv/play?streamPath=live/rtc 将某个flv文件读取并发布成一个直播流
  • /api/record/flv/delete?streamPath=live/rtc 删除某个flv文件

点播功能

访问 http://[HOST]:[Gateway Port]/vod/live/rtc.flv 将会读取对应的flv文件

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtraConfig struct {
	CreateFileFn     func(filename string) (FileWr, error)
	AutoRecordFilter func(stream string) bool
}

Functions

func PublishFlvFile

func PublishFlvFile(streamPath string) error

func SaveFlv

func SaveFlv(streamPath string, append bool) error

func VodHandler

func VodHandler(w http.ResponseWriter, r *http.Request)

Types

type FileWr

type FileWr interface {
	io.Reader
	io.Writer
	io.Seeker
	io.Closer
}

type FlvFileInfo

type FlvFileInfo struct {
	Path     string
	Size     int64
	Duration uint32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL