progress

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package progress parses ffmpeg's `-progress` output — the machine-readable key=value blocks ffmpeg emits (one `key=value` per line, a block terminated by `progress=continue|end`) when run with `-progress pipe:N`. keryx taps it to turn a render into a live percentage against the reel's known total duration (spec 0026). The format is ffmpeg's, so the same parser serves any backend that can stream that stderr (the native ffmpeg backend today; afmpeg once it can stream).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutTimeSec

func OutTimeSec(line string) (sec float64, ok bool)

OutTimeSec parses an `out_time_us=<microseconds>` progress line into seconds of output produced so far. ok is false for any other line, or when ffmpeg emits a placeholder (e.g. `out_time_us=N/A`) during startup.

func Percent

func Percent(outTimeSec, totalSec float64) float64

Percent maps output-seconds-so-far against a total to a 0..100 percentage, clamped (a total of 0 or a run past the estimate can't produce a sane ratio).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL