-
Notifications
You must be signed in to change notification settings - Fork 309
Add ImageSequenceReference schema to OpenTimelineIO #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added ImageSequenceReference MediaReference subclass schema.
* * Added initial support for `ImageSequenceReference` * * Added sample otio file with `ImageSequenceReference` * Added test for creating an rv session file with the sample file above * * Use the `frame_zero_padding` from the `ImageSequenceReference` in stead of `start_frame` for frame substitution base * * renamed _in and _out variables * * lint fix
* * create and delete temp file and file descriptors through `setUp()` and `tearDown()` methods to prevent fd leak * * Close tmp file descriptor in `setUp()` to avoid trouble in Windows * Removed redundant assertions as suggested in PR comments
* Added support for ImageSequenceReference to the example OTIO RV reader plugin * Removed debug print * Switched to using opentime.to_frames to compute rv's in and out frames Co-authored-by: Robyn Rindge <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #722 +/- ##
==========================================
+ Coverage 81.88% 83.21% +1.33%
==========================================
Files 72 74 +2
Lines 2755 2884 +129
==========================================
+ Hits 2256 2400 +144
+ Misses 499 484 -15
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can the documentation be passed through the pybind code so that it shows up in the serialized help documentation (and just in help()
in python?)
Thanks!
*documentation*: | ||
|
||
``` | ||
None | ||
``` | ||
|
||
parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get some of the documentation to flow through the python bindings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added docstrings in the bindings. I'd love to have someone give feedback on wether or not it all makes sense. The bulk of the content is forklifted from this PR.
I think the build failure is a transient error, the python3.6 build just needs to be re-run. |
This resolves #69
The image sequence is expressed with:
target_url_base
- everything leading up to the file name in thetarget_url
name_prefix
- everything in the file name leading up to the frame numbername_suffix
- everything after the frame number in the file namestart_frame
- first frame number used in file namesframe_step
- step between frame numbers in file names (every other frame is a step of 2)rate
- double frame rate if every frame in the sequence were played back (ignoring skip frames)frame_zero_padding
- Number of digits to pad zeros out to (e.x. frame 10 with a pad of 4 would be0010
)missing_frame_policy
- enumImageSequenceReference.MissingFramePolicy
{error
,hold
,black
} allows hinting about how a consuming app should behave if an image for which a url is returned should be handled when missing from diskAn example for 24fps media with a sample provided each frame numbered 1-1000 with a path
/show/sequence/shot/sample_image_sequence.%04d.exr
might be:The same duration sequence but with only every 2nd frame available in the sequence would be:
A target url is generated using the equivalent of the following python format string:
f"{target_url_prefix}{(start_frame + (sample_number * frame_step)):0{value_zero_padding}}{target_url_postfix}"
Negative
start_frame
is also handled. The above example with astart_frame
of-1
would yield the first three target urls as:file:///show/sequence/shot/sample_image_sequence.-0001.exr
file:///show/sequence/shot/sample_image_sequence.-0000.exr
file:///show/sequence/shot/sample_image_sequence.0001.exr
Benefits of this approach include:
Downsides:
References:
Related PRs:
ImageSequenceReference
proposalimagesequence
branch, C++ implementation and discussionImageSequenceReference
in RVCo-authored by: @apetrynet