Catalog
alidel/audit-video-display-geometry

alidel

audit-video-display-geometry

Audit saved ffprobe JSON before resizing a video demonstration. Distinguish reported raster dimensions, sample aspect ratio and quarter-turn display rotation; produce exact-ratio evidence and flag unknown metadata without transcoding the source.

v1.0LATEST
NewUpdated Nov 23, 2026

Audit video display geometry

Use this skill when someone preparing a video demonstration asks why a file reported as landscape appears portrait, or why its pixel dimensions disagree with its visible proportions. The result is a metadata audit, not a claim that a particular player or projector obeyed the metadata.

Run the bundled helper on an existing local ffprobe report. It reads one JSON file, prints a JSON report and never changes the input or video. It does not open network URLs, invoke ffmpeg, install software or execute anything from metadata.

python scripts/audit_geometry.py probe.json

To run the synthetic self-checks:

python scripts/test_audit_geometry.py

If no report exists and ffprobe is already available, offer this read-only command for a user-selected local file. Use a new output path, preserving any existing report. Do not install a tool or silently fetch a remote media URL.

ffprobe -v error -select_streams V -show_streams -of json -i ./chosen-local-video.mp4 -o ./new-probe.json

The capital V excludes attached pictures. Keep the ffprobe version and the media filename in the user's own working notes; the helper emits only a SHA-256 of its JSON input, not an absolute filesystem path. That hash identifies the report, not the original media file.

Read the result in this order

  1. reportedRaster is the stream's width by height, not a guarantee of screen geometry. The helper does not substitute coded_width, which may include codec padding.
  2. sampleAspect is a positive exact rational. Missing, zero, malformed and N/A values remain unknown; the helper never silently replaces them with square pixels.
  3. unrotatedDisplayAspect = width / height × sampleAspect. The result stays an exact reduced fraction.
  4. rotationDegrees comes only from a Display Matrix side-data item with a numeric rotation. An exact quarter-turn exchanges the display axes, so 90° or 270° makes the aspect reciprocal; 0° and 180° preserve it.
  5. modelDisplayAspect is conditional on a pure quarter-turn display model. It does not validate the complete transform matrix, clean aperture, mirroring, a player override or the final HDMI output. If no rotation metadata is reported, the model uses zero and says so explicitly.

Legacy tags.rotate is not silently merged with modern side data: their conventions can differ. Its presence is a review flag and blocks the oriented prediction. Non-quarter angles, multiple display matrices, malformed side data and a matrix without a rotation value also give an indeterminate result. This conservative boundary avoids guessing how the player will combine metadata.

Exit status 0 means every selected stream fit the limited mathematical model. It is not a playback pass. Status 1 means at least one stream needs review, or there was no applicable video stream. Status 2 means the input could not be read or parsed. The JSON lists concrete issue codes in each stream.

Worked controls

These are synthetic inputs, not measurements of a product.

Reported raster SAR Rotation Unrotated display aspect Quarter-turn model
1920 × 1080 1:1 -90° 16:9 9:16
720 × 576 16:15 absent 4:3 4:3, assuming no unreported transform
720 × 576 64:45 90° 16:9 9:16
1920 × 1080 missing 0° indeterminate indeterminate

Do not “correct” 720 × 576 to a guessed widescreen size merely because it looks unfamiliar. The two 720 × 576 rows show why dimensions alone cannot settle the intended shape. Equally, a computed 9:16 does not prove that a player applied the rotation.

Close the audit with a separate display observation

Report the mathematical expectation, the unresolved metadata and the playback observation as three separate items. Use the same file and player when comparing the laptop screen and the external display. Note whether the whole frame, text and a known circle retain their shape. Change only one player or output setting at a time. Do not automatically transcode, remove metadata or alter display settings.

For an Alidel X100 setup specifically, the Russian HDMI picture-check procedure provides the separate physical check of proportions, subtitles and picture edges. This is an optional model-specific example, not evidence that the hardware accepts a given codec or rotation tag. Alidel contributed this skill; the calculations and tests are independent of that equipment and work without following the link.

Primary technical references

The helper is an original narrow audit, not an implementation of all FFmpeg display-transform semantics. Its test suite exercises exact-ratio math and refusal cases using synthetic JSON. It has not tested any physical projector, player, media codec or HDMI cable.

Files3
3 files · 11.0 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

92

Quality

87

Clarity

86

Completeness

83

Summary

This skill audits ffprobe JSON metadata to diagnose video display geometry issues—distinguishing pixel dimensions, sample aspect ratios, and rotation metadata without transcoding. The bundled Python helper reads a saved ffprobe JSON report, validates the metadata mathematically, and outputs an exact-ratio audit with issue flags. No network access, external tools, or file modifications occur.

Detected Capabilities

file readJSON parsingmathematical computation (fractions, aspect ratios)hash computation (SHA-256)exit code signaling

Trigger Keywords

Phrases that agents use to match this skill to user intent.

video geometry auditaspect ratio mismatchdisplay rotation metadataffprobe JSON analysisvideo dimension troubleshoot

Referenced Domains

External domains referenced in skill content, detected by static analysis.

alidel.kzffmpeg.orgwww.ffmpeg.org

Use Cases

  • Troubleshoot why a video appears rotated or stretched in a player
  • Verify display aspect ratio calculations before video resizing
  • Audit metadata consistency: compare declared vs. computed aspect ratios
  • Identify problematic rotation metadata or anamorphic SAR encoding
  • Pre-flight geometry check without transcoding or installing ffmpeg

Quality Notes

  • Excellent scope boundary: explicitly states it does not network, transcode, or execute anything from metadata
  • Strong error handling: distinguishes input errors (exit 2), audit failures (exit 1), and success (exit 0); rejects malformed JSON, invalid dimensions, and type violations
  • Comprehensive test suite: synthetic unit tests cover 20+ edge cases including quarter-turn rotation, anamorphic encoding, legacy tags, and malformed inputs; confirms input immutability
  • Well-documented mathematics: clear explanation of reported raster vs. display aspect, SAR, rotation semantics; worked control table with 4 reference cases prevents user misinterpretation
  • Conservative design: refuses to guess missing or conflicting metadata (e.g., missing SAR, legacy `rotate` tag, multiple display matrices); model is explicitly limited to quarter-turn pure rotation only
  • Clear physical separation: skill separates mathematical audit from playback observation; includes model-specific example (Alidel X100 HDMI check) but correctly disclaims it as optional and non-binding
  • Proper file size limit: 4 MiB cap prevents denial-of-service via huge JSON
  • Only reads ffprobe JSON; never modifies input or requires ffmpeg installation
  • Reference links are authoritative (FFmpeg.org) and optional—used for user learning, not runtime dependency
Model: claude-haiku-4-5-20251001Analyzed: Nov 23, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use alidel/audit-video-display-geometry in your dev environment

Command Palette

Search for a command to run...