Skip to content

feat: readable rb ffprobe output#110

Merged
a-essawy merged 1 commit into
mainfrom
feat/ffprobe-output
Jul 19, 2026
Merged

feat: readable rb ffprobe output#110
a-essawy merged 1 commit into
mainfrom
feat/ffprobe-output

Conversation

@a-essawy

Copy link
Copy Markdown
Contributor

Summary

rb ffprobe currently prints a single terse line on success (e.g. Video mp4 0:05 1280x720 24fps), dropping almost every useful field the probe actually returns. This replaces it with a clean, multi-line summary block.

  • New formatSummaryBlock() renders a header line (kind, container, duration, size) plus a labeled row per stream kind (Video/Audio/Image), adapting to what the media actually has:
    • video: codec/profile, resolution + aspect ratio, fps (flags VFR), bit depth + pixel format, bitrate, HDR flag, rotation, language
    • audio: codec/profile, channel layout (or raw count), sample rate, bitrate, language
    • image: dimensions, bit depth + pixel format
    • other: stream counts (skipping zero counts)
    • only present fields are rendered; nothing prints as undefined
  • New resolveOutputText() handles the two shapes output.data can take: a parsed summary renders the block above; a summary-less response (raw -print_format csv/xml/-of default) prints output.data.stdout verbatim instead, since that's exactly what the user asked ffprobe for.
  • --json still prints the full output.data, and the trailing dashboard job URL line is unchanged.
  • Expanded the ProbeSummary/ProbeData local types to match the fuller documented output.data contract (profile, displayAspectRatio, bitDepth, channelLayout, sampleRate, isHdr, rotation, language, etc.) instead of the minimal subset the old one-liner used.

Test plan

  • pnpm typecheck clean
  • pnpm test — 174 pass, 0 fail
  • New tests cover: video summary (codec+resolution+fps present), audio-only summary (audio row present, no Video row), raw-stdout response (prints stdout verbatim, no summary block rendered)

@a-essawy
a-essawy enabled auto-merge (squash) July 19, 2026 05:11
@a-essawy
a-essawy merged commit 40e147d into main Jul 19, 2026
2 checks passed
@a-essawy a-essawy mentioned this pull request Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant