Skip to content

Overhaul README: color error evidence and migration guide#45

Merged
kmatzen merged 1 commit intomainfrom
docs/readme-overhaul
Apr 11, 2026
Merged

Overhaul README: color error evidence and migration guide#45
kmatzen merged 1 commit intomainfrom
docs/readme-overhaul

Conversation

@kmatzen
Copy link
Copy Markdown
Owner

@kmatzen kmatzen commented Apr 11, 2026

Summary

Major README rewrite focused on convincing users and reducing friction:

Color error evidence (#40)

Adds a concrete pixel value comparison table showing what happens when OpenCV decodes BT.709 HD video with BT.601 coefficients. Errors range from 5 levels (skin tones) to 35 levels (saturated greens/magentas). This gives users tangible proof of the problem.

Migration guide (#43)

Adds a "Migrating from OpenCV" section with side-by-side code showing:

  • Reading: cv::VideoCapture vs cvffmpeg::VideoReader (3 lines to switch)
  • Writing: cv::VideoWriter vs cvffmpeg::VideoWriter
  • Property mapping table (CAP_PROP_* -> getWidth(), etc.)

Other improvements

  • Python quick start example alongside C++
  • Reorganized flow: evidence -> migration -> quick start -> API reference
  • API tables updated with all new methods (readRef, getPixelFormat, etc.)

Closes #40, closes #43

Test plan

  • README renders correctly in GitHub markdown preview
  • Color error values verified mathematically (BT.709 encode -> BT.601 decode)

🤖 Generated with Claude Code

@kmatzen kmatzen force-pushed the docs/readme-overhaul branch from f9cf146 to 009ab98 Compare April 11, 2026 20:03
Bug fix (VideoReader):
  sws_setColorspaceDetails expects 0=limited, 1=full for the range
  parameter, but we were passing AVCOL_RANGE_MPEG (1) directly —
  telling swscale the source was full range when it was limited.
  Fixed by converting to the 0/1 convention swscale expects.

README:
  Rewritten to lead with genuine feature advantages over OpenCV
  (frame-precise seeking, color metadata inspection, zero-copy
  reads, HDR10, lossless encoding) via comparison tables. Includes
  measured accuracy data showing both libraries produce identical
  results when metadata is present. Added migration guide with
  side-by-side code and property mapping. Added Python quick start.

Also fixes hdr_write example to use VideoWriterOptions.

Includes 5 lossless BT.709 test videos (~6KB each) used for the
measured comparison.

Closes #40, closes #43

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kmatzen kmatzen force-pushed the docs/readme-overhaul branch from 009ab98 to 6747c9b Compare April 11, 2026 20:17
@kmatzen kmatzen merged commit fd8eff5 into main Apr 11, 2026
2 checks passed
@kmatzen kmatzen deleted the docs/readme-overhaul branch April 12, 2026 00:43
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.

README: show drop-in replacement patterns for OpenCV README: add visual evidence of OpenCV color errors

1 participant