Documentation
¶
Index ¶
- Variables
- func ConcatFile(files []string, localPath string) error
- type Audio
- type Clip
- type ConcatParams
- type ConvertContainerParams
- type Delogo
- type ExtractAudioParams
- type Filters
- type HLS
- type KV
- type Logo
- type MergeParams
- type Option
- type Point
- type Rectangle
- type SVGAnnotation
- type SVGMarkParams
- type Snapshot
- type SnapshotParams
- type SnapshotSpec
- type SpriteParams
- type SubTranscodeParams
- type Transcode
- func (tc *Transcode) Concat(ctx context.Context, params *ConcatParams) error
- func (tc *Transcode) ConvertContainer(ctx context.Context, params *ConvertContainerParams) error
- func (tc *Transcode) ExtractAudio(ctx context.Context, params *ExtractAudioParams) error
- func (tc *Transcode) MergeByFrames(ctx context.Context, params *MergeParams) error
- func (tc *Transcode) SimpleHLS(ctx context.Context, params *TranscodeSimpleHLSParams) error
- func (tc *Transcode) SimpleJPEG(ctx context.Context, params *TranscodeParams) error
- func (tc *Transcode) SimpleMP3(ctx context.Context, params *TranscodeParams) error
- func (tc *Transcode) SimpleMP4(ctx context.Context, params *TranscodeParams) error
- func (tc *Transcode) SimpleTS(ctx context.Context, params *TranscodeSimpleTSParams) error
- type TranscodeParams
- type TranscodeSimpleHLSParams
- type TranscodeSimpleTSParams
- type TranscodeSpec
- func (*TranscodeSpec) ConcatSatified(params *ConcatParams) error
- func (*TranscodeSpec) ConvertContainerSatified(params *ConvertContainerParams) error
- func (*TranscodeSpec) ExtractAudioSatified(params *ExtractAudioParams) error
- func (*TranscodeSpec) MergeByFramesSatified(params *MergeParams) error
- func (*TranscodeSpec) SimpleHLSSatified(params *TranscodeSimpleHLSParams) error
- func (*TranscodeSpec) SimpleJPEGSatified(params *TranscodeParams) error
- func (*TranscodeSpec) SimpleMP3Satified(params *TranscodeParams) error
- func (*TranscodeSpec) SimpleMP4Satified(params *TranscodeParams) error
- func (*TranscodeSpec) SimpleTSSatified(params *TranscodeSimpleTSParams) error
- type Transcoder
- type Video
- type VideoFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParamsInvalid = errors.New("params is invalid") ErrParamsInvalid2 = errors.New("interval required when frame_type is 1(normal frame)") )
Functions ¶
func ConcatFile ¶ added in v0.8.5
Types ¶
type ConcatParams ¶ added in v0.7.0
type ConvertContainerParams ¶ added in v0.3.0
type ExtractAudioParams ¶ added in v0.5.0
type Filters ¶
type Filters struct { Container string `json:"container,omitempty"` Metadata []*KV `json:"metadata,omitempty"` Video *Video `json:"video,omitempty"` Audio *Audio `json:"audio,omitempty"` Logo []*Logo `json:"logo,omitempty"` Delogo []*Delogo `json:"delogo,omitempty"` Clip *Clip `json:"clip,omitempty"` HLS *HLS `json:"hls,omitempty"` }
type HLS ¶
type HLS struct { HLSSegmentType string `json:"hls_segment_type,omitempty"` HLSFlags string `json:"hls_flags,omitempty"` HLSPlaylistType string `json:"hls_playlist_type,omitempty"` HLSTime int32 `json:"hls_time,omitempty"` MasterPlName string `json:"master_pl_name,omitempty"` HLSSegmentFilename string `json:"hls_segment_filename,omitempty"` }
type Logo ¶
type MergeParams ¶ added in v0.5.0
type Rectangle ¶
type Rectangle struct { X float32 `json:"x,omitempty"` Y float32 `json:"y,omitempty"` W float32 `json:"w,omitempty"` H float32 `json:"h,omitempty"` }
矩形框
type SVGAnnotation ¶ added in v0.3.3
type SVGAnnotation struct { Type string `json:"type,omitempty"` Stroke string `json:"color,omitempty"` Text string `json:"text,omitempty"` Points []*Point `json:"points,omitempty"` FromPoint *Point `json:"from_point,omitempty"` ToPoint *Point `json:"to_point,omitempty"` StrokeWidth int32 `json:"stroke_width,omitempty"` FontSize int32 `json:"font_size,omitempty"` }
type SVGMarkParams ¶ added in v0.3.3
type SVGMarkParams struct { Infile string Outfile string StartTime float32 `json:"start_time,omitempty"` Annotations []*SVGAnnotation `json:"annotation,omitempty"` }
type Snapshot ¶ added in v0.3.0
type Snapshot struct {
// contains filtered or unexported fields
}
func NewSnapshot ¶ added in v0.3.0
func (*Snapshot) SVGMark ¶ added in v0.3.3
func (ss *Snapshot) SVGMark(ctx context.Context, params *SVGMarkParams) error
type SnapshotParams ¶ added in v0.3.0
type SnapshotSpec ¶ added in v0.3.0
type SnapshotSpec struct{}
func NewSnapshotSpec ¶ added in v0.3.0
func NewSnapshotSpec() *SnapshotSpec
func (*SnapshotSpec) CheckSatified ¶ added in v0.3.0
func (*SnapshotSpec) CheckSatified(params *SnapshotParams) error
type SpriteParams ¶ added in v0.3.3
type SubTranscodeParams ¶
type Transcode ¶
type Transcode struct {
// contains filtered or unexported fields
}
func NewTranscode ¶
func (*Transcode) Concat ¶ added in v0.7.0
func (tc *Transcode) Concat(ctx context.Context, params *ConcatParams) error
多个视频合并成一个
func (*Transcode) ConvertContainer ¶ added in v0.3.0
func (tc *Transcode) ConvertContainer(ctx context.Context, params *ConvertContainerParams) error
func (*Transcode) ExtractAudio ¶ added in v0.5.0
func (tc *Transcode) ExtractAudio(ctx context.Context, params *ExtractAudioParams) error
ffmpeg -i in.mp4 -vn -c:a copy out.aac
func (*Transcode) MergeByFrames ¶ added in v0.5.0
func (tc *Transcode) MergeByFrames(ctx context.Context, params *MergeParams) error
ffmpeg -i in.mp4 -vn -c:a copy out.aac
func (*Transcode) SimpleHLS ¶ added in v0.4.0
func (tc *Transcode) SimpleHLS(ctx context.Context, params *TranscodeSimpleHLSParams) error
转hls
func (*Transcode) SimpleJPEG ¶ added in v0.3.8
func (tc *Transcode) SimpleJPEG(ctx context.Context, params *TranscodeParams) error
func (*Transcode) SimpleMP3 ¶ added in v0.3.8
func (tc *Transcode) SimpleMP3(ctx context.Context, params *TranscodeParams) error
type TranscodeParams ¶
type TranscodeParams struct { Infile string Subs []*SubTranscodeParams }
type TranscodeSimpleHLSParams ¶ added in v0.4.1
type TranscodeSimpleTSParams ¶ added in v0.4.2
type TranscodeSpec ¶
type TranscodeSpec struct{}
func NewTranscodeSpec ¶
func NewTranscodeSpec() *TranscodeSpec
func (*TranscodeSpec) ConcatSatified ¶ added in v0.7.0
func (*TranscodeSpec) ConcatSatified(params *ConcatParams) error
func (*TranscodeSpec) ConvertContainerSatified ¶ added in v0.3.0
func (*TranscodeSpec) ConvertContainerSatified(params *ConvertContainerParams) error
func (*TranscodeSpec) ExtractAudioSatified ¶ added in v0.5.0
func (*TranscodeSpec) ExtractAudioSatified(params *ExtractAudioParams) error
func (*TranscodeSpec) MergeByFramesSatified ¶ added in v0.5.0
func (*TranscodeSpec) MergeByFramesSatified(params *MergeParams) error
func (*TranscodeSpec) SimpleHLSSatified ¶ added in v0.4.0
func (*TranscodeSpec) SimpleHLSSatified(params *TranscodeSimpleHLSParams) error
func (*TranscodeSpec) SimpleJPEGSatified ¶ added in v0.3.8
func (*TranscodeSpec) SimpleJPEGSatified(params *TranscodeParams) error
func (*TranscodeSpec) SimpleMP3Satified ¶ added in v0.3.8
func (*TranscodeSpec) SimpleMP3Satified(params *TranscodeParams) error
func (*TranscodeSpec) SimpleMP4Satified ¶ added in v0.3.0
func (*TranscodeSpec) SimpleMP4Satified(params *TranscodeParams) error
func (*TranscodeSpec) SimpleTSSatified ¶ added in v0.4.2
func (*TranscodeSpec) SimpleTSSatified(params *TranscodeSimpleTSParams) error
type Transcoder ¶
type Transcoder interface {
Transcode(context.Context, *TranscodeParams) error
}
type Video ¶
type Video struct { Codec string `json:"codec,omitempty"` Width int32 `json:"width,omitempty"` Height int32 `json:"height,omitempty"` Short int32 `json:"short,omitempty"` FPS string `json:"fps,omitempty"` Crf int32 `json:"crf,omitempty"` WZQuality float32 `json:"wz_quality,omitempty"` Bitrate int32 `json:"bitrate,omitempty"` GOP int32 `json:"gop,omitempty"` PTS string `json:"pts,omitempty"` APTS string `json:"apts,omitempty"` PixFmt string `json:"pix_fmt,omitempty"` }
type VideoFilter ¶
type VideoFilter interface{}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.