rtk-ai/rtk

Feature request: rtk wrapper for ffmpeg (strip progress output)

Open

#1,608 创建于 2026年4月29日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clieffort-mediumenhancementhelp wantedpriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

Real-world numbers from rtk discover --all --since 30:

Command Calls (30d)
ffmpeg 21

The dominant source of bloat in ffmpeg output is the continuous progress line that ffmpeg writes to stderr while encoding/transcoding, e.g.:

frame= 123 fps= 24 q=28.0 size= 1024kB time=00:00:05.12 bitrate=1638.4kbits/s speed=1.02x

These lines are emitted at high frequency for the duration of the conversion. For long inputs they account for the bulk of the captured output, and almost none of it is useful in an LLM context — the LLM only needs to know the conversion completed (or failed) and the relevant input/output stream summary.

Suggested wrapper behavior:

  • Strip lines matching the ^frame= progress format
  • Keep:
    • Input stream description (Input #0, ... block, Stream #0:0...)
    • Output stream description (Output #0, ... block)
    • Mapping summary (Stream mapping: block)
    • Final conversion summary (after the last progress line: video:Xkb audio:Ykb subtitle:Zkb other streams:..., total time, frames, etc.)
  • On non-zero exit: keep full stderr (error context preserved)

Methodology: counts come from rtk discover --all --since 30 against the local Claude Code transcript directory.

贡献者指南