ffmpegc

package
v0.0.0-...-d64eb31 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = NewFfmpegConfig("./hls_output", nil)
)

Functions

func ResolutionCmd

func ResolutionCmd(resolution, fps int, supported []int, info1 map[string]ResolutionInfo) ([]string, error)

Types

type Ffmpeg

type Ffmpeg struct {
	// contains filtered or unexported fields
}

func NewFfmpeg

func NewFfmpeg(serviceContext srvctx.ServiceContext) *Ffmpeg

func (*Ffmpeg) NewStream

func (f *Ffmpeg) NewStream(streamId, serverUrl, streamKey string, fps, resolution int) (closeFunc func() error)

NewStream initializes and runs a Ffmpeg process to create an HLS stream with the specified parameters.

func (*Ffmpeg) Start

func (f *Ffmpeg) Start()

func (*Ffmpeg) StopStream

func (f *Ffmpeg) StopStream(streamId string) error

func (*Ffmpeg) WithConfig

func (f *Ffmpeg) WithConfig(config *FfmpegConfig) *Ffmpeg

type FfmpegConfig

type FfmpegConfig struct {
	// contains filtered or unexported fields
}

func NewFfmpegConfig

func NewFfmpegConfig(mountFolder string, rd *redis.Client) *FfmpegConfig

type FpsBitRate

type FpsBitRate struct {
	ABitRate int `json:"aBitRate"`
	VBitRate int `json:"vBitRate"`
}

type ResolutionInfo

type ResolutionInfo struct {
	Width  int                   `json:"width"`
	Height int                   `json:"height"`
	Fps    map[string]FpsBitRate `json:"fps"`
}

Jump to

Keyboard shortcuts

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