Overhaul README: color error evidence and migration guide#45
Merged
Conversation
f9cf146 to
009ab98
Compare
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>
009ab98 to
6747c9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
cv::VideoCapturevscvffmpeg::VideoReader(3 lines to switch)cv::VideoWritervscvffmpeg::VideoWriterCAP_PROP_*->getWidth(), etc.)Other improvements
Closes #40, closes #43
Test plan
🤖 Generated with Claude Code