Repository navigation
feat(media): store a media file's pixel size, size and MD5 in the project (rc15, 869fat84r) - #13
Merged
Merged
Conversation
Media gains optional pixel_width / pixel_height / file_size, appended to MediaType after regions, so the engine stops running ffprobe on the arm path. Covers the setters, the writer (schema order whatever the dict order, no empty element for None) and the parse path, which never calls the setters.
…t (869fat84r) MediaType gains three optional elements after regions: pixel_width and pixel_height (the original size of the file's first video stream, as ffprobe reports it) and file_size (bytes, when they were measured). The editor measures them at upload, as it does the duration, so the node engine no longer runs ffprobe while arming a video cue under the command lock: a GO sent right after a cue selection started up to 400 ms late on that probe. - script.xsd: xs:positiveInteger, minOccurs=0; absent means unknown. - Media: pixel_width / pixel_height / file_size properties. A positive int or a string of digits is stored as int; None removes the key; anything else raises ValueError. - MediaXmlBuilder writes Media in schema order whatever the dict order (the editor appends the values after what the frontend sent, and the parsers keep arrival order) and writes no element for a None dimension (an empty <pixel_width/> fails the schema). Older utils lines reject a project carrying these elements; they are made to accept it by replacing only script.xsd (their parsers keep unknown Media keys as plain ints and their code never reads them). Design: cuems-RELATIONS Plans/2026-10-01-engine-late-go-media-probe.md
…4r D18) (red) The file's MD5 identifies it unambiguously, for integrity checks: a corrupt or partial copy can have the right size. It is the MD5 the upload already carries. file_size and file_md5 apply to every media type; the pixel size stays VideoCue-only. An MD5 shaped like a number (all digits, or digits with one 'e') must survive the parser, which coerces such strings to int/float.
…at84r D18) - script.xsd: optional file_md5 (Md5Type, 32 lowercase hex) after file_size; the comment states that file_size and file_md5 apply to every media type. - Media.file_md5: any case in, lowercase stored; None removes it; anything that is not 32 hex digits raises ValueError. - MediaXmlBuilder: file_md5 in the schema order, no element for None. - Parsers.STRING_TYPED_KEYS gains file_md5: str_to_value turned an all-digit MD5 into an int and digits-with-one-e into a float (about one MD5 in a million), which would then fail the schema on the next save. Design: cuems-RELATIONS Plans/2026-10-01-engine-late-go-media-probe.md D18
Ships the stored media metadata (869fat84r): pixel_width / pixel_height (VideoCues) and file_size / file_md5 (every media type) in MediaType; and, from main, 9c17418: the engine-native fade curve names ease_in / ease_out. All are additive schema changes. Refs ClickUp 869fat84r
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch was successfully deployed
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.
Why
A GO sent right after a cue selection could start up to 400 ms late (ClickUp 869fat84r): the node engine ran
ffprobefor a video file's width and height when it armed the cue, while holding its command lock. The editor already stores each media file's duration in the project; it now stores the pixel size, the file size and the MD5 the same way, and the engine reads them instead of probing (cuems-engine PR #22).What
script.xsdMediaType: four optional elements afterregions:pixel_width,pixel_height,file_size(xs:positiveInteger) andfile_md5(Md5Type, 32 lowercase hex digits).Mediaaccessors for them.Mediain schema order and never writes an empty element.file_md5a string: an all-digit MD5 used to be coerced to an int.0.1.0rc15.Compatibility
pre_release_1are built and proven against real projects (cuems-RELATIONS/baselines/869fat84r-xsd-patch).cuemsutilsfrom PyPI.Tests
tests/unit/test_media_pixel_dimensions.py.Design and results:
cuems-RELATIONS/Plans/2026-10-01-engine-late-go-media-probe.md. Related: cuems-editorfeat/869fat84r-media-dimensions, cuems-engine #22, cuems-frontendfeat/869fat84r-media-check.