Skip to content

feat(media): add ffprobe inspection - #1

Merged
TristinWen merged 1 commit into
mainfrom
agent/m2-media-inspection
Aug 9, 2026
Merged

feat(media): add ffprobe inspection#1
TristinWen merged 1 commit into
mainfrom
agent/m2-media-inspection

Conversation

@TristinWen

Copy link
Copy Markdown
Contributor

Summary

  • add safe, timeout-bounded ffprobe execution without shell interpolation
  • parse container, exact duration, video/audio/subtitle streams, codecs, bitrate, frame rate, time base, rotation, color, audio layout, language, and creation metadata
  • expose semanticvideo inspect with pretty/compact JSON, output files, executable selection, and timeout controls
  • add fixture-driven parser tests, a real synthetic-video CLI integration test, user documentation, and ADR 0006

Motivation

Milestone 2 turns the schema foundation into the first real-video capability. Applications can now obtain validated, reusable technical metadata without an AI provider while keeping subprocess execution separate from deterministic JSON parsing.

Compatibility

  • adds optional bitrate fields to media and video/audio stream schemas
  • widens rotation_degrees from four right-angle literals to any normalized display-matrix angle
  • retains schema version 0.1.0 because existing manifests remain valid
  • does not add shot detection or semantic scene understanding

Validation

  • ruff check .
  • ruff format --check .
  • mypy src tests in strict mode
  • 57 tests passed with 96.48% coverage
  • real FFmpeg 8.1 integration generated a 0.4-second MP4 and validated both inspect_media and semanticvideo inspect --compact
  • wheel and source distribution built successfully

- execute ffprobe without a shell and map missing, timeout, process, and parse failures
- parse exact duration, container and stream codecs, bitrate, frame rate, rotation, color, audio, and creation metadata
- expose scriptable semanticvideo inspect JSON output with timeout and executable controls
- document the inspection boundary and update the generated JSON Schema and roadmap
- validate fixture variants and the real CLI with a synthetic FFmpeg video across 57 tests
@TristinWen
TristinWen marked this pull request as ready for review August 9, 2026 12:31
@TristinWen
TristinWen merged commit c35fb74 into main Aug 9, 2026
1 check passed
@TristinWen
TristinWen deleted the agent/m2-media-inspection branch August 9, 2026 12:32
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