Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioEncoderBuilder ¶
type AudioEncoderBuilder interface {
// Name represents the codec name
Name() string
// BuildAudioEncoder builds audio encoder by given media params and audio input
BuildAudioEncoder(r audio.Reader, p prop.Media) (ReadCloser, error)
}
AudioEncoderBuilder is the interface that wraps basic operations that are necessary to build the audio encoder.
This interface is for codec implementors to provide codec specific params, but still giving generality for the users.
type BaseParams ¶
type BaseParams struct {
// Target bitrate in bps.
BitRate int
// Expected interval of the keyframes in frames.
KeyFrameInterval int
}
BaseParams represents an codec's encoding properties
type ReadCloser ¶
type ReadCloser interface {
io.ReadCloser
// SetBitRate sets current target bitrate, lower bitrate means smaller data will be transmitted
// but this also means that the quality will also be lower.
SetBitRate(int) error
// ForceKeyFrame forces the next frame to be a keyframe, aka intra-frame.
ForceKeyFrame() error
}
ReadCloser is an io.ReadCloser with methods for rate limiting: SetBitRate and ForceKeyFrame
type VideoEncoderBuilder ¶
type VideoEncoderBuilder interface {
// Name represents the codec name
Name() string
// BuildVideoEncoder builds video encoder by given media params and video input
BuildVideoEncoder(r video.Reader, p prop.Media) (ReadCloser, error)
}
VideoEncoderBuilder is the interface that wraps basic operations that are necessary to build the video encoder.
This interface is for codec implementors to provide codec specific params, but still giving generality for the users.
Directories
¶
| Path | Synopsis |
|---|---|
|
ffmpeg
module
|
|
|
Package vaapi implements hardware accelerated codecs.
|
Package vaapi implements hardware accelerated codecs. |
|
Package vpx implements VP8 and VP9 encoder.
|
Package vpx implements VP8 and VP9 encoder. |
|
Package x264 implements H264 encoder.
|
Package x264 implements H264 encoder. |
Click to show internal directories.
Click to hide internal directories.