Documentation
¶
Overview ¶
Package ffmpeg provides wrappers for FFmpeg and FFprobe operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FFProbeFormat ¶
type FFProbeFormat struct {
Tags map[string]string `json:"tags"`
Duration string `json:"duration"`
BitRate string `json:"bit_rate"`
NbStreams int `json:"nb_streams"`
}
FFProbeFormat represents the format section of ffprobe output
type FFProbeResult ¶
type FFProbeResult struct {
VideoStreams []FFProbeStream `json:"-"`
AudioStreams []FFProbeStream `json:"-"`
SubtitleStreams []FFProbeStream `json:"-"`
AlbumArtStreams []FFProbeStream `json:"-"`
Streams []FFProbeStream `json:"streams"`
Path string `json:"-"`
Format FFProbeFormat `json:"format"`
Duration float64 `json:"-"`
}
FFProbeResult represents ffprobe JSON output
func ProbeMedia ¶
func ProbeMedia(path string) (*FFProbeResult, error)
ProbeMedia probes a media file and returns metadata
type FFProbeStream ¶
type FFProbeStream struct {
Tags map[string]string `json:"tags"`
Disposition map[string]int `json:"disposition"`
CodecType string `json:"codec_type"`
CodecName string `json:"codec_name"`
Duration string `json:"duration"`
NbFrames string `json:"nb_frames"`
RFrameRate string `json:"r_frame_rate"`
BitRate string `json:"bit_rate"`
SampleRate string `json:"sample_rate"`
Index int `json:"index"`
Width int `json:"width"`
Height int `json:"height"`
Channels int `json:"channels"`
}
FFProbeStream represents a stream in ffprobe output
type FFmpegProcessor ¶
type FFmpegProcessor struct {
// contains filtered or unexported fields
}
FFmpegProcessor handles all FFmpeg-related operations
func NewFFmpegProcessor ¶
func NewFFmpegProcessor(cfg *models.ProcessorConfig) *FFmpegProcessor
NewFFmpegProcessor creates a new FFmpeg processor
func (*FFmpegProcessor) Process ¶
func (p *FFmpegProcessor) Process(ctx context.Context, m *models.ShrinkMedia, cfg *models.ProcessorConfig, registry models.ProcessorRegistry) models.ProcessResult
Process executes FFmpeg transcoding for audio/video files
Click to show internal directories.
Click to hide internal directories.