Skip to content

feat: parse FFmpeg progress for structured download status #577

Description

@cursor

Problem

StreamDL has no structured download progress data. FFmpeg output goes to logs only, so users cannot see speed, percentage, or ETA without parsing debug output manually.

This blocks a proper TUI (#552) and limits observability for long VOD downloads.

Proposed scope

Parse FFmpeg stderr progress lines during live and VOD downloads and expose structured state internally, e.g.:

  • Channel / download type (live vs vod)
  • Bytes downloaded / duration recorded
  • Speed, percentage (when determinable), ETA

Suggested approach

  • Parse FFmpeg -progress output or stderr time= / speed= / size= lines in download_stream.go
  • Hold active download state in memory (similar pattern to notice buffer / active user tracking)
  • Log at DEBUG by default; reserve INFO for tick summary + notices

Out of scope (follow-ups)

Dependencies / related

Acceptance criteria

  • Active downloads expose parseable progress while FFmpeg is running
  • Unit tests for progress line parsing (sample FFmpeg stderr fixtures)
  • No regression to existing download completion / move / post_script behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions