Documentation
¶
Index ¶
- func DecoderArguments(videoStats ffmpeg.VideoStats) []string
- func Inspect(ctx context.Context, ch <-chan *WorkItem, cfg Configuration, ...)
- func Run(subCtx context.Context, cfg Configuration, queue *Queue, l *slog.Logger) error
- func Scan(ctx context.Context, baseDir string, queue *Queue, ch chan<- *WorkItem, ...) error
- func ScanFS(ctx context.Context, fileSystem fs.FS, baseDir string, queue *Queue, ...) error
- func SupportedProfiles() []string
- func Transcode(ctx context.Context, queue *Queue, cfg Configuration, logger *slog.Logger)
- type Configuration
- type Decoder
- type Log
- type MediaFile
- type Profile
- type Progress
- type Queue
- func (q *Queue) Active() bool
- func (q *Queue) Add(filename string) *WorkItem
- func (q *Queue) All() iter.Seq[*WorkItem]
- func (q *Queue) NextToConvert() *WorkItem
- func (q *Queue) Queue(item *WorkItem)
- func (q *Queue) SetActive(active bool)
- func (q *Queue) Size() int
- func (q *Queue) Stats() map[Status]int
- type Rule
- type SourceRejectedError
- type SourceSkippedError
- type Status
- type WorkItem
- func (w *WorkItem) CompletedFormatted() string
- func (w *WorkItem) RemainingFormatted() string
- func (w *WorkItem) SetWorkStatus(workStatus WorkStatus)
- func (w *WorkItem) SourceVideoStats() ffmpeg.VideoStats
- func (w *WorkItem) TargetVideoStats() ffmpeg.VideoStats
- func (w *WorkItem) WorkStatus() WorkStatus
- type WorkStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecoderArguments ¶
func DecoderArguments(videoStats ffmpeg.VideoStats) []string
func Inspect ¶
func Inspect(ctx context.Context, ch <-chan *WorkItem, cfg Configuration, probe func(string) (ffmpeg.VideoStats, error), f fileChecker, logger *slog.Logger)
func SupportedProfiles ¶
func SupportedProfiles() []string
Types ¶
type Configuration ¶
type Configuration struct {
Log
Input string
ProfileName string
Profile Profile
Active bool
Remove bool
Overwrite bool
}
func GetConfigurationFromViper ¶
func GetConfigurationFromViper(v *viper.Viper, args []string) (cfg Configuration, err error)
type MediaFile ¶
type MediaFile struct {
Path string
VideoStats ffmpeg.VideoStats
}
type Profile ¶
func GetProfile ¶
GetProfile returns the profile associated with name.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) NextToConvert ¶
type Rule ¶
type Rule func(profile *Profile, sourceStats ffmpeg.VideoStats) error
func RejectBitrateTooLow ¶
func RejectBitrateTooLow() Rule
func RejectVideoHeightTooLow ¶
func SkipTargetCodec ¶
func SkipTargetCodec() Rule
type SourceRejectedError ¶
type SourceRejectedError struct {
Reason string
}
func (*SourceRejectedError) Error ¶
func (e *SourceRejectedError) Error() string
func (*SourceRejectedError) Is ¶
func (e *SourceRejectedError) Is(e2 error) bool
type SourceSkippedError ¶
type SourceSkippedError struct {
Reason string
}
func (*SourceSkippedError) Error ¶
func (e *SourceSkippedError) Error() string
func (*SourceSkippedError) Is ¶
func (e *SourceSkippedError) Is(e2 error) bool
type WorkItem ¶
type WorkItem struct {
Source MediaFile
Target MediaFile
Progress Progress
// contains filtered or unexported fields
}
func (*WorkItem) CompletedFormatted ¶
func (*WorkItem) RemainingFormatted ¶
func (*WorkItem) SetWorkStatus ¶
func (w *WorkItem) SetWorkStatus(workStatus WorkStatus)
func (*WorkItem) SourceVideoStats ¶
func (w *WorkItem) SourceVideoStats() ffmpeg.VideoStats
func (*WorkItem) TargetVideoStats ¶
func (w *WorkItem) TargetVideoStats() ffmpeg.VideoStats
func (*WorkItem) WorkStatus ¶
func (w *WorkItem) WorkStatus() WorkStatus
type WorkStatus ¶
Click to show internal directories.
Click to hide internal directories.