add: live encode progress tracking and read-only status web UI
Stream ffmpeg -progress during the video encode into an in-memory tracker (internal/status) so the long-running step is no longer a black box: percent, fps, speed, and ETA are derived from the source duration and updated ~1/s. Progress prints to stdout only (no logs.db row) to avoid burying real events. Expose it over HTTP (internal/server, default :8080, set http_addr to "" to disable): GET /status returns the live snapshot, the pending input queue, and recent non-debug events; GET / serves an embedded dashboard that polls /status every second. The server shuts down on the same SIGINT/SIGTERM context as the watcher.
This commit is contained in:
+5
-2
@@ -34,8 +34,11 @@ type Metadata struct {
|
||||
type Config struct {
|
||||
OMDBAPIKey string `yaml:"omdb_api_key"`
|
||||
LogRetentionDays int `yaml:"log_retention_days"`
|
||||
Encoding EncodingConfig
|
||||
Paths PathsConfig
|
||||
// HTTPAddr is the status server listen address. Absent (nil) defaults to
|
||||
// ":8080"; an explicit empty string disables the server.
|
||||
HTTPAddr *string `yaml:"http_addr"`
|
||||
Encoding EncodingConfig
|
||||
Paths PathsConfig
|
||||
}
|
||||
|
||||
type EncodingConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user