Documentation
¶
Overview ¶
Package progress reports ffmpeg encode completion from stderr.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func From ¶
From returns the progress callback stored on ctx, if any.
Parameters:
- ctx: Context that may carry a WithProgress callback.
Returns:
- fn: The callback, or nil when none is stored.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer parses ffmpeg stderr and reports percent complete.
func NewWriter ¶
NewWriter returns a stderr writer that reports encode progress.
Parameters:
- duration: Clip duration in seconds used to compute percent.
- on: Optional callback invoked with 0-99 percent complete.
Returns:
- writer: A writer that implements io.Writer and parses ffmpeg time= lines.
func (*Writer) Len ¶
Len returns the number of captured stderr bytes.
Returns:
- n: The captured buffer length.
Click to show internal directories.
Click to hide internal directories.