From 14244e184c932831b4efbecec37d6444087e13a5 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 17 Sep 2024 18:29:59 -0400 Subject: [PATCH 01/28] Fix wrong retimed detection on image sequence clip. --- client/ayon_core/pipeline/editorial.py | 42 ++++++++++++++++---------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 84bffbe1ec..2934e3073b 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -179,6 +179,24 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): media_in = available_range.start_time.value media_out = available_range.end_time_inclusive().value + # Ensure image sequence media_ref source and + # available range are absolute. + media_ref = otio_clip.media_reference + if ( + hasattr(otio.schema, "ImageSequenceReference") and + isinstance(media_ref, otio.schema.ImageSequenceReference) and + media_in != media_ref.start_frame + ): + media_in = media_ref.start_frame + media_out += media_ref.start_frame + source_range_start = otio.opentime.RationalTime( + media_in + source_range.start_time.value, + ) + source_range = otio.opentime.TimeRange( + start_time=source_range_start, + duration=source_range.duration + ) + # modifiers time_scalar = 1. offset_in = 0 @@ -224,38 +242,30 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): offset_in *= time_scalar offset_out *= time_scalar - # filip offset if reversed speed + # flip offset if reversed speed if time_scalar < 0: - _offset_in = offset_out - _offset_out = offset_in - offset_in = _offset_in - offset_out = _offset_out + offset_in, offset_out = offset_out, offset_in # scale handles handle_start *= abs(time_scalar) handle_end *= abs(time_scalar) - # filip handles if reversed speed + # flip handles if reversed speed if time_scalar < 0: - _handle_start = handle_end - _handle_end = handle_start - handle_start = _handle_start - handle_end = _handle_end + handle_start, handle_end = handle_end, handle_start source_in = source_range.start_time.value - media_in_trimmed = ( - media_in + source_in + offset_in) - media_out_trimmed = ( - media_in + source_in + ( + media_in_trimmed = (source_in + offset_in) + media_out_trimmed = ( media_in_trimmed + ( ((source_range.duration.value - 1) * abs( time_scalar)) + offset_out)) # calculate available handles if (media_in_trimmed - media_in) < handle_start: - handle_start = (media_in_trimmed - media_in) + handle_start = max(0, media_in_trimmed - media_in) if (media_out - media_out_trimmed) < handle_end: - handle_end = (media_out - media_out_trimmed) + handle_end = max(0, media_out - media_out_trimmed) # create version data version_data = { From 318ce6b32122afaf65701e505e842550ed769a23 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 17 Sep 2024 18:41:57 -0400 Subject: [PATCH 02/28] Fix lint. --- client/ayon_core/pipeline/editorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 2934e3073b..83035616c6 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -179,7 +179,7 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): media_in = available_range.start_time.value media_out = available_range.end_time_inclusive().value - # Ensure image sequence media_ref source and + # Ensure image sequence media_ref source and # available range are absolute. media_ref = otio_clip.media_reference if ( From ac226a360aa7f75fc89f38676ecda916af8f966d Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Wed, 18 Sep 2024 08:14:59 -0400 Subject: [PATCH 03/28] Apply suggestions from code review Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/editorial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 83035616c6..d69ca8714a 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -256,8 +256,8 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): source_in = source_range.start_time.value - media_in_trimmed = (source_in + offset_in) - media_out_trimmed = ( media_in_trimmed + ( + media_in_trimmed = source_in + offset_in + media_out_trimmed = (media_in_trimmed + ( ((source_range.duration.value - 1) * abs( time_scalar)) + offset_out)) From 0836fb810e70220ac1a1dd38443de6c065d24740 Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Wed, 18 Sep 2024 08:15:13 -0400 Subject: [PATCH 04/28] Apply suggestions from code review Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/editorial.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index d69ca8714a..ad56eb247f 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -183,9 +183,9 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): # available range are absolute. media_ref = otio_clip.media_reference if ( - hasattr(otio.schema, "ImageSequenceReference") and - isinstance(media_ref, otio.schema.ImageSequenceReference) and - media_in != media_ref.start_frame + hasattr(otio.schema, "ImageSequenceReference") + and isinstance(media_ref, otio.schema.ImageSequenceReference) + and media_in != media_ref.start_frame ): media_in = media_ref.start_frame media_out += media_ref.start_frame From efc31f01443bf3b9747d72e77ac2fa3b1c5737d8 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 18 Sep 2024 15:45:45 -0400 Subject: [PATCH 05/28] Consolidate pipeline.editorial.get_media_range_with_retimes --- client/ayon_core/pipeline/editorial.py | 106 ++++++++++++------ .../publish/extract_otio_trimming_video.py | 7 +- 2 files changed, 74 insertions(+), 39 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 83035616c6..bc02ae9b00 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -176,26 +176,36 @@ def _sequence_resize(source, length): def get_media_range_with_retimes(otio_clip, handle_start, handle_end): source_range = otio_clip.source_range available_range = otio_clip.available_range() - media_in = available_range.start_time.value - media_out = available_range.end_time_inclusive().value - # Ensure image sequence media_ref source and - # available range are absolute. - media_ref = otio_clip.media_reference - if ( - hasattr(otio.schema, "ImageSequenceReference") and - isinstance(media_ref, otio.schema.ImageSequenceReference) and - media_in != media_ref.start_frame - ): - media_in = media_ref.start_frame - media_out += media_ref.start_frame - source_range_start = otio.opentime.RationalTime( - media_in + source_range.start_time.value, - ) - source_range = otio.opentime.TimeRange( - start_time=source_range_start, - duration=source_range.duration - ) + source_range_rate = source_range.start_time.rate + available_range_rate = available_range.start_time.rate + + # Conform source range bounds to available range rate + # .e.g. embedded TC of (3600 sec/ 1h), duration 100 frames + # + # available |----------------------------------------| 24fps + # 86400 86500 + # + # + # 90010 90060 + # src |-----|______duration 2s___|----| 25fps + # 90000 + # + # + # 86409.6 86466.8 + # conformed |-------|_____duration _2.38s____|-------| 24fps + # 86400 + # + # Note that 24fps is slower than 25fps hence extended duration + # to preserve media range + + # Compute new source range based on available rate + conformed_src_in = source_range.start_time.rescaled_to(available_range_rate) + conformed_src_duration = source_range.duration.rescaled_to(available_range_rate) + conformed_source_range = otio.opentime.TimeRange( + start_time=conformed_src_in, + duration=conformed_src_duration + ) # modifiers time_scalar = 1. @@ -242,47 +252,75 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): offset_in *= time_scalar offset_out *= time_scalar - # flip offset if reversed speed - if time_scalar < 0: - offset_in, offset_out = offset_out, offset_in - # scale handles handle_start *= abs(time_scalar) handle_end *= abs(time_scalar) - # flip handles if reversed speed + # flip offset and handles if reversed speed if time_scalar < 0: + offset_in, offset_out = offset_out, offset_in handle_start, handle_end = handle_end, handle_start - source_in = source_range.start_time.value + # compute retimed range + media_in_trimmed = conformed_source_range.start_time.value + offset_in + media_out_trimmed = media_in_trimmed + ( + (conformed_source_range.duration.value * abs( + time_scalar) + offset_out) - 1) - media_in_trimmed = (source_in + offset_in) - media_out_trimmed = ( media_in_trimmed + ( - ((source_range.duration.value - 1) * abs( - time_scalar)) + offset_out)) + media_in = available_range.start_time.value + media_out = available_range.end_time_inclusive().value + + # If media source is an image sequence, returned + # mediaIn/mediaOut have to correspond + # to frame numbers from source sequence. + media_ref = otio_clip.media_reference + is_input_sequence = ( + hasattr(otio.schema, "ImageSequenceReference") and + isinstance(media_ref, otio.schema.ImageSequenceReference) + ) + + if is_input_sequence: + # preserve discreet frame numbers + media_in_trimmed = otio.opentime.RationalTime.from_frames( + media_in_trimmed - media_in + media_ref.start_frame, + rate=available_range_rate, + ).to_frames() + media_out_trimmed = otio.opentime.RationalTime.from_frames( + media_out_trimmed - media_in + media_ref.start_frame, + rate=available_range_rate, + ).to_frames() - # calculate available handles + media_in = media_ref.start_frame + media_out = media_in + available_range.duration.to_frames() - 1 + + # adjust available handles if needed if (media_in_trimmed - media_in) < handle_start: handle_start = max(0, media_in_trimmed - media_in) if (media_out - media_out_trimmed) < handle_end: handle_end = max(0, media_out - media_out_trimmed) + # FFmpeg extraction ignores embedded timecode + # so substract to get a (mediaIn-mediaOut) range from 0. + if not is_input_sequence: + media_in_trimmed -= media_in + media_out_trimmed -= media_in + # create version data version_data = { "versionData": { "retime": True, "speed": time_scalar, "timewarps": time_warp_nodes, - "handleStart": int(round(handle_start)), - "handleEnd": int(round(handle_end)) + "handleStart": int(handle_start), + "handleEnd": int(handle_end) } } returning_dict = { "mediaIn": media_in_trimmed, "mediaOut": media_out_trimmed, - "handleStart": int(round(handle_start)), - "handleEnd": int(round(handle_end)), + "handleStart": int(handle_start), + "handleEnd": int(handle_end), "speed": time_scalar } diff --git a/client/ayon_core/plugins/publish/extract_otio_trimming_video.py b/client/ayon_core/plugins/publish/extract_otio_trimming_video.py index 9736c30b73..0c77602681 100644 --- a/client/ayon_core/plugins/publish/extract_otio_trimming_video.py +++ b/client/ayon_core/plugins/publish/extract_otio_trimming_video.py @@ -84,11 +84,8 @@ def _ffmpeg_trim_seqment(self, input_file_path, otio_range): command = get_ffmpeg_tool_args("ffmpeg") video_path = input_file_path - frame_start = otio_range.start_time.value - input_fps = otio_range.start_time.rate - frame_duration = otio_range.duration.value - 1 - sec_start = frames_to_seconds(frame_start, input_fps) - sec_duration = frames_to_seconds(frame_duration, input_fps) + sec_start = otio_range.start_time.to_seconds() + sec_duration = otio_range.duration.to_seconds() # form command for rendering gap files command.extend([ From ef6693f8a0c53b418765a0b88f131fdd911d1e3b Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 18 Sep 2024 16:28:45 -0400 Subject: [PATCH 06/28] Add unit tests. --- .../resources/img_seq_embedded_tc.json | 363 +++++++++++++++++ .../resources/img_seq_no_handles.json | 363 +++++++++++++++++ .../resources/img_seq_with_handles.json | 363 +++++++++++++++++ .../resources/movie_with_handles.json | 358 +++++++++++++++++ .../editorial/resources/qt_embedded_tc.json | 356 +++++++++++++++++ .../editorial/resources/qt_retimed_speed.json | 365 ++++++++++++++++++ 6 files changed, 2168 insertions(+) create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/img_seq_no_handles.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/img_seq_with_handles.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/movie_with_handles.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/qt_retimed_speed.json diff --git a/tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc.json b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc.json new file mode 100644 index 0000000000..a7c3ee00cf --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc.json @@ -0,0 +1,363 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "output.[1000-1100].exr", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 74.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 91046.625 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "-6": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "994": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "-6": { + "Value": 0.8, + "Variant Type": "Double" + }, + "994": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"f2918dd7-a30b-4b7d-8ac1-7d5f400058bf\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"ade94deb-f104-47dc-b8e9-04943f900914\", \"reviewTrack\": null, \"label\": \"/shots/sq01/Video_1sq01sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"5109899f-d744-4ed3-8547-8585ef9b703b\", \"creator_attributes\": {\"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1075, \"clipIn\": 655, \"clipOut\": 729, \"clipDuration\": 74, \"sourceIn\": 6, \"sourceOut\": 80, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo_1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video_1\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"f2918dd7-a30b-4b7d-8ac1-7d5f400058bf\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"ade94deb-f104-47dc-b8e9-04943f900914\", \"reviewTrack\": null, \"parent_instance_id\": \"5109899f-d744-4ed3-8547-8585ef9b703b\", \"label\": \"/shots/sq01/Video_1sq01sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"85c729e9-0503-4c3a-8d7f-be0920f047d8\", \"creator_attributes\": {\"parentInstance\": \"/shots/sq01/Video_1sq01sh010 shot\", \"vSyncOn\": false, \"vSyncTrack\": \"Video 1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"f2918dd7-a30b-4b7d-8ac1-7d5f400058bf\", \"publish\": true}" + }, + "clip_index": "f2918dd7-a30b-4b7d-8ac1-7d5f400058bf", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "f2918dd7-a30b-4b7d-8ac1-7d5f400058bf", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq01/Video_1sq01sh010 shot", + "vSyncOn": false, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "85c729e9-0503-4c3a-8d7f-be0920f047d8", + "label": "/shots/sq01/Video_1sq01sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "5109899f-d744-4ed3-8547-8585ef9b703b", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "ade94deb-f104-47dc-b8e9-04943f900914", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "f2918dd7-a30b-4b7d-8ac1-7d5f400058bf", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 74, + "clipIn": 655, + "clipOut": 729, + "folderPath": "/shots/sq01/Video_1sq01sh010", + "fps": "from_selection", + "frameEnd": 1075, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 6, + "sourceOut": 80, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "5109899f-d744-4ed3-8547-8585ef9b703b", + "label": "/shots/sq01/Video_1sq01sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "ade94deb-f104-47dc-b8e9-04943f900914", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 91083.625 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": {}, + "name": "output.[1000-1100].exr", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 87399.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\Users\\robin\\OneDrive\\Bureau\\dev_ayon\\samples\\exr_embedded_tc", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/img_seq_no_handles.json b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_no_handles.json new file mode 100644 index 0000000000..9dccb51197 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_no_handles.json @@ -0,0 +1,363 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "output.[1000-1100].tif", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "0": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "1000": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "0": { + "Value": 0.8, + "Variant Type": "Double" + }, + "1000": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"647b2ba6-6fca-4219-b163-cd321df9652f\", \"reviewTrack\": null, \"label\": \"/shots/sq01/Video_1sq01sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"2ab8f149-e32c-40f5-a6cb-ad1ca567ccc1\", \"creator_attributes\": {\"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1102, \"clipIn\": 509, \"clipOut\": 610, \"clipDuration\": 101, \"sourceIn\": 0, \"sourceOut\": 101, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo_1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video_1\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"647b2ba6-6fca-4219-b163-cd321df9652f\", \"reviewTrack\": null, \"parent_instance_id\": \"2ab8f149-e32c-40f5-a6cb-ad1ca567ccc1\", \"label\": \"/shots/sq01/Video_1sq01sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"9f866936-966b-4a73-8e61-1a5b6e648a3f\", \"creator_attributes\": {\"parentInstance\": \"/shots/sq01/Video_1sq01sh010 shot\", \"vSyncOn\": false, \"vSyncTrack\": \"Video 1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184\", \"publish\": true}" + }, + "clip_index": "cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq01/Video_1sq01sh010 shot", + "vSyncOn": false, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "9f866936-966b-4a73-8e61-1a5b6e648a3f", + "label": "/shots/sq01/Video_1sq01sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "2ab8f149-e32c-40f5-a6cb-ad1ca567ccc1", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "647b2ba6-6fca-4219-b163-cd321df9652f", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 101, + "clipIn": 509, + "clipOut": 610, + "folderPath": "/shots/sq01/Video_1sq01sh010", + "fps": "from_selection", + "frameEnd": 1102, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 0, + "sourceOut": 101, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "2ab8f149-e32c-40f5-a6cb-ad1ca567ccc1", + "label": "/shots/sq01/Video_1sq01sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "647b2ba6-6fca-4219-b163-cd321df9652f", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 50.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": {}, + "name": "output.[1000-1100].tif", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\Users\\robin\\OneDrive\\Bureau\\dev_ayon\\samples", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/img_seq_with_handles.json b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_with_handles.json new file mode 100644 index 0000000000..eb8876354c --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_with_handles.json @@ -0,0 +1,363 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "output.[1000-1100].tif", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 39.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 34.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "-34": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "966": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "-34": { + "Value": 0.8, + "Variant Type": "Double" + }, + "966": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5ca7b240-ec4c-49d1-841d-a96c33a08b1b\", \"reviewTrack\": null, \"label\": \"/shots/sq01/Video_1sq01sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"5b526964-5805-4412-af09-2da696c4978b\", \"creator_attributes\": {\"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1040, \"clipIn\": 543, \"clipOut\": 582, \"clipDuration\": 39, \"sourceIn\": 34, \"sourceOut\": 73, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo_1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video_1\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5ca7b240-ec4c-49d1-841d-a96c33a08b1b\", \"reviewTrack\": null, \"parent_instance_id\": \"5b526964-5805-4412-af09-2da696c4978b\", \"label\": \"/shots/sq01/Video_1sq01sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"992ab293-943b-4894-8a7f-c42b54b4d582\", \"creator_attributes\": {\"parentInstance\": \"/shots/sq01/Video_1sq01sh010 shot\", \"vSyncOn\": false, \"vSyncTrack\": \"Video 1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184\", \"publish\": true}" + }, + "clip_index": "cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq01/Video_1sq01sh010 shot", + "vSyncOn": false, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "992ab293-943b-4894-8a7f-c42b54b4d582", + "label": "/shots/sq01/Video_1sq01sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "5b526964-5805-4412-af09-2da696c4978b", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "5ca7b240-ec4c-49d1-841d-a96c33a08b1b", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "cfea9be4-3ecd-4253-a0a9-1a2bc9a4a184", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 39, + "clipIn": 543, + "clipOut": 582, + "folderPath": "/shots/sq01/Video_1sq01sh010", + "fps": "from_selection", + "frameEnd": 1040, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 34, + "sourceOut": 73, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "5b526964-5805-4412-af09-2da696c4978b", + "label": "/shots/sq01/Video_1sq01sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "5ca7b240-ec4c-49d1-841d-a96c33a08b1b", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 53.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": {}, + "name": "output.[1000-1100].tif", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\Users\\robin\\OneDrive\\Bureau\\dev_ayon\\samples", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/movie_with_handles.json b/tests/client/ayon_core/pipeline/editorial/resources/movie_with_handles.json new file mode 100644 index 0000000000..47b5772b49 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/movie_with_handles.json @@ -0,0 +1,358 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": { + "Link Group ID": 1 + } + }, + "name": "simple_editorial_setup.mp4", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 171.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "0": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "1000": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "0": { + "Value": 0.8, + "Variant Type": "Double" + }, + "1000": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cef0267f-bbf4-4959-9f22-d225e03f2532\", \"clip_source_resolution\": {\"width\": \"640\", \"height\": \"360\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"3af1b00a-5625-468d-af17-8ed29fa8608a\", \"reviewTrack\": null, \"label\": \"/shots/sq01/Video_1sq01sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"b6e33343-2410-4de4-935e-724bc74301e1\", \"creator_attributes\": {\"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1172, \"clipIn\": 1097, \"clipOut\": 1268, \"clipDuration\": 171, \"sourceIn\": 0, \"sourceOut\": 171, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo_1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video_1\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cef0267f-bbf4-4959-9f22-d225e03f2532\", \"clip_source_resolution\": {\"width\": \"640\", \"height\": \"360\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"3af1b00a-5625-468d-af17-8ed29fa8608a\", \"reviewTrack\": null, \"parent_instance_id\": \"b6e33343-2410-4de4-935e-724bc74301e1\", \"label\": \"/shots/sq01/Video_1sq01sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"ef8fe238-c970-4a16-be67-76f446113c4b\", \"creator_attributes\": {\"parentInstance\": \"/shots/sq01/Video_1sq01sh010 shot\", \"vSyncOn\": false, \"vSyncTrack\": \"Video 1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"cef0267f-bbf4-4959-9f22-d225e03f2532\", \"publish\": true}" + }, + "clip_index": "cef0267f-bbf4-4959-9f22-d225e03f2532", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "cef0267f-bbf4-4959-9f22-d225e03f2532", + "clip_source_resolution": { + "height": "360", + "pixelAspect": 1.0, + "width": "640" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq01/Video_1sq01sh010 shot", + "vSyncOn": false, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "ef8fe238-c970-4a16-be67-76f446113c4b", + "label": "/shots/sq01/Video_1sq01sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "b6e33343-2410-4de4-935e-724bc74301e1", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "3af1b00a-5625-468d-af17-8ed29fa8608a", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "cef0267f-bbf4-4959-9f22-d225e03f2532", + "clip_source_resolution": { + "height": "360", + "pixelAspect": 1.0, + "width": "640" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 171, + "clipIn": 1097, + "clipOut": 1268, + "folderPath": "/shots/sq01/Video_1sq01sh010", + "fps": "from_selection", + "frameEnd": 1172, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 0, + "sourceOut": 171, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "b6e33343-2410-4de4-935e-724bc74301e1", + "label": "/shots/sq01/Video_1sq01sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "3af1b00a-5625-468d-af17-8ed29fa8608a", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 85.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ExternalReference.1", + "metadata": {}, + "name": "simple_editorial_setup.mp4", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 16450.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url": "C:\\Users\\robin\\OneDrive\\Bureau\\dev_ayon\\data\\simple_editorial_setup.mp4" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc.json b/tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc.json new file mode 100644 index 0000000000..1b74ea4f37 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc.json @@ -0,0 +1,356 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "qt_embedded_tc.mov", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 44.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 90032.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "-32": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "1009": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "-32": { + "Value": 0.8, + "Variant Type": "Double" + }, + "1009": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"297fbf7a-7636-44b5-a308-809098298fae\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"3e459c3f-cc87-42c6-95c0-f11435ec8ace\", \"reviewTrack\": null, \"label\": \"/shots/sq01/Video_1sq01sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"acebdee4-5f4a-4ebd-8c22-6ef2725c2070\", \"creator_attributes\": {\"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1045, \"clipIn\": 509, \"clipOut\": 553, \"clipDuration\": 44, \"sourceIn\": 32, \"sourceOut\": 76, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo_1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video_1\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"297fbf7a-7636-44b5-a308-809098298fae\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"3e459c3f-cc87-42c6-95c0-f11435ec8ace\", \"reviewTrack\": null, \"parent_instance_id\": \"acebdee4-5f4a-4ebd-8c22-6ef2725c2070\", \"label\": \"/shots/sq01/Video_1sq01sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"ffd09d3c-227c-4be0-8788-dec30daf7f78\", \"creator_attributes\": {\"parentInstance\": \"/shots/sq01/Video_1sq01sh010 shot\", \"vSyncOn\": false, \"vSyncTrack\": \"Video 1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"297fbf7a-7636-44b5-a308-809098298fae\", \"publish\": true}" + }, + "clip_index": "297fbf7a-7636-44b5-a308-809098298fae", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "297fbf7a-7636-44b5-a308-809098298fae", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq01/Video_1sq01sh010 shot", + "vSyncOn": false, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "ffd09d3c-227c-4be0-8788-dec30daf7f78", + "label": "/shots/sq01/Video_1sq01sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "acebdee4-5f4a-4ebd-8c22-6ef2725c2070", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "3e459c3f-cc87-42c6-95c0-f11435ec8ace", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "297fbf7a-7636-44b5-a308-809098298fae", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 44, + "clipIn": 509, + "clipOut": 553, + "folderPath": "/shots/sq01/Video_1sq01sh010", + "fps": "from_selection", + "frameEnd": 1045, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 32, + "sourceOut": 76, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "acebdee4-5f4a-4ebd-8c22-6ef2725c2070", + "label": "/shots/sq01/Video_1sq01sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "3e459c3f-cc87-42c6-95c0-f11435ec8ace", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 90054.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ExternalReference.1", + "metadata": {}, + "name": "qt_embedded_tc.mov", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 100.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 86400.0 + } + }, + "available_image_bounds": null, + "target_url": "C:\\Users\\robin\\OneDrive\\Bureau\\dev_ayon\\data\\qt_embedded_tc.mov" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/qt_retimed_speed.json b/tests/client/ayon_core/pipeline/editorial/resources/qt_retimed_speed.json new file mode 100644 index 0000000000..61838d2755 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/qt_retimed_speed.json @@ -0,0 +1,365 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": { + "Link Group ID": 1 + } + }, + "name": "simple_editorial_setup.mp4", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 171.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "LinearTimeWarp.1", + "metadata": {}, + "name": "", + "effect_name": "", + "time_scalar": 2.5 + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "0": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "1000": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "0": { + "Value": 0.8, + "Variant Type": "Double" + }, + "1000": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cef0267f-bbf4-4959-9f22-d225e03f2532\", \"clip_source_resolution\": {\"width\": \"640\", \"height\": \"360\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"2a780b95-14cc-45de-acc0-3ecd1f504325\", \"reviewTrack\": null, \"label\": \"/shots/sq01/Video_1sq01sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"e8af785a-484f-452b-8c9c-ac31ef0696c4\", \"creator_attributes\": {\"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1172, \"clipIn\": 805, \"clipOut\": 976, \"clipDuration\": 171, \"sourceIn\": 0, \"sourceOut\": 171, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo_1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video_1\", \"folderPath\": \"/shots/sq01/Video_1sq01sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"cef0267f-bbf4-4959-9f22-d225e03f2532\", \"clip_source_resolution\": {\"width\": \"640\", \"height\": \"360\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/sq01\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"sq01\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"sq01\", \"track\": \"Video_1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"2a780b95-14cc-45de-acc0-3ecd1f504325\", \"reviewTrack\": null, \"parent_instance_id\": \"e8af785a-484f-452b-8c9c-ac31ef0696c4\", \"label\": \"/shots/sq01/Video_1sq01sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"a34e7048-3d86-4c29-88c7-f65b1ba3d777\", \"creator_attributes\": {\"parentInstance\": \"/shots/sq01/Video_1sq01sh010 shot\", \"vSyncOn\": false, \"vSyncTrack\": \"Video 1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"cef0267f-bbf4-4959-9f22-d225e03f2532\", \"publish\": true}" + }, + "clip_index": "cef0267f-bbf4-4959-9f22-d225e03f2532", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "cef0267f-bbf4-4959-9f22-d225e03f2532", + "clip_source_resolution": { + "height": "360", + "pixelAspect": 1.0, + "width": "640" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq01/Video_1sq01sh010 shot", + "vSyncOn": false, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "a34e7048-3d86-4c29-88c7-f65b1ba3d777", + "label": "/shots/sq01/Video_1sq01sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "e8af785a-484f-452b-8c9c-ac31ef0696c4", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "2a780b95-14cc-45de-acc0-3ecd1f504325", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "cef0267f-bbf4-4959-9f22-d225e03f2532", + "clip_source_resolution": { + "height": "360", + "pixelAspect": 1.0, + "width": "640" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 171, + "clipIn": 805, + "clipOut": 976, + "folderPath": "/shots/sq01/Video_1sq01sh010", + "fps": "from_selection", + "frameEnd": 1172, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 0, + "sourceOut": 171, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/sq01/Video_1sq01sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq01", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq01", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "e8af785a-484f-452b-8c9c-ac31ef0696c4", + "label": "/shots/sq01/Video_1sq01sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq01", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": null, + "sequence": "sq01", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "2a780b95-14cc-45de-acc0-3ecd1f504325", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 85.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ExternalReference.1", + "metadata": {}, + "name": "simple_editorial_setup.mp4", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 16450.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url": "C:\\Users\\robin\\OneDrive\\Bureau\\dev_ayon\\data\\simple_editorial_setup.mp4" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file From b0b509d431eee02e193211efd52a0126af18e476 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 18 Sep 2024 16:34:05 -0400 Subject: [PATCH 07/28] Add unit tests --- .../test_media_range_with_retimes.py | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py diff --git a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py new file mode 100644 index 0000000000..7dca2e087a --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py @@ -0,0 +1,150 @@ +import os +import pytest + +import opentimelineio as otio + +from ayon_core.pipeline.editorial import get_media_range_with_retimes + + +_RESOURCE_DIR = os.path.join( + os.path.dirname(__file__), + "resources" +) + + +def _check_expected_retimed_values( + file_name: str, + expected_retimed_data: dict, + handle_start: int = 10, + handle_end: int = 10, +): + file_path = os.path.join(_RESOURCE_DIR, file_name) + otio_clip = otio.schema.Clip.from_json_file(file_path) + + retimed_data = get_media_range_with_retimes( + otio_clip, handle_start, handle_end + ) + assert retimed_data == expected_retimed_data + + +def test_movie_with_end_handle_end_only(): + """ + Movie clip (no embedded timecode) + available_range = 0-171 25fps + source_range = 0-16450 25fps + """ + expected_data = { + 'mediaIn': 0.0, + 'mediaOut': 170.0, + 'handleStart': 0, + 'handleEnd': 10, + 'speed': 1.0 + } + _check_expected_retimed_values( + "movie_with_handles.json", + expected_data, + ) + + +def test_movie_embedded_tc_handle(): + """ + Movie clip (embedded timecode 1h) + available_range = 86400-86500 24fps + source_range = 90032-90076 25fps + """ + expected_data = { + 'mediaIn': 30.720000000001164, + 'mediaOut': 71.9600000000064, + 'handleStart': 10, + 'handleEnd': 10, + 'speed': 1.0 + } + _check_expected_retimed_values( + "qt_embedded_tc.json", + expected_data + ) + + +def test_movie_retime_effect(): + """ + Movie clip (embedded timecode 1h) + available_range = 0-171 25fps + source_range = 0-16450 25fps + retimed speed: 250% + """ + expected_data = { + 'mediaIn': 0.0, + 'mediaOut': 426.5, + 'handleStart': 0, + 'handleEnd': 25, + 'speed': 2.5, + 'versionData': { + 'retime': True, + 'speed': 2.5, + 'timewarps': [], + 'handleStart': 0, + 'handleEnd': 25 + } + } +# import rpdb ; rpdb.Rpdb().set_trace() + _check_expected_retimed_values( + "qt_retimed_speed.json", + expected_data + ) + + +def test_img_sequence_no_handles(): + """ + Img sequence clip (no embedded timecode) + available files = 1000-1100 + source_range = 0-100 25fps + """ + expected_data = { + 'mediaIn': 1000, + 'mediaOut': 1100, + 'handleStart': 0, + 'handleEnd': 0, + 'speed': 1.0 + } + _check_expected_retimed_values( + "img_seq_no_handles.json", + expected_data + ) + + +def test_img_sequence_with_handles(): + """ + Img sequence clip (no embedded timecode) + available files = 1000-1100 + source_range = 34-72 25fps + """ + expected_data = { + 'mediaIn': 1034, + 'mediaOut': 1072, + 'handleStart': 10, + 'handleEnd': 10, + 'speed': 1.0 + } + _check_expected_retimed_values( + "img_seq_with_handles.json", + expected_data + ) + + +def test_img_sequence_with_embedded_tc_and_handles(): + """ + Img sequence clip (embedded timecode 1h) + available files = 1000-1100 + source_range = 91046.625-91,120.625 25fps + """ + expected_data = { + 'mediaIn': 1005, + 'mediaOut': 1075, + 'handleStart': 5, + 'handleEnd': 10, + 'speed': 1.0 + } + _check_expected_retimed_values( + "img_seq_embedded_tc.json", + expected_data + ) From be2b8d5c60087d53e84f84bf9392f0ece2812c91 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 18 Sep 2024 16:46:49 -0400 Subject: [PATCH 08/28] Fix lint. --- client/ayon_core/pipeline/editorial.py | 8 +++----- .../plugins/publish/extract_otio_trimming_video.py | 3 --- .../pipeline/editorial/test_media_range_with_retimes.py | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index bc02ae9b00..ca62c13e7d 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -176,8 +176,6 @@ def _sequence_resize(source, length): def get_media_range_with_retimes(otio_clip, handle_start, handle_end): source_range = otio_clip.source_range available_range = otio_clip.available_range() - - source_range_rate = source_range.start_time.rate available_range_rate = available_range.start_time.rate # Conform source range bounds to available range rate @@ -187,9 +185,9 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): # 86400 86500 # # - # 90010 90060 - # src |-----|______duration 2s___|----| 25fps - # 90000 + # 90010 90060 + # src |-----|______duration 2s___|----| 25fps + # 90000 # # # 86409.6 86466.8 diff --git a/client/ayon_core/plugins/publish/extract_otio_trimming_video.py b/client/ayon_core/plugins/publish/extract_otio_trimming_video.py index 0c77602681..59b8a714f0 100644 --- a/client/ayon_core/plugins/publish/extract_otio_trimming_video.py +++ b/client/ayon_core/plugins/publish/extract_otio_trimming_video.py @@ -74,9 +74,6 @@ def _ffmpeg_trim_seqment(self, input_file_path, otio_range): otio_range (opentime.TimeRange): range to trim to """ - # Not all hosts can import this module. - from ayon_core.pipeline.editorial import frames_to_seconds - # create path to destination output_path = self._get_ffmpeg_output(input_file_path) diff --git a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py index 7dca2e087a..ea0b7fbf82 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py +++ b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py @@ -1,5 +1,4 @@ import os -import pytest import opentimelineio as otio From 4f2340adea40e8c2e589387a115ae1c083041d9a Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Mon, 23 Sep 2024 08:14:55 -0400 Subject: [PATCH 09/28] Update client/ayon_core/pipeline/editorial.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/editorial.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index ca62c13e7d..4b823f130f 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -262,8 +262,12 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): # compute retimed range media_in_trimmed = conformed_source_range.start_time.value + offset_in media_out_trimmed = media_in_trimmed + ( - (conformed_source_range.duration.value * abs( - time_scalar) + offset_out) - 1) + ( + conformed_source_range.duration.value + * abs(time_scalar) + + offset_out + ) - 1 + ) media_in = available_range.start_time.value media_out = available_range.end_time_inclusive().value From f9ed6f58774cb14c132ed53856d8a966838131a1 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 23 Sep 2024 08:19:12 -0400 Subject: [PATCH 10/28] Fix typos. --- client/ayon_core/pipeline/editorial.py | 2 +- .../pipeline/editorial/test_media_range_with_retimes.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 4b823f130f..7d6d6f5882 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -282,7 +282,7 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): ) if is_input_sequence: - # preserve discreet frame numbers + # preserve discrete frame numbers media_in_trimmed = otio.opentime.RationalTime.from_frames( media_in_trimmed - media_in + media_ref.start_frame, rate=available_range_rate, diff --git a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py index ea0b7fbf82..82512df7b8 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py +++ b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py @@ -85,7 +85,6 @@ def test_movie_retime_effect(): 'handleEnd': 25 } } -# import rpdb ; rpdb.Rpdb().set_trace() _check_expected_retimed_values( "qt_retimed_speed.json", expected_data From d2b933718d85d996fe4217f490e5fbd65a916a42 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 23 Sep 2024 08:22:54 -0400 Subject: [PATCH 11/28] Adjust test docstring. --- .../pipeline/editorial/test_media_range_with_retimes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py index 82512df7b8..270b01a799 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py +++ b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py @@ -133,7 +133,7 @@ def test_img_sequence_with_embedded_tc_and_handles(): """ Img sequence clip (embedded timecode 1h) available files = 1000-1100 - source_range = 91046.625-91,120.625 25fps + source_range = 91046.625-91120.625 25fps """ expected_data = { 'mediaIn': 1005, From 77fac00ecc68be9189dc321381880a432c7b617c Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 24 Sep 2024 12:50:52 -0400 Subject: [PATCH 12/28] Make it work even with image sequence and embedded timecodes. --- client/ayon_core/pipeline/editorial.py | 80 +++++-- .../plugins/publish/extract_otio_review.py | 204 +++++++++++------- 2 files changed, 187 insertions(+), 97 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 7d6d6f5882..23c49154ac 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -88,7 +88,7 @@ def trim_media_range(media_range, source_range): """ rw_media_start = _ot.RationalTime( - media_range.start_time.value + source_range.start_time.value, + source_range.start_time.value, media_range.start_time.rate ) rw_media_duration = _ot.RationalTime( @@ -173,6 +173,66 @@ def _sequence_resize(source, length): yield (1 - ratio) * source[int(low)] + ratio * source[int(high)] +def is_clip_from_media_sequence(otio_clip): + """ + Args: + otio_clip (otio.schema.Clip): The OTIO clip to check. + + Returns: + bool. Is the provided clip from an input media sequence ? + """ + media_ref = otio_clip.media_reference + metadata = media_ref.metadata + + # OpenTimelineIO 0.13 and newer + is_input_sequence = ( + hasattr(otio.schema, "ImageSequenceReference") and + isinstance(media_ref, otio.schema.ImageSequenceReference) + ) + + # OpenTimelineIO 0.12 and older + is_input_sequence_legacy = bool(metadata.get("padding")) + + return is_input_sequence or is_input_sequence_legacy + + +def remap_range_on_file_sequence(otio_clip, in_out_range): + """ + Args: + otio_clip (otio.schema.Clip): The OTIO clip to check. + in_out_range (tuple[float, float]): The in-out range to remap. + + Returns: + tuple(int, int): The remapped range as discrete frame number. + + Raises: + ValueError. When the otio_clip or provided range is invalid. + """ + if not is_clip_from_media_sequence(otio_clip): + raise ValueError(f"Cannot map on non-file sequence clip {otio_clip}.") + + try: + media_in_trimmed, media_out_trimmed = in_out_range + + except ValueError as error: + raise ValueError("Invalid in_out_range provided.") from error + + media_ref = otio_clip.media_reference + media_in = otio_clip.available_range().start_time.value + available_range_rate = otio_clip.available_range().start_time.rate + + frame_in = otio.opentime.RationalTime.from_frames( + media_in_trimmed - media_in + media_ref.start_frame, + rate=available_range_rate, + ).to_frames() + frame_out = otio.opentime.RationalTime.from_frames( + media_out_trimmed - media_in + media_ref.start_frame, + rate=available_range_rate, + ).to_frames() + + return frame_in, frame_out + + def get_media_range_with_retimes(otio_clip, handle_start, handle_end): source_range = otio_clip.source_range available_range = otio_clip.available_range() @@ -276,22 +336,14 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): # mediaIn/mediaOut have to correspond # to frame numbers from source sequence. media_ref = otio_clip.media_reference - is_input_sequence = ( - hasattr(otio.schema, "ImageSequenceReference") and - isinstance(media_ref, otio.schema.ImageSequenceReference) - ) + is_input_sequence = is_clip_from_media_sequence(otio_clip) if is_input_sequence: # preserve discrete frame numbers - media_in_trimmed = otio.opentime.RationalTime.from_frames( - media_in_trimmed - media_in + media_ref.start_frame, - rate=available_range_rate, - ).to_frames() - media_out_trimmed = otio.opentime.RationalTime.from_frames( - media_out_trimmed - media_in + media_ref.start_frame, - rate=available_range_rate, - ).to_frames() - + media_in_trimmed, media_out_trimmed = remap_range_on_file_sequence( + otio_clip, + (media_in_trimmed, media_out_trimmed) + ) media_in = media_ref.start_frame media_out = media_in + available_range.duration.to_frames() - 1 diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index 64c73adbd5..b96f716ac9 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -58,7 +58,9 @@ def process(self, instance): import opentimelineio as otio from ayon_core.pipeline.editorial import ( otio_range_to_frame_range, - make_sequence_collection + make_sequence_collection, + remap_range_on_file_sequence, + is_clip_from_media_sequence ) # TODO refactore from using instance variable @@ -105,42 +107,48 @@ def process(self, instance): otio_media = r_otio_cl.media_reference media_metadata = otio_media.metadata + variables = (self.to_width, self.to_height) + keys = ("width", "height") + # get from media reference metadata source # TODO 'openpype' prefix should be removed (added 24/09/03) # NOTE it looks like it is set only in hiero integration - for key in {"ayon.source.width", "openpype.source.width"}: - value = media_metadata.get(key) - if value is not None: - width = int(value) - break - - for key in {"ayon.source.height", "openpype.source.height"}: - value = media_metadata.get(key) - if value is not None: - height = int(value) - break - - # compare and reset - if width != self.to_width: - self.to_width = width - if height != self.to_height: - self.to_height = height + for variable, key in zip(variables, keys): + for meta_prefix in ("ayon.source.", "openpype.source."): + meta_key = f"{meta_prefix}.{key}" + if media_metadata.get(meta_key): + variable = media_metadata[meta_key] + break self.log.debug("> self.to_width x self.to_height: {} x {}".format( self.to_width, self.to_height )) - # get frame range values + # Clip: compute process range from available media range. src_range = r_otio_cl.source_range - start = src_range.start_time.value - duration = src_range.duration.value - available_range = None - self.actual_fps = src_range.duration.rate - - # add available range only if not gap if isinstance(r_otio_cl, otio.schema.Clip): available_range = r_otio_cl.available_range() + processing_range = None self.actual_fps = available_range.duration.rate + start = src_range.start_time.rescaled_to(self.actual_fps) + duration = src_range.duration.rescaled_to(self.actual_fps) + + # Gap: no media, generate range based on source range + else: + available_range = processing_range = None + self.actual_fps = src_range.duration.rate + start = src_range.start_time + duration = src_range.duration + + # Create handle offsets. + handle_start = otio.opentime.RationalTime( + handle_start, + rate=self.actual_fps, + ) + handle_end = otio.opentime.RationalTime( + handle_end, + rate=self.actual_fps, + ) # reframing handles conditions if (len(otio_review_clips) > 1) and (index == 0): @@ -157,35 +165,33 @@ def process(self, instance): duration += (handle_start + handle_end) if available_range: - available_range = self._trim_available_range( - available_range, start, duration, self.actual_fps) + processing_range = self._trim_available_range( + available_range, start, duration) # process all track items of the track if isinstance(r_otio_cl, otio.schema.Clip): # process Clip media_ref = r_otio_cl.media_reference metadata = media_ref.metadata - is_sequence = None - - # check in two way if it is sequence - if hasattr(otio.schema, "ImageSequenceReference"): - # for OpenTimelineIO 0.13 and newer - if isinstance(media_ref, - otio.schema.ImageSequenceReference): - is_sequence = True - else: - # for OpenTimelineIO 0.12 and older - if metadata.get("padding"): - is_sequence = True + is_sequence = is_clip_from_media_sequence(r_otio_cl) + # File sequence way if is_sequence: - # file sequence way + # Remap processing range to input file sequence. + processing_range_as_frames = ( + processing_range.start_time.to_frames(), + processing_range.end_time_inclusive().to_frames() + ) + first, last = remap_range_on_file_sequence( + r_otio_cl, + processing_range_as_frames, + ) + input_fps = processing_range.start_time.rate + if hasattr(media_ref, "target_url_base"): dirname = media_ref.target_url_base head = media_ref.name_prefix tail = media_ref.name_suffix - first, last = otio_range_to_frame_range( - available_range) collection = clique.Collection( head=head, tail=tail, @@ -195,7 +201,7 @@ def process(self, instance): [i for i in range(first, (last + 1))]) # render segment self._render_seqment( - sequence=[dirname, collection]) + sequence=[dirname, collection, input_fps]) # generate used frames self._generate_used_frames( len(collection.indexes)) @@ -204,24 +210,38 @@ def process(self, instance): # `ImageSequenceReference` path = media_ref.target_url collection_data = make_sequence_collection( - path, available_range, metadata) + path, processing_range, metadata) dir_path, collection = collection_data # render segment self._render_seqment( - sequence=[dir_path, collection]) + sequence=[dir_path, collection, input_fps]) # generate used frames self._generate_used_frames( len(collection.indexes)) + + # Single video way. + # Extraction via FFmpeg. else: - # single video file way path = media_ref.target_url + # Set extract range from 0 (FFmpeg ignores embedded timecode). + extract_range = otio.opentime.TimeRange( + otio.opentime.RationalTime( + ( + processing_range.start_time.value + - available_range.start_time.value + ), + rate=available_range.start_time.rate, + ), + duration=processing_range.duration, + ) # render video file to sequence self._render_seqment( - video=[path, available_range]) + video=[path, extract_range]) # generate used frames self._generate_used_frames( - available_range.duration.value) + processing_range.duration.value) + # QUESTION: what if nested track composition is in place? else: # at last process a Gap @@ -276,7 +296,7 @@ def _create_representation(self, start, duration): }) return representation_data - def _trim_available_range(self, avl_range, start, duration, fps): + def _trim_available_range(self, avl_range, start, duration): """ Trim available media range to source range. @@ -285,57 +305,62 @@ def _trim_available_range(self, avl_range, start, duration, fps): Args: avl_range (otio.time.TimeRange): media available time range - start (int): start frame - duration (int): duration frames - fps (float): frame rate + start (otio.time.RationalTime): start + duration (otio.time.RationalTime): duration Returns: otio.time.TimeRange: trimmed available range """ # Not all hosts can import these modules. + import opentimelineio as otio from ayon_core.pipeline.editorial import ( trim_media_range, - range_from_frames ) - avl_start = int(avl_range.start_time.value) - src_start = int(avl_start + start) - avl_durtation = int(avl_range.duration.value) + avl_start = avl_range.start_time + avl_duration = avl_range.duration - self.need_offset = bool(avl_start != 0 and src_start != 0) + # TODO investigate + #self.need_offset = bool(avl_start != 0 and src_start != 0) - # if media start is les then clip requires - if src_start < avl_start: - # calculate gap - gap_duration = avl_start - src_start + # A gap is required before available range + # range to conform start point. + if start < avl_start: + gap_duration = avl_start - start + start = avl_start + duration -= gap_duration # create gap data to disk - self._render_seqment(gap=gap_duration) + self._render_seqment(gap=gap_duration.to_frames()) # generate used frames - self._generate_used_frames(gap_duration) - - # fix start and end to correct values - start = 0 - duration -= gap_duration + self._generate_used_frames(gap_duration.to_frames()) + # A gap is required after available range # if media duration is shorter then clip requirement - if duration > avl_durtation: - # calculate gap - gap_start = int(src_start + avl_durtation) - gap_end = int(src_start + duration) - gap_duration = gap_end - gap_start + end_point = start + duration + avl_end_point = avl_range.end_time_exclusive() + if end_point > avl_end_point: + gap_duration = end_point - avl_end_point + duration -= gap_duration # create gap data to disk - self._render_seqment(gap=gap_duration, end_offset=avl_durtation) + self._render_seqment( + gap=gap_duration.to_frames(), + end_offset=avl_duration.to_frames() + ) # generate used frames - self._generate_used_frames(gap_duration, end_offset=avl_durtation) - - # fix duration lenght - duration = avl_durtation + self._generate_used_frames( + gap_duration.to_frames(), + end_offset=avl_duration.to_frames() + ) # return correct trimmed range return trim_media_range( - avl_range, range_from_frames(start, duration, fps) + avl_range, + otio.opentime.TimeRange( + start, + duration + ) ) def _render_seqment(self, sequence=None, @@ -347,7 +372,7 @@ def _render_seqment(self, sequence=None, to defined image sequence format. Args: - sequence (list): input dir path string, collection object in list + sequence (list): input dir path string, collection object, fps in list video (list)[optional]: video_path string, otio_range in list gap (int)[optional]: gap duration end_offset (int)[optional]: offset gap frame start in frames @@ -369,7 +394,7 @@ def _render_seqment(self, sequence=None, input_extension = None if sequence: - input_dir, collection = sequence + input_dir, collection, sequence_fps = sequence in_frame_start = min(collection.indexes) # converting image sequence to image sequence @@ -377,9 +402,22 @@ def _render_seqment(self, sequence=None, input_path = os.path.join(input_dir, input_file) input_extension = os.path.splitext(input_path)[-1] - # form command for rendering gap files + # form command for rendering sequence files + # (need to explicit set the input frame range + # if case input sequence has framerate metadata + # to preserve frame range and avoid silent dropped + # frames caused by input mismatch with FFmpeg default + # rate 25.0 fps) more info refer to FFmpeg image2 demuxer + # + # Implicit + # [Input 100 frames (24fps from metadata)] -> [Demuxer video 25fps] -> [Output 98 frames, dropped 2] + # + # Explicit with "-framerate" + # [Input 100 frames (24fps from metadata)] -> [Demuxer video 24fps] -> [Output 100 frames] + command.extend([ "-start_number", str(in_frame_start), + "-framerate", str(sequence_fps), "-i", input_path ]) @@ -456,8 +494,8 @@ def _generate_used_frames(self, duration, end_offset=None): # create frame offset offset = 0 - if self.need_offset: - offset = 1 +# if self.need_offset: +# offset = 1 if end_offset: new_frames = list() From 6d31cd723c0043e12a5f64219a39cda981332f5e Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 24 Sep 2024 17:14:42 -0400 Subject: [PATCH 13/28] Add unit tests. --- .../plugins/publish/extract_otio_review.py | 20 +- .../resources/img_seq_embedded_tc_review.json | 363 ++++++++++++++++++ .../editorial/resources/img_seq_review.json | 363 ++++++++++++++++++ .../resources/qt_embedded_tc_review.json | 356 +++++++++++++++++ .../editorial/resources/qt_review.json | 356 +++++++++++++++++ .../editorial/test_extract_otio_review.py | 180 +++++++++ 6 files changed, 1624 insertions(+), 14 deletions(-) create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc_review.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/img_seq_review.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc_review.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/qt_review.json create mode 100644 tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index b96f716ac9..d1ac019c3a 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -320,9 +320,6 @@ def _trim_available_range(self, avl_range, start, duration): avl_start = avl_range.start_time avl_duration = avl_range.duration - # TODO investigate - #self.need_offset = bool(avl_start != 0 and src_start != 0) - # A gap is required before available range # range to conform start point. if start < avl_start: @@ -331,9 +328,9 @@ def _trim_available_range(self, avl_range, start, duration): duration -= gap_duration # create gap data to disk - self._render_seqment(gap=gap_duration.to_frames()) + self._render_seqment(gap=gap_duration.round().to_frames()) # generate used frames - self._generate_used_frames(gap_duration.to_frames()) + self._generate_used_frames(gap_duration.round().to_frames()) # A gap is required after available range # if media duration is shorter then clip requirement @@ -345,12 +342,12 @@ def _trim_available_range(self, avl_range, start, duration): # create gap data to disk self._render_seqment( - gap=gap_duration.to_frames(), + gap=gap_duration.round().to_frames(), end_offset=avl_duration.to_frames() ) # generate used frames self._generate_used_frames( - gap_duration.to_frames(), + gap_duration.round().to_frames(), end_offset=avl_duration.to_frames() ) @@ -492,16 +489,11 @@ def _generate_used_frames(self, duration, end_offset=None): padding = "{{:0{}d}}".format(self.padding) - # create frame offset - offset = 0 -# if self.need_offset: -# offset = 1 - if end_offset: new_frames = list() start_frame = self.used_frames[-1] - for index in range((end_offset + offset), - (int(end_offset + duration) + offset)): + for index in range(end_offset, + (int(end_offset + duration))): seq_number = padding.format(start_frame + index) self.log.debug( "index: `{}` | seq_number: `{}`".format(index, seq_number)) diff --git a/tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc_review.json b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc_review.json new file mode 100644 index 0000000000..3437692155 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_embedded_tc_review.json @@ -0,0 +1,363 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "output.[1000-1100].exr", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 87399.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "0": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "1000": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "0": { + "Value": 0.8, + "Variant Type": "Double" + }, + "1000": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/seq_img_tc_handles_out/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"adca7e5b-b53c-48ab-8469-abe4db3c276a\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_tc_handles_out\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_img_tc_handles_out\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_img_tc_handles_out\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_tc_handles_out\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"fca94ed7-1e74-4ddc-8d56-05696e8c472a\", \"reviewTrack\": \"Video1\", \"label\": \"/shots/seq_img_tc_handles_out/sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"6c2baba3-183c-41f0-b9a9-596d315fd162\", \"creator_attributes\": {\"folderPath\": \"/shots/seq_img_tc_handles_out/sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1102, \"clipIn\": 86524, \"clipOut\": 86625, \"clipDuration\": 101, \"sourceIn\": 0, \"sourceOut\": 101, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video1\", \"folderPath\": \"/shots/seq_img_tc_handles_out/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"adca7e5b-b53c-48ab-8469-abe4db3c276a\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_tc_handles_out\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_img_tc_handles_out\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_img_tc_handles_out\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_tc_handles_out\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"fca94ed7-1e74-4ddc-8d56-05696e8c472a\", \"reviewTrack\": \"Video1\", \"parent_instance_id\": \"6c2baba3-183c-41f0-b9a9-596d315fd162\", \"label\": \"/shots/seq_img_tc_handles_out/sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"8b1f1e6f-699a-4481-b9be-92d819bc4096\", \"creator_attributes\": {\"parentInstance\": \"/shots/seq_img_tc_handles_out/sh010 shot\", \"vSyncOn\": true, \"vSyncTrack\": \"Video1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"adca7e5b-b53c-48ab-8469-abe4db3c276a\", \"publish\": true}" + }, + "clip_index": "adca7e5b-b53c-48ab-8469-abe4db3c276a", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "adca7e5b-b53c-48ab-8469-abe4db3c276a", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/seq_img_tc_handles_out/sh010 shot", + "vSyncOn": true, + "vSyncTrack": "Video1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_img_tc_handles_out/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_img_tc_handles_out", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_img_tc_handles_out", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "8b1f1e6f-699a-4481-b9be-92d819bc4096", + "label": "/shots/seq_img_tc_handles_out/sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "6c2baba3-183c-41f0-b9a9-596d315fd162", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_img_tc_handles_out", + "folder_type": "sequence" + } + ], + "productName": "plateVideo1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_img_tc_handles_out", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "fca94ed7-1e74-4ddc-8d56-05696e8c472a", + "variant": "Video1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "adca7e5b-b53c-48ab-8469-abe4db3c276a", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 101, + "clipIn": 86524, + "clipOut": 86625, + "folderPath": "/shots/seq_img_tc_handles_out/sh010", + "fps": "from_selection", + "frameEnd": 1102, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 0, + "sourceOut": 101, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_img_tc_handles_out/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_img_tc_handles_out", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_img_tc_handles_out", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "6c2baba3-183c-41f0-b9a9-596d315fd162", + "label": "/shots/seq_img_tc_handles_out/sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_img_tc_handles_out", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_img_tc_handles_out", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "fca94ed7-1e74-4ddc-8d56-05696e8c472a", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 87449.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": {}, + "name": "output.[1000-1100].exr", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 87399.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\exr_embedded_tc", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/img_seq_review.json b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_review.json new file mode 100644 index 0000000000..ed19d65744 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/img_seq_review.json @@ -0,0 +1,363 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "output.[1000-1100].tif", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 91.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 5.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "-5": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "955": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "-5": { + "Value": 0.8, + "Variant Type": "Double" + }, + "955": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/seq_img_notc_blackhandles/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"a82520bd-f231-4a23-9cb7-8823141232db\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_notc_blackhandles\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_img_notc_blackhandles\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_img_notc_blackhandles\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_notc_blackhandles\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5d6be326-f1d0-4416-b6aa-780d05a8dd6d\", \"reviewTrack\": \"Video1\", \"label\": \"/shots/seq_img_notc_blackhandles/sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"e196263f-c584-40b4-bc27-018051a3bc92\", \"creator_attributes\": {\"folderPath\": \"/shots/seq_img_notc_blackhandles/sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1092, \"clipIn\": 86511, \"clipOut\": 86602, \"clipDuration\": 91, \"sourceIn\": 5, \"sourceOut\": 96, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video1\", \"folderPath\": \"/shots/seq_img_notc_blackhandles/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"a82520bd-f231-4a23-9cb7-8823141232db\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_notc_blackhandles\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_img_notc_blackhandles\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_img_notc_blackhandles\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_img_notc_blackhandles\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5d6be326-f1d0-4416-b6aa-780d05a8dd6d\", \"reviewTrack\": \"Video1\", \"parent_instance_id\": \"e196263f-c584-40b4-bc27-018051a3bc92\", \"label\": \"/shots/seq_img_notc_blackhandles/sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"ced7e9b8-721a-4377-a827-15fbf7f2831a\", \"creator_attributes\": {\"parentInstance\": \"/shots/seq_img_notc_blackhandles/sh010 shot\", \"vSyncOn\": true, \"vSyncTrack\": \"Video1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"a82520bd-f231-4a23-9cb7-8823141232db\", \"publish\": true}" + }, + "clip_index": "a82520bd-f231-4a23-9cb7-8823141232db", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "a82520bd-f231-4a23-9cb7-8823141232db", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/seq_img_notc_blackhandles/sh010 shot", + "vSyncOn": true, + "vSyncTrack": "Video1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_img_notc_blackhandles/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_img_notc_blackhandles", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_img_notc_blackhandles", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "ced7e9b8-721a-4377-a827-15fbf7f2831a", + "label": "/shots/seq_img_notc_blackhandles/sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "e196263f-c584-40b4-bc27-018051a3bc92", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_img_notc_blackhandles", + "folder_type": "sequence" + } + ], + "productName": "plateVideo1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_img_notc_blackhandles", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "5d6be326-f1d0-4416-b6aa-780d05a8dd6d", + "variant": "Video1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "a82520bd-f231-4a23-9cb7-8823141232db", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 91, + "clipIn": 86511, + "clipOut": 86602, + "folderPath": "/shots/seq_img_notc_blackhandles/sh010", + "fps": "from_selection", + "frameEnd": 1092, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 5, + "sourceOut": 96, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_img_notc_blackhandles/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_img_notc_blackhandles", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_img_notc_blackhandles", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "e196263f-c584-40b4-bc27-018051a3bc92", + "label": "/shots/seq_img_notc_blackhandles/sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_img_notc_blackhandles", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_img_notc_blackhandles", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "5d6be326-f1d0-4416-b6aa-780d05a8dd6d", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 50.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": {}, + "name": "output.[1000-1100].tif", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\tif_seq", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc_review.json b/tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc_review.json new file mode 100644 index 0000000000..629e9e04af --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/qt_embedded_tc_review.json @@ -0,0 +1,356 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "qt_embedded_tc.mov", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 68.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 86414.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "-14": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "986": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "-14": { + "Value": 0.8, + "Variant Type": "Double" + }, + "986": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/seq_qt_tc/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"12cce00c-eadf-4abd-ac80-0816a24506ab\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_tc\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_qt_tc\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_qt_tc\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_tc\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5dc397e0-1142-4a35-969d-d4c35c512f0f\", \"reviewTrack\": \"Video1\", \"label\": \"/shots/seq_qt_tc/sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"6f4bbf76-6638-4645-9059-0f516c0c12c2\", \"creator_attributes\": {\"folderPath\": \"/shots/seq_qt_tc/sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1069, \"clipIn\": 86516, \"clipOut\": 86584, \"clipDuration\": 68, \"sourceIn\": 14, \"sourceOut\": 82, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video1\", \"folderPath\": \"/shots/seq_qt_tc/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"12cce00c-eadf-4abd-ac80-0816a24506ab\", \"clip_source_resolution\": {\"width\": \"956\", \"height\": \"720\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_tc\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_qt_tc\", \"sourceResolution\": false, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_qt_tc\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_tc\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5dc397e0-1142-4a35-969d-d4c35c512f0f\", \"reviewTrack\": \"Video1\", \"parent_instance_id\": \"6f4bbf76-6638-4645-9059-0f516c0c12c2\", \"label\": \"/shots/seq_qt_tc/sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"1d11a6b5-cc2b-49d8-8bcb-35187c785b22\", \"creator_attributes\": {\"parentInstance\": \"/shots/seq_qt_tc/sh010 shot\", \"vSyncOn\": true, \"vSyncTrack\": \"Video1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"12cce00c-eadf-4abd-ac80-0816a24506ab\", \"publish\": true}" + }, + "clip_index": "12cce00c-eadf-4abd-ac80-0816a24506ab", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "12cce00c-eadf-4abd-ac80-0816a24506ab", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/seq_qt_tc/sh010 shot", + "vSyncOn": true, + "vSyncTrack": "Video1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_qt_tc/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_qt_tc", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_qt_tc", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "1d11a6b5-cc2b-49d8-8bcb-35187c785b22", + "label": "/shots/seq_qt_tc/sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "6f4bbf76-6638-4645-9059-0f516c0c12c2", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_qt_tc", + "folder_type": "sequence" + } + ], + "productName": "plateVideo1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_qt_tc", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "5dc397e0-1142-4a35-969d-d4c35c512f0f", + "variant": "Video1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "12cce00c-eadf-4abd-ac80-0816a24506ab", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 68, + "clipIn": 86516, + "clipOut": 86584, + "folderPath": "/shots/seq_qt_tc/sh010", + "fps": "from_selection", + "frameEnd": 1069, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 14, + "sourceOut": 82, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_qt_tc/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_qt_tc", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_qt_tc", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "6f4bbf76-6638-4645-9059-0f516c0c12c2", + "label": "/shots/seq_qt_tc/sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_qt_tc", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_qt_tc", + "shot": "sh###", + "sourceResolution": false, + "task": "Generic", + "track": "{_track_}", + "uuid": "5dc397e0-1142-4a35-969d-d4c35c512f0f", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 86448.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ExternalReference.1", + "metadata": {}, + "name": "qt_embedded_tc.mov", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 100.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 86400.0 + } + }, + "available_image_bounds": null, + "target_url": "C:\\data\\qt_embedded_tc.mov" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/qt_review.json b/tests/client/ayon_core/pipeline/editorial/resources/qt_review.json new file mode 100644 index 0000000000..4dabb7d58f --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/qt_review.json @@ -0,0 +1,356 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "3 jours dans les coulisses du ZEvent 2024.mp4", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 50.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "0": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "1000": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "0": { + "Value": 0.8, + "Variant Type": "Double" + }, + "1000": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/seq_qt_no_tc/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"c3d9fb4f-afdf-49e3-9733-bf80e40e0de3\", \"clip_source_resolution\": {\"width\": \"640\", \"height\": \"360\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_no_tc\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_qt_no_tc\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_qt_no_tc\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_no_tc\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5ab44838-a173-422a-8750-d5265e5a4ab5\", \"reviewTrack\": \"Video1\", \"label\": \"/shots/seq_qt_no_tc/sh010 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"ba8e76cd-7319-449d-93b5-93fd65cf3e83\", \"creator_attributes\": {\"folderPath\": \"/shots/seq_qt_no_tc/sh010\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1051, \"clipIn\": 86477, \"clipOut\": 86527, \"clipDuration\": 50, \"sourceIn\": 0, \"sourceOut\": 50, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"plateVideo1\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"Video1\", \"folderPath\": \"/shots/seq_qt_no_tc/sh010\", \"task\": \"Generic\", \"clip_variant\": \"\", \"clip_index\": \"c3d9fb4f-afdf-49e3-9733-bf80e40e0de3\", \"clip_source_resolution\": {\"width\": \"640\", \"height\": \"360\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_no_tc\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_qt_no_tc\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_qt_no_tc\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_qt_no_tc\", \"track\": \"Video1\", \"shot\": \"sh010\"}, \"heroTrack\": true, \"uuid\": \"5ab44838-a173-422a-8750-d5265e5a4ab5\", \"reviewTrack\": \"Video1\", \"parent_instance_id\": \"ba8e76cd-7319-449d-93b5-93fd65cf3e83\", \"label\": \"/shots/seq_qt_no_tc/sh010 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"4a1cd220-c638-4e77-855c-cebd43b5dbc3\", \"creator_attributes\": {\"parentInstance\": \"/shots/seq_qt_no_tc/sh010 shot\", \"vSyncOn\": true, \"vSyncTrack\": \"Video1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"c3d9fb4f-afdf-49e3-9733-bf80e40e0de3\", \"publish\": true}" + }, + "clip_index": "c3d9fb4f-afdf-49e3-9733-bf80e40e0de3", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "c3d9fb4f-afdf-49e3-9733-bf80e40e0de3", + "clip_source_resolution": { + "height": "360", + "pixelAspect": 1.0, + "width": "640" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/seq_qt_no_tc/sh010 shot", + "vSyncOn": true, + "vSyncTrack": "Video1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_qt_no_tc/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_qt_no_tc", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_qt_no_tc", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "4a1cd220-c638-4e77-855c-cebd43b5dbc3", + "label": "/shots/seq_qt_no_tc/sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "ba8e76cd-7319-449d-93b5-93fd65cf3e83", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_qt_no_tc", + "folder_type": "sequence" + } + ], + "productName": "plateVideo1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_qt_no_tc", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "5ab44838-a173-422a-8750-d5265e5a4ab5", + "variant": "Video1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "c3d9fb4f-afdf-49e3-9733-bf80e40e0de3", + "clip_source_resolution": { + "height": "360", + "pixelAspect": 1.0, + "width": "640" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 50, + "clipIn": 86477, + "clipOut": 86527, + "folderPath": "/shots/seq_qt_no_tc/sh010", + "fps": "from_selection", + "frameEnd": 1051, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 0, + "sourceOut": 50, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_qt_no_tc/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_qt_no_tc", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_qt_no_tc", + "shot": "sh010", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "ba8e76cd-7319-449d-93b5-93fd65cf3e83", + "label": "/shots/seq_qt_no_tc/sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_qt_no_tc", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_qt_no_tc", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "5ab44838-a173-422a-8750-d5265e5a4ab5", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 25.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ExternalReference.1", + "metadata": {}, + "name": "3 jours dans les coulisses du ZEvent 2024.mp4", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 30822.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url": "C:\\data\\movie.mp4" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py new file mode 100644 index 0000000000..3623f6129d --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py @@ -0,0 +1,180 @@ +import mock +import os +import pytest +from typing import NamedTuple + +import opentimelineio as otio + +import ayon_core.lib +from ayon_core.plugins.publish import extract_otio_review + + +_RESOURCE_DIR = os.path.join( + os.path.dirname(__file__), + "resources" +) + + +class MockInstance(): + """ Mock pyblish instance for testing purpose. + """ + def __init__(self, data: dict): + self.data = data + self.context = self + + +class CaptureFFmpegCalls(): + """ Mock calls made to ffmpeg subprocess. + """ + def __init__(self): + self.calls = [] + + def append_call(self, *args, **kwargs): + ffmpeg_args_list, = args + self.calls.append(" ".join(ffmpeg_args_list)) + return True + + def get_fmpeg_executable(self, _): + return ["/path/to/ffmpeg"] + + +def run_process(file_name: str): + """ + """ + # Get OTIO review data from serialized file_name + file_path = os.path.join(_RESOURCE_DIR, file_name) + clip = otio.schema.Clip.from_json_file(file_path) + + # Prepare dummy instance and capture call object + capture_call = CaptureFFmpegCalls() + processor = extract_otio_review.ExtractOTIOReview() + instance = MockInstance({ + "otioReviewClips": [clip], + "handleStart": 10, + "handleEnd": 10, + "workfileFrameStart": 1001, + "folderPath": "/dummy/path", + "anatomy": NamedTuple("Anatomy", [('project_name', "test_project")]) + }) + + # Mock calls to extern and run plugins. + with mock.patch.object( + extract_otio_review, + "get_ffmpeg_tool_args", + side_effect=capture_call.get_fmpeg_executable, + ): + with mock.patch.object( + extract_otio_review, + "run_subprocess", + side_effect=capture_call.append_call, + ): + with mock.patch.object( + processor, + "_get_folder_name_based_prefix", + return_value="C:/result/output." + ): + processor.process(instance) + + # return all calls made to ffmpeg subprocess + return capture_call.calls + + +def test_image_sequence_with_embedded_tc_and_handles_out_of_range(): + """ + Img sequence clip (embedded timecode 1h/24fps) + available_files = 1000-1100 + available_range = 87399-87500 24fps + source_range = 87399-87500 24fps + """ + calls = run_process("img_seq_embedded_tc_review.json") + + expected = [ + # 10 head black handles generated from gap (991-1000) + "/path/to/ffmpeg -t 0.4166666666666667 -r 24.0 -f lavfi -i " + "color=c=black:s=1280x720 -tune stillimage -start_number 991 " + "C:/result/output.%03d.jpg", + + # 10 tail black handles generated from gap (1102-1111) + "/path/to/ffmpeg -t 0.4166666666666667 -r 24.0 -f lavfi -i " + "color=c=black:s=1280x720 -tune stillimage -start_number 1102 " + "C:/result/output.%03d.jpg", + + # Report from source exr (1001-1101) with enforce framerate + "/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i " + "C:\\exr_embedded_tc\\output.%04d.exr -start_number 1001 " + "C:/result/output.%03d.jpg" + ] + + assert calls == expected + + +def test_image_sequence_and_handles_out_of_range(): + """ + Img sequence clip (no timecode) + available_files = 1000-1100 + available_range = 0-101 25fps + source_range = 5-91 24fps + """ + calls = run_process("img_seq_review.json") + + expected = [ + # 5 head black frames generated from gap (991-995) + "/path/to/ffmpeg -t 0.2 -r 25.0 -f lavfi -i color=c=black:s=1280x720 -tune " + "stillimage -start_number 991 C:/result/output.%03d.jpg", + + # 9 tail back frames generated from gap (1097-1105) + "/path/to/ffmpeg -t 0.36 -r 25.0 -f lavfi -i color=c=black:s=1280x720 -tune " + "stillimage -start_number 1097 C:/result/output.%03d.jpg", + + # Report from source tiff (996-1096) + # 996-1000 = additional 5 head frames + # 1001-1095 = source range conformed to 25fps + # 1096-1096 = additional 1 tail frames + "/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i " + "C:\\tif_seq\\output.%04d.tif -start_number 996 C:/result/output.%03d.jpg" + ] + + assert calls == expected + + +def test_movie_with_embedded_tc_no_gap_handles(): + """ + Qt movie clip (embedded timecode 1h/24fps) + available_range = 86400-86500 24fps + source_range = 86414-86482 24fps + """ + calls = run_process("qt_embedded_tc_review.json") + + expected = [ + # Handles are all included in media available range. + # Extract source range from Qt + # - first_frame = 14 src - 10 (head tail) = frame 4 = 0.1666s + # - duration = 68fr (source) + 20fr (handles) = 88frames = 3.666s + "/path/to/ffmpeg -ss 0.16666666666666666 -t 3.6666666666666665 " + "-i C:\\data\\qt_embedded_tc.mov -start_number 991 " + "C:/result/output.%03d.jpg" + ] + + assert calls == expected + + +def test_movie_tail_gap_handles(): + """ + Qt movie clip (embedded timecode 1h/24fps) + available_range = 0-30822 25fps + source_range = 0-50 24fps + """ + calls = run_process("qt_review.json") + + expected = [ + # 10 head black frames generated from gap (991-1000) + "/path/to/ffmpeg -t 0.4 -r 25.0 -f lavfi -i color=c=black:s=1280x720 -tune " + "stillimage -start_number 991 C:/result/output.%03d.jpg", + + # source range + 10 tail frames + # duration = 50fr (source) + 10fr (tail handle) = 60 fr = 2.4s + "/path/to/ffmpeg -ss 0.0 -t 2.4 -i C:\\data\\movie.mp4 -start_number 1001 " + "C:/result/output.%03d.jpg" + ] + + assert calls == expected From 4b27971a8e6d292d4f06c21733dca33be40a017d Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 24 Sep 2024 17:26:37 -0400 Subject: [PATCH 14/28] Adjust comment. --- client/ayon_core/plugins/publish/extract_otio_review.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index d1ac019c3a..01cd974dad 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -320,8 +320,8 @@ def _trim_available_range(self, avl_range, start, duration): avl_start = avl_range.start_time avl_duration = avl_range.duration - # A gap is required before available range - # range to conform start point. + # An additional gap is required before the available + # range to conform source start point and head handles. if start < avl_start: gap_duration = avl_start - start start = avl_start @@ -332,8 +332,9 @@ def _trim_available_range(self, avl_range, start, duration): # generate used frames self._generate_used_frames(gap_duration.round().to_frames()) - # A gap is required after available range - # if media duration is shorter then clip requirement + # An additional gap is required after the available + # range to conform to source end point + tail handles + # (media duration is shorter then clip requirement). end_point = start + duration avl_end_point = avl_range.end_time_exclusive() if end_point > avl_end_point: From 885f8acd2b59748facb35b2b64b244bd4d670493 Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Tue, 24 Sep 2024 17:33:17 -0400 Subject: [PATCH 15/28] Update client/ayon_core/pipeline/editorial.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/editorial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 7d6d6f5882..2dc15bd645 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -277,8 +277,8 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): # to frame numbers from source sequence. media_ref = otio_clip.media_reference is_input_sequence = ( - hasattr(otio.schema, "ImageSequenceReference") and - isinstance(media_ref, otio.schema.ImageSequenceReference) + hasattr(otio.schema, "ImageSequenceReference") + and isinstance(media_ref, otio.schema.ImageSequenceReference) ) if is_input_sequence: From 2980f100400ca3951cd82c8fd6c70b346733e1fa Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 25 Sep 2024 16:06:24 +0200 Subject: [PATCH 16/28] Add client path to sys.path and run repository from code - Added client path to sys.path in conftest.py - Implemented function to run the repository from code in manage.ps1 --- tests/conftest.py | 9 +++++++++ tools/manage.ps1 | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000000..a3c46a9dd7 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,9 @@ +import sys +from pathlib import Path + +client_path = Path(__file__).resolve().parent.parent / "client" + +# add client path to sys.path +sys.path.append(str(client_path)) + +print(f"Added {client_path} to sys.path") diff --git a/tools/manage.ps1 b/tools/manage.ps1 index 23c52d57be..1fb57fe445 100755 --- a/tools/manage.ps1 +++ b/tools/manage.ps1 @@ -233,6 +233,13 @@ function Invoke-Codespell { & $Poetry $CodespellArgs } +function Run-From-Code { + $Poetry = "$RepoRoot\.poetry\bin\poetry.exe" + $RunArgs = @( "run") + + & $Poetry $RunArgs @arguments +} + function Write-Help { <# .SYNOPSIS @@ -248,6 +255,7 @@ function Write-Help { Write-Info -Text " ruff-check ", "Run Ruff check for the repository" -Color White, Cyan Write-Info -Text " ruff-fix ", "Run Ruff fix for the repository" -Color White, Cyan Write-Info -Text " codespell ", "Run codespell check for the repository" -Color White, Cyan + Write-Info -Text " run ", "Run the repository" -Color White, Cyan Write-Host "" } @@ -269,6 +277,9 @@ function Resolve-Function { } elseif ($FunctionName -eq "codespell") { Set-Cwd Invoke-CodeSpell + } elseif ($FunctionName -eq "run") { + Set-Cwd + Run-From-Code } else { Write-Host "Unknown function ""$FunctionName""" Write-Help From 7a83b8ec97d36ed489b3b7b1ac7e8013c287aa79 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 25 Sep 2024 13:06:28 -0400 Subject: [PATCH 17/28] Add test for tail handles only. --- .../plugins/publish/extract_otio_review.py | 4 +- .../resources/qt_handle_tail_review.json | 417 ++++++++++++++++++ .../editorial/test_extract_otio_review.py | 27 +- 3 files changed, 444 insertions(+), 4 deletions(-) create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/qt_handle_tail_review.json diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index 01cd974dad..dfc028a785 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -344,12 +344,12 @@ def _trim_available_range(self, avl_range, start, duration): # create gap data to disk self._render_seqment( gap=gap_duration.round().to_frames(), - end_offset=avl_duration.to_frames() + end_offset=duration.to_frames() ) # generate used frames self._generate_used_frames( gap_duration.round().to_frames(), - end_offset=avl_duration.to_frames() + end_offset=duration.to_frames() ) # return correct trimmed range diff --git a/tests/client/ayon_core/pipeline/editorial/resources/qt_handle_tail_review.json b/tests/client/ayon_core/pipeline/editorial/resources/qt_handle_tail_review.json new file mode 100644 index 0000000000..5d97628c47 --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/qt_handle_tail_review.json @@ -0,0 +1,417 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": { + "Resolve_OTIO": {} + }, + "name": "qt_no_tc_24fps.mov", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 66.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 35.0 + } + }, + "effects": [ + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Transform", + "Enabled": true, + "Name": "Transform", + "Parameters": [], + "Type": 2 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Cropping", + "Enabled": true, + "Name": "Cropping", + "Parameters": [], + "Type": 3 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Dynamic Zoom", + "Enabled": false, + "Name": "Dynamic Zoom", + "Parameters": [ + { + "Default Parameter Value": [ + 0.0, + 0.0 + ], + "Key Frames": { + "-35": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + "965": { + "Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + } + }, + "Parameter ID": "dynamicZoomCenter", + "Parameter Value": [ + 0.0, + 0.0 + ], + "Variant Type": "POINTF" + }, + { + "Default Parameter Value": 1.0, + "Key Frames": { + "-35": { + "Value": 0.8, + "Variant Type": "Double" + }, + "965": { + "Value": 1.0, + "Variant Type": "Double" + } + }, + "Parameter ID": "dynamicZoomScale", + "Parameter Value": 1.0, + "Variant Type": "Double", + "maxValue": 100.0, + "minValue": 0.01 + } + ], + "Type": 59 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Composite", + "Enabled": true, + "Name": "Composite", + "Parameters": [], + "Type": 1 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Lens Correction", + "Enabled": true, + "Name": "Lens Correction", + "Parameters": [], + "Type": 43 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Retime and Scaling", + "Enabled": true, + "Name": "Retime and Scaling", + "Parameters": [], + "Type": 22 + } + }, + "name": "", + "effect_name": "Resolve Effect" + }, + { + "OTIO_SCHEMA": "Effect.1", + "metadata": { + "Resolve_OTIO": { + "Effect Name": "Video Faders", + "Enabled": true, + "Name": "Video Faders", + "Parameters": [], + "Type": 36 + } + }, + "name": "", + "effect_name": "Resolve Effect" + } + ], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "Resolve_OTIO": { + "Keywords": [], + "Note": "{\"resolve_sub_products\": {\"io.ayon.creators.resolve.shot\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"shot\", \"productName\": \"shotMain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.shot\", \"variant\": \"Main\", \"folderPath\": \"/shots/seq_native_otio_resolve/sh040\", \"task\": \"Generic\", \"clip_variant\": \"main\", \"clip_index\": \"1c8b84d2-4cf0-4528-9854-5c13a7ab64f7\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_native_otio_resolve\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_native_otio_resolve\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_native_otio_resolve\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_native_otio_resolve\", \"track\": \"Video1\", \"shot\": \"sh040\"}, \"heroTrack\": true, \"uuid\": \"6259d185-d57e-444f-b667-b5970a67a655\", \"reviewTrack\": \"Video1\", \"label\": \"/shots/seq_native_otio_resolve/sh040 shot\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"24c94533-8ae5-490c-98cf-cd3a27183d3e\", \"creator_attributes\": {\"folderPath\": \"/shots/seq_native_otio_resolve/sh040\", \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"frameStart\": 1001, \"frameEnd\": 1067, \"clipIn\": 87088, \"clipOut\": 87154, \"clipDuration\": 66, \"sourceIn\": 35, \"sourceOut\": 101, \"fps\": \"from_selection\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.plate\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"plate\", \"productName\": \"platemain\", \"active\": true, \"creator_identifier\": \"io.ayon.creators.resolve.plate\", \"variant\": \"main\", \"folderPath\": \"/shots/seq_native_otio_resolve/sh040\", \"task\": \"Generic\", \"clip_variant\": \"main\", \"clip_index\": \"1c8b84d2-4cf0-4528-9854-5c13a7ab64f7\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_native_otio_resolve\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_native_otio_resolve\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_native_otio_resolve\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_native_otio_resolve\", \"track\": \"Video1\", \"shot\": \"sh040\"}, \"heroTrack\": true, \"uuid\": \"6259d185-d57e-444f-b667-b5970a67a655\", \"reviewTrack\": \"Video1\", \"parent_instance_id\": \"24c94533-8ae5-490c-98cf-cd3a27183d3e\", \"label\": \"/shots/seq_native_otio_resolve/sh040 plate\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"92adedc5-4e65-4a0a-9f09-e6522f2327d2\", \"creator_attributes\": {\"parentInstance\": \"/shots/seq_native_otio_resolve/sh040 shot\", \"vSyncOn\": true, \"vSyncTrack\": \"Video1\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}, \"io.ayon.creators.resolve.audio\": {\"id\": \"pyblish.avalon.instance\", \"productType\": \"audio\", \"productName\": \"audioMain\", \"active\": false, \"creator_identifier\": \"io.ayon.creators.resolve.audio\", \"variant\": \"Main\", \"folderPath\": \"/shots/seq_native_otio_resolve/sh040\", \"task\": \"Generic\", \"clip_variant\": \"main\", \"clip_index\": \"1c8b84d2-4cf0-4528-9854-5c13a7ab64f7\", \"clip_source_resolution\": {\"width\": \"1920\", \"height\": \"1080\", \"pixelAspect\": 1.0}, \"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_native_otio_resolve\", \"track\": \"{_track_}\", \"shot\": \"sh###\", \"hierarchy\": \"shots/seq_native_otio_resolve\", \"sourceResolution\": true, \"workfileFrameStart\": 1001, \"handleStart\": 10, \"handleEnd\": 10, \"parents\": [{\"folder_type\": \"folder\", \"entity_name\": \"shots\"}, {\"folder_type\": \"sequence\", \"entity_name\": \"seq_native_otio_resolve\"}], \"hierarchyData\": {\"folder\": \"shots\", \"episode\": \"ep01\", \"sequence\": \"seq_native_otio_resolve\", \"track\": \"Video1\", \"shot\": \"sh040\"}, \"heroTrack\": true, \"uuid\": \"6259d185-d57e-444f-b667-b5970a67a655\", \"reviewTrack\": \"Video1\", \"parent_instance_id\": \"24c94533-8ae5-490c-98cf-cd3a27183d3e\", \"label\": \"/shots/seq_native_otio_resolve/sh040 audio\", \"has_promised_context\": true, \"newHierarchyIntegration\": true, \"newAssetPublishing\": true, \"instance_id\": \"f22878b9-e9d2-415f-93f7-784474d2ff2f\", \"creator_attributes\": {\"parentInstance\": \"/shots/seq_native_otio_resolve/sh040 shot\"}, \"publish_attributes\": {\"CollectSlackFamilies\": {\"additional_message\": \"\"}}}}, \"clip_index\": \"1c8b84d2-4cf0-4528-9854-5c13a7ab64f7\", \"publish\": true}" + }, + "clip_index": "1c8b84d2-4cf0-4528-9854-5c13a7ab64f7", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.audio": { + "active": false, + "clip_index": "1c8b84d2-4cf0-4528-9854-5c13a7ab64f7", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "main", + "creator_attributes": { + "parentInstance": "/shots/seq_native_otio_resolve/sh040 shot" + }, + "creator_identifier": "io.ayon.creators.resolve.audio", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_native_otio_resolve/sh040", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_native_otio_resolve", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_native_otio_resolve", + "shot": "sh040", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "f22878b9-e9d2-415f-93f7-784474d2ff2f", + "label": "/shots/seq_native_otio_resolve/sh040 audio", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "24c94533-8ae5-490c-98cf-cd3a27183d3e", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_native_otio_resolve", + "folder_type": "sequence" + } + ], + "productName": "audioMain", + "productType": "audio", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_native_otio_resolve", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "6259d185-d57e-444f-b667-b5970a67a655", + "variant": "Main", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "1c8b84d2-4cf0-4528-9854-5c13a7ab64f7", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "main", + "creator_attributes": { + "parentInstance": "/shots/seq_native_otio_resolve/sh040 shot", + "vSyncOn": true, + "vSyncTrack": "Video1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_native_otio_resolve/sh040", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_native_otio_resolve", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_native_otio_resolve", + "shot": "sh040", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "92adedc5-4e65-4a0a-9f09-e6522f2327d2", + "label": "/shots/seq_native_otio_resolve/sh040 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "24c94533-8ae5-490c-98cf-cd3a27183d3e", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_native_otio_resolve", + "folder_type": "sequence" + } + ], + "productName": "platemain", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_native_otio_resolve", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "6259d185-d57e-444f-b667-b5970a67a655", + "variant": "main", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "1c8b84d2-4cf0-4528-9854-5c13a7ab64f7", + "clip_source_resolution": { + "height": "1080", + "pixelAspect": 1.0, + "width": "1920" + }, + "clip_variant": "main", + "creator_attributes": { + "clipDuration": 66, + "clipIn": 87088, + "clipOut": 87154, + "folderPath": "/shots/seq_native_otio_resolve/sh040", + "fps": "from_selection", + "frameEnd": 1067, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 35, + "sourceOut": 101, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "shots", + "folderPath": "/shots/seq_native_otio_resolve/sh040", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/seq_native_otio_resolve", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "seq_native_otio_resolve", + "shot": "sh040", + "track": "Video1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "24c94533-8ae5-490c-98cf-cd3a27183d3e", + "label": "/shots/seq_native_otio_resolve/sh040 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "seq_native_otio_resolve", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video1", + "sequence": "seq_native_otio_resolve", + "shot": "sh###", + "sourceResolution": true, + "task": "Generic", + "track": "{_track_}", + "uuid": "6259d185-d57e-444f-b667-b5970a67a655", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AyonData", + "color": "GREEN", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 68.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ExternalReference.1", + "metadata": {}, + "name": "qt_no_tc_24fps.mov", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 0.0 + } + }, + "available_image_bounds": null, + "target_url": "C:\\data\\qt_no_tc_24fps.mov" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py index 3623f6129d..f266a40f50 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py +++ b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py @@ -158,9 +158,9 @@ def test_movie_with_embedded_tc_no_gap_handles(): assert calls == expected -def test_movie_tail_gap_handles(): +def test_short_movie_head_gap_handles(): """ - Qt movie clip (embedded timecode 1h/24fps) + Qt movie clip. available_range = 0-30822 25fps source_range = 0-50 24fps """ @@ -178,3 +178,26 @@ def test_movie_tail_gap_handles(): ] assert calls == expected + + +def test_short_movie_tail_gap_handles(): + """ + Qt movie clip. + available_range = 0-101 24fps + source_range = 35-101 24fps + """ + calls = run_process("qt_handle_tail_review.json") + + expected = [ + # 10 tail black frames generated from gap (1067-1076) + "/path/to/ffmpeg -t 0.4166666666666667 -r 24.0 -f lavfi -i " + "color=c=black:s=1280x720 -tune stillimage -start_number 1067 " + "C:/result/output.%03d.jpg", + + # 10 head frames + source range + # duration = 10fr (head handle) + 66fr (source) = 76fr = 3.16s + "/path/to/ffmpeg -ss 1.0416666666666667 -t 3.1666666666666665 -i " + "C:\\data\\qt_no_tc_24fps.mov -start_number 991 C:/result/output.%03d.jpg" + ] + + assert calls == expected From a10f0e5968068d4c747f52669c623fd5b8c86c65 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 25 Sep 2024 17:52:46 -0400 Subject: [PATCH 18/28] Implement linux counterpart to manage.sh --- tools/manage.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/manage.sh b/tools/manage.sh index 923953bf96..02648e3775 100755 --- a/tools/manage.sh +++ b/tools/manage.sh @@ -157,6 +157,7 @@ default_help() { echo -e " ${BWhite}ruff-check${RST} ${BCyan}Run Ruff check for the repository${RST}" echo -e " ${BWhite}ruff-fix${RST} ${BCyan}Run Ruff fix for the repository${RST}" echo -e " ${BWhite}codespell${RST} ${BCyan}Run codespell check for the repository${RST}" + echo -e " ${BWhite}run${RST} ${BCyan}Run the repository${RST}" echo "" } @@ -175,6 +176,12 @@ run_codespell () { "$POETRY_HOME/bin/poetry" run codespell } +run_command () { + echo -e "${BIGreen}>>>${RST} Running ..." + shift; # will remove first arg ("run") from the "$@" + "$POETRY_HOME/bin/poetry" run "$@" +} + main () { detect_python || return 1 @@ -207,6 +214,10 @@ main () { run_codespell || return_code=$? exit $return_code ;; + "run") + run_command "$@" || return_code=$? + exit $return_code + ;; esac if [ "$function_name" != "" ]; then From beee0efab3593416d261c81451ae828d104f9c13 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 30 Sep 2024 09:59:01 -0400 Subject: [PATCH 19/28] Adjust feedback from PR. --- client/ayon_core/plugins/publish/extract_otio_review.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index dfc028a785..30c6dfd424 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -113,13 +113,16 @@ def process(self, instance): # get from media reference metadata source # TODO 'openpype' prefix should be removed (added 24/09/03) # NOTE it looks like it is set only in hiero integration - for variable, key in zip(variables, keys): + res_data = {"width": self.to_width, "height": self.to_height} + for key in res_data: for meta_prefix in ("ayon.source.", "openpype.source."): meta_key = f"{meta_prefix}.{key}" - if media_metadata.get(meta_key): - variable = media_metadata[meta_key] + value = media_metadata.get(meta_key) + if value is not None: + res_data[key] = value break + self.to_width, self.to_height = res_data["width"], res_data["height"] self.log.debug("> self.to_width x self.to_height: {} x {}".format( self.to_width, self.to_height )) From 3a75ebcc8935ae5fd0f0dd69044e9ea272296e59 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 30 Sep 2024 15:29:57 -0400 Subject: [PATCH 20/28] Adjust manage.sh and manage.ps1 run documentation. --- tools/manage.ps1 | 2 +- tools/manage.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/manage.ps1 b/tools/manage.ps1 index 1fb57fe445..9a9a9a2eff 100755 --- a/tools/manage.ps1 +++ b/tools/manage.ps1 @@ -255,7 +255,7 @@ function Write-Help { Write-Info -Text " ruff-check ", "Run Ruff check for the repository" -Color White, Cyan Write-Info -Text " ruff-fix ", "Run Ruff fix for the repository" -Color White, Cyan Write-Info -Text " codespell ", "Run codespell check for the repository" -Color White, Cyan - Write-Info -Text " run ", "Run the repository" -Color White, Cyan + Write-Info -Text " run ", "Run a poetry command in the repository environment" -Color White, Cyan Write-Host "" } diff --git a/tools/manage.sh b/tools/manage.sh index 02648e3775..6b0a4d6978 100755 --- a/tools/manage.sh +++ b/tools/manage.sh @@ -157,7 +157,7 @@ default_help() { echo -e " ${BWhite}ruff-check${RST} ${BCyan}Run Ruff check for the repository${RST}" echo -e " ${BWhite}ruff-fix${RST} ${BCyan}Run Ruff fix for the repository${RST}" echo -e " ${BWhite}codespell${RST} ${BCyan}Run codespell check for the repository${RST}" - echo -e " ${BWhite}run${RST} ${BCyan}Run the repository${RST}" + echo -e " ${BWhite}run${RST} ${BCyan}Run a poetry command in the repository environment${RST}" echo "" } From 93793655ea2e29ade756bbc66c4087280beeecd4 Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Tue, 1 Oct 2024 08:00:43 -0400 Subject: [PATCH 21/28] Update client/ayon_core/plugins/publish/extract_otio_review.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/plugins/publish/extract_otio_review.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index 30c6dfd424..a7ef819c5d 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -107,9 +107,6 @@ def process(self, instance): otio_media = r_otio_cl.media_reference media_metadata = otio_media.metadata - variables = (self.to_width, self.to_height) - keys = ("width", "height") - # get from media reference metadata source # TODO 'openpype' prefix should be removed (added 24/09/03) # NOTE it looks like it is set only in hiero integration From d69edc69d5ce5201f9185402395374f8e58416ea Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 1 Oct 2024 17:10:41 -0400 Subject: [PATCH 22/28] Add backward-compatibility for relative source ranges. --- client/ayon_core/pipeline/editorial.py | 33 ++- .../resources/legacy_img_sequence.json | 216 ++++++++++++++++++ .../test_media_range_with_retimes.py | 20 ++ 3 files changed, 260 insertions(+), 9 deletions(-) create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/legacy_img_sequence.json diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 2dc15bd645..8d81737533 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -178,6 +178,30 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): available_range = otio_clip.available_range() available_range_rate = available_range.start_time.rate + # If media source is an image sequence, returned + # mediaIn/mediaOut have to correspond + # to frame numbers from source sequence. + media_ref = otio_clip.media_reference + is_input_sequence = ( + hasattr(otio.schema, "ImageSequenceReference") + and isinstance(media_ref, otio.schema.ImageSequenceReference) + ) + + # Temporary. + # Some AYON custom OTIO exporter were implemented with relative + # source range for image sequence. Following code maintain + # backward-compatibility by adjusting available range + # while we are updating those. + if ( + is_input_sequence + and available_range.start_time.to_frames() == media_ref.start_frame + and source_range.start_time.to_frames() < media_ref.start_frame + ): + available_range = _ot.TimeRange( + _ot.RationalTime(0, rate=available_range_rate), + available_range.duration, + ) + # Conform source range bounds to available range rate # .e.g. embedded TC of (3600 sec/ 1h), duration 100 frames # @@ -272,15 +296,6 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): media_in = available_range.start_time.value media_out = available_range.end_time_inclusive().value - # If media source is an image sequence, returned - # mediaIn/mediaOut have to correspond - # to frame numbers from source sequence. - media_ref = otio_clip.media_reference - is_input_sequence = ( - hasattr(otio.schema, "ImageSequenceReference") - and isinstance(media_ref, otio.schema.ImageSequenceReference) - ) - if is_input_sequence: # preserve discrete frame numbers media_in_trimmed = otio.opentime.RationalTime.from_frames( diff --git a/tests/client/ayon_core/pipeline/editorial/resources/legacy_img_sequence.json b/tests/client/ayon_core/pipeline/editorial/resources/legacy_img_sequence.json new file mode 100644 index 0000000000..a50ca102fe --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/legacy_img_sequence.json @@ -0,0 +1,216 @@ +{ + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output.[1000-1100].exr", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 104.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [ + { + "OTIO_SCHEMA": "Marker.2", + "metadata": { + "clip_index": "18b19490-21ea-4533-9e0c-03f434c66f14", + "publish": true, + "resolve_sub_products": { + "io.ayon.creators.resolve.plate": { + "active": true, + "clip_index": "18b19490-21ea-4533-9e0c-03f434c66f14", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "parentInstance": "/shots/sq_old_otio/sh010 shot", + "vSyncOn": true, + "vSyncTrack": "Video 1" + }, + "creator_identifier": "io.ayon.creators.resolve.plate", + "episode": "ep01", + "folder": "/shots/sq_old_otio/sh010", + "folderPath": "/shots/sq_old_otio/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq_old_otio", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq_old_otio", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "d27c5f77-7218-44ca-8061-5b6d33f96116", + "label": "/shots/sq_old_otio/sh010 plate", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parent_instance_id": "24792946-9ac4-4c8d-922f-80a83dea4be1", + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq_old_otio", + "folder_type": "sequence" + } + ], + "productName": "plateVideo_1", + "productType": "plate", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video 1", + "sequence": "sq_old_otio", + "shot": "sh###", + "sourceResolution": false, + "task": null, + "track": "{_track_}", + "uuid": "dec1a40b-7ce8-43cd-94b8-08a53056a171", + "variant": "Video_1", + "workfileFrameStart": 1001 + }, + "io.ayon.creators.resolve.shot": { + "active": true, + "clip_index": "18b19490-21ea-4533-9e0c-03f434c66f14", + "clip_source_resolution": { + "height": "720", + "pixelAspect": 1.0, + "width": "956" + }, + "clip_variant": "", + "creator_attributes": { + "clipDuration": 104, + "clipIn": 90000, + "clipOut": 90104, + "fps": "from_selection", + "frameEnd": 1105, + "frameStart": 1001, + "handleEnd": 10, + "handleStart": 10, + "sourceIn": 0, + "sourceOut": 104, + "workfileFrameStart": 1001 + }, + "creator_identifier": "io.ayon.creators.resolve.shot", + "episode": "ep01", + "folder": "/shots/sq_old_otio/sh010", + "folderPath": "/shots/sq_old_otio/sh010", + "handleEnd": 10, + "handleStart": 10, + "has_promised_context": true, + "heroTrack": true, + "hierarchy": "shots/sq_old_otio", + "hierarchyData": { + "episode": "ep01", + "folder": "shots", + "sequence": "sq_old_otio", + "shot": "sh010", + "track": "Video_1" + }, + "id": "pyblish.avalon.instance", + "instance_id": "24792946-9ac4-4c8d-922f-80a83dea4be1", + "label": "/shots/sq_old_otio/sh010 shot", + "newAssetPublishing": true, + "newHierarchyIntegration": true, + "parents": [ + { + "entity_name": "shots", + "folder_type": "folder" + }, + { + "entity_name": "sq_old_otio", + "folder_type": "sequence" + } + ], + "productName": "shotMain", + "productType": "shot", + "publish_attributes": { + "CollectSlackFamilies": { + "additional_message": "" + } + }, + "reviewTrack": "Video 1", + "sequence": "sq_old_otio", + "shot": "sh###", + "sourceResolution": false, + "task": null, + "track": "{_track_}", + "uuid": "dec1a40b-7ce8-43cd-94b8-08a53056a171", + "variant": "Main", + "workfileFrameStart": 1001 + } + } + }, + "name": "AYONData", + "color": "MINT", + "marked_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 52.0 + } + }, + "comment": "" + } + ], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "height": 720, + "isSequence": true, + "padding": 4, + "pixelAspect": 1.0, + "width": 956 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\legacy\\", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py index 270b01a799..e5f0d335b5 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py +++ b/tests/client/ayon_core/pipeline/editorial/test_media_range_with_retimes.py @@ -146,3 +146,23 @@ def test_img_sequence_with_embedded_tc_and_handles(): "img_seq_embedded_tc.json", expected_data ) + + +def test_img_sequence_relative_source_range(): + """ + Img sequence clip (embedded timecode 1h) + available files = 1000-1100 + source_range = fps + """ + expected_data = { + 'mediaIn': 1000, + 'mediaOut': 1098, + 'handleStart': 0, + 'handleEnd': 2, + 'speed': 1.0 + } + + _check_expected_retimed_values( + "legacy_img_sequence.json", + expected_data + ) From 8182914f112a2790437c986a09d54b08102ce6fb Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Tue, 1 Oct 2024 17:48:44 -0400 Subject: [PATCH 23/28] Fix linting. --- client/ayon_core/pipeline/editorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/editorial.py b/client/ayon_core/pipeline/editorial.py index 8d81737533..f42c0a2fe5 100644 --- a/client/ayon_core/pipeline/editorial.py +++ b/client/ayon_core/pipeline/editorial.py @@ -190,7 +190,7 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end): # Temporary. # Some AYON custom OTIO exporter were implemented with relative # source range for image sequence. Following code maintain - # backward-compatibility by adjusting available range + # backward-compatibility by adjusting available range # while we are updating those. if ( is_input_sequence From 05291b2fe9b46e513c0d8bdae6640e4a36ddb8a8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 2 Oct 2024 11:51:21 +0200 Subject: [PATCH 24/28] ruff suggestions --- .../plugins/publish/extract_otio_review.py | 61 ++++++++++--------- .../editorial/test_extract_otio_review.py | 28 +++++---- 2 files changed, 46 insertions(+), 43 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index 2a0b51b123..55eff782d9 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -57,13 +57,12 @@ def process(self, instance): # Not all hosts can import these modules. import opentimelineio as otio from ayon_core.pipeline.editorial import ( - otio_range_to_frame_range, make_sequence_collection, remap_range_on_file_sequence, is_clip_from_media_sequence ) - # TODO refactore from using instance variable + # TODO refactor from using instance variable self.temp_file_head = self._get_folder_name_based_prefix(instance) # TODO: convert resulting image sequence to mp4 @@ -75,8 +74,8 @@ def process(self, instance): otio_review_clips = instance.data["otioReviewClips"] # add plugin wide attributes - self.representation_files = list() - self.used_frames = list() + self.representation_files = [] + self.used_frames = [] self.workfile_start = int(instance.data.get( "workfileFrameStart", 1001)) - handle_start self.padding = len(str(self.workfile_start)) @@ -101,9 +100,7 @@ def process(self, instance): for index, r_otio_cl in enumerate(otio_review_clips): # QUESTION: what if transition on clip? - # check if resolution is the same - width = self.to_width - height = self.to_height + # check if resolution is the same as source otio_media = r_otio_cl.media_reference media_metadata = otio_media.metadata @@ -151,7 +148,7 @@ def process(self, instance): # Gap: no media, generate range based on source range else: - available_range = processing_range = None + available_range = processing_range = None self.actual_fps = src_range.duration.rate start = src_range.start_time duration = src_range.duration @@ -216,7 +213,7 @@ def process(self, instance): collection.indexes.update( [i for i in range(first, (last + 1))]) # render segment - self._render_seqment( + self._render_segment( sequence=[dirname, collection, input_fps]) # generate used frames self._generate_used_frames( @@ -230,7 +227,7 @@ def process(self, instance): dir_path, collection = collection_data # render segment - self._render_seqment( + self._render_segment( sequence=[dir_path, collection, input_fps]) # generate used frames self._generate_used_frames( @@ -252,7 +249,7 @@ def process(self, instance): duration=processing_range.duration, ) # render video file to sequence - self._render_seqment( + self._render_segment( video=[path, extract_range]) # generate used frames self._generate_used_frames( @@ -261,7 +258,7 @@ def process(self, instance): # QUESTION: what if nested track composition is in place? else: # at last process a Gap - self._render_seqment(gap=duration) + self._render_segment(gap=duration) # generate used frames self._generate_used_frames(duration) @@ -334,7 +331,6 @@ def _trim_available_range(self, avl_range, start, duration): ) avl_start = avl_range.start_time - avl_duration = avl_range.duration # An additional gap is required before the available # range to conform source start point and head handles. @@ -344,7 +340,7 @@ def _trim_available_range(self, avl_range, start, duration): duration -= gap_duration # create gap data to disk - self._render_seqment(gap=gap_duration.round().to_frames()) + self._render_segment(gap=gap_duration.round().to_frames()) # generate used frames self._generate_used_frames(gap_duration.round().to_frames()) @@ -358,7 +354,7 @@ def _trim_available_range(self, avl_range, start, duration): duration -= gap_duration # create gap data to disk - self._render_seqment( + self._render_segment( gap=gap_duration.round().to_frames(), end_offset=duration.to_frames() ) @@ -377,10 +373,10 @@ def _trim_available_range(self, avl_range, start, duration): ) ) - def _render_seqment(self, sequence=None, + def _render_segment(self, sequence=None, video=None, gap=None, end_offset=None): """ - Render seqment into image sequence frames. + Render segment into image sequence frames. Using ffmpeg to convert compatible video and image source to defined image sequence format. @@ -416,18 +412,24 @@ def _render_seqment(self, sequence=None, input_path = os.path.join(input_dir, input_file) input_extension = os.path.splitext(input_path)[-1] - # form command for rendering sequence files - # (need to explicit set the input frame range - # if case input sequence has framerate metadata - # to preserve frame range and avoid silent dropped - # frames caused by input mismatch with FFmpeg default - # rate 25.0 fps) more info refer to FFmpeg image2 demuxer - # - # Implicit - # [Input 100 frames (24fps from metadata)] -> [Demuxer video 25fps] -> [Output 98 frames, dropped 2] - # - # Explicit with "-framerate" - # [Input 100 frames (24fps from metadata)] -> [Demuxer video 24fps] -> [Output 100 frames] + """ + Form Command for Rendering Sequence Files + + To explicitly set the input frame range and preserve the frame + range, avoid silent dropped frames caused by input mismatch + with FFmpeg's default rate of 25.0 fps. For more info, + refer to the FFmpeg image2 demuxer. + + Implicit: + - Input: 100 frames (24fps from metadata) + - Demuxer: video 25fps + - Output: 98 frames, dropped 2 + + Explicit with "-framerate": + - Input: 100 frames (24fps from metadata) + - Demuxer: video 24fps + - Output: 100 frames, no dropped frames + """ command.extend([ "-start_number", str(in_frame_start), @@ -566,4 +568,3 @@ def _get_folder_name_based_prefix(self, instance): self.log.debug(f"file_prefix::{file_prefix}") return file_prefix - diff --git a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py index f266a40f50..0a38301755 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py +++ b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py @@ -1,11 +1,10 @@ import mock import os -import pytest +import pytest # noqa from typing import NamedTuple import opentimelineio as otio -import ayon_core.lib from ayon_core.plugins.publish import extract_otio_review @@ -19,7 +18,7 @@ class MockInstance(): """ Mock pyblish instance for testing purpose. """ def __init__(self, data: dict): - self.data = data + self.data = data self.context = self @@ -34,7 +33,7 @@ def append_call(self, *args, **kwargs): self.calls.append(" ".join(ffmpeg_args_list)) return True - def get_fmpeg_executable(self, _): + def get_ffmpeg_executable(self, _): return ["/path/to/ffmpeg"] @@ -48,20 +47,23 @@ def run_process(file_name: str): # Prepare dummy instance and capture call object capture_call = CaptureFFmpegCalls() processor = extract_otio_review.ExtractOTIOReview() - instance = MockInstance({ - "otioReviewClips": [clip], - "handleStart": 10, - "handleEnd": 10, - "workfileFrameStart": 1001, - "folderPath": "/dummy/path", - "anatomy": NamedTuple("Anatomy", [('project_name', "test_project")]) - }) + Anatomy = NamedTuple("Anatomy", [("project_name")]) + instance = MockInstance( + { + "otioReviewClips": [clip], + "handleStart": 10, + "handleEnd": 10, + "workfileFrameStart": 1001, + "folderPath": "/dummy/path", + "anatomy": Anatomy("test_project"), + } + ) # Mock calls to extern and run plugins. with mock.patch.object( extract_otio_review, "get_ffmpeg_tool_args", - side_effect=capture_call.get_fmpeg_executable, + side_effect=capture_call.get_ffmpeg_executable, ): with mock.patch.object( extract_otio_review, From 7bd382a1874eb22b822790a6461e39d1399956d3 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 2 Oct 2024 11:57:38 +0200 Subject: [PATCH 25/28] Refactor Anatomy NamedTuple for project_name\nUpdate Anatomy NamedTuple to specify project_name as string type. This change ensures consistency and clarity in the codebase. --- .../ayon_core/pipeline/editorial/test_extract_otio_review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py index 0a38301755..7bc1a750d7 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py +++ b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py @@ -47,7 +47,7 @@ def run_process(file_name: str): # Prepare dummy instance and capture call object capture_call = CaptureFFmpegCalls() processor = extract_otio_review.ExtractOTIOReview() - Anatomy = NamedTuple("Anatomy", [("project_name")]) + Anatomy = NamedTuple("Anatomy", project_name=str) instance = MockInstance( { "otioReviewClips": [clip], From 41302936c26156b36627a43a413bd1b95cecd511 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 2 Oct 2024 11:06:29 -0400 Subject: [PATCH 26/28] Fix multiple review clips in OTIO review plugins with tests. --- .../plugins/publish/extract_otio_review.py | 61 +- .../resources/multiple_review_clips.json | 1511 +++++++++++++++++ .../resources/multiple_review_clips_gap.json | 289 ++++ .../editorial/test_extract_otio_review.py | 153 +- 4 files changed, 1969 insertions(+), 45 deletions(-) create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips.json create mode 100644 tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips_gap.json diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index 55eff782d9..00a90df695 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -100,30 +100,30 @@ def process(self, instance): for index, r_otio_cl in enumerate(otio_review_clips): # QUESTION: what if transition on clip? - # check if resolution is the same as source - otio_media = r_otio_cl.media_reference - media_metadata = otio_media.metadata - - # get from media reference metadata source - # TODO 'openpype' prefix should be removed (added 24/09/03) - # NOTE it looks like it is set only in hiero integration - res_data = {"width": self.to_width, "height": self.to_height} - for key in res_data: - for meta_prefix in ("ayon.source.", "openpype.source."): - meta_key = f"{meta_prefix}.{key}" - value = media_metadata.get(meta_key) - if value is not None: - res_data[key] = value - break - - self.to_width, self.to_height = res_data["width"], res_data["height"] - self.log.debug("> self.to_width x self.to_height: {} x {}".format( - self.to_width, self.to_height - )) - # Clip: compute process range from available media range. src_range = r_otio_cl.source_range if isinstance(r_otio_cl, otio.schema.Clip): + # check if resolution is the same as source + media_ref = r_otio_cl.media_reference + media_metadata = media_ref.metadata + + # get from media reference metadata source + # TODO 'openpype' prefix should be removed (added 24/09/03) + # NOTE it looks like it is set only in hiero integration + res_data = {"width": self.to_width, "height": self.to_height} + for key in res_data: + for meta_prefix in ("ayon.source.", "openpype.source."): + meta_key = f"{meta_prefix}.{key}" + value = media_metadata.get(meta_key) + if value is not None: + res_data[key] = value + break + + self.to_width, self.to_height = res_data["width"], res_data["height"] + self.log.debug("> self.to_width x self.to_height: {} x {}".format( + self.to_width, self.to_height + )) + available_range = r_otio_cl.available_range() processing_range = None self.actual_fps = available_range.duration.rate @@ -135,7 +135,6 @@ def process(self, instance): # source range for image sequence. Following code maintain # backward-compatibility by adjusting available range # while we are updating those. - media_ref = r_otio_cl.media_reference if ( is_clip_from_media_sequence(r_otio_cl) and available_range.start_time.to_frames() == media_ref.start_frame @@ -154,11 +153,11 @@ def process(self, instance): duration = src_range.duration # Create handle offsets. - handle_start = otio.opentime.RationalTime( + clip_handle_start = otio.opentime.RationalTime( handle_start, rate=self.actual_fps, ) - handle_end = otio.opentime.RationalTime( + clip_handle_end = otio.opentime.RationalTime( handle_end, rate=self.actual_fps, ) @@ -166,16 +165,16 @@ def process(self, instance): # reframing handles conditions if (len(otio_review_clips) > 1) and (index == 0): # more clips | first clip reframing with handle - start -= handle_start - duration += handle_start + start -= clip_handle_start + duration += clip_handle_start elif len(otio_review_clips) > 1 \ and (index == len(otio_review_clips) - 1): # more clips | last clip reframing with handle - duration += handle_end + duration += clip_handle_end elif len(otio_review_clips) == 1: # one clip | add both handles - start -= handle_start - duration += (handle_start + handle_end) + start -= clip_handle_start + duration += (clip_handle_start + clip_handle_end) if available_range: processing_range = self._trim_available_range( @@ -258,9 +257,9 @@ def process(self, instance): # QUESTION: what if nested track composition is in place? else: # at last process a Gap - self._render_segment(gap=duration) + self._render_segment(gap=duration.to_frames()) # generate used frames - self._generate_used_frames(duration) + self._generate_used_frames(duration.to_frames()) # creating and registering representation representation = self._create_representation(start, duration) diff --git a/tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips.json b/tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips.json new file mode 100644 index 0000000000..dcf60abb7d --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips.json @@ -0,0 +1,1511 @@ +{ + "OTIO_SCHEMA": "Track.1", + "metadata": {}, + "name": "review", + "source_range": null, + "effects": [], + "markers": [], + "enabled": true, + "children": [ + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "scene_linear", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.exr 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "24", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Float16) Open Color IO space: 7", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.exr 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "87399", + "foundry.source.umid": "bbfe0c90-5b76-424a-6351-4dac36a8dde7", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "scene_linear", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "24", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAAFAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAAAAAAC2VkZ2VfcGl4ZWxzAAAABWludDMyAAAAAAAAABFpZ25vcmVfcGFydF9uYW1lcwAAAARib29sAAAAAAhub3ByZWZpeAAAAARib29sAAAAAB5vZmZzZXRfbmVnYXRpdmVfZGlzcGxheV93aW5kb3cAAAAEYm9vbAE=", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.exr.channels": "B:{1 0 1 1},G:{1 0 1 1},R:{1 0 1 1}", + "media.exr.compression": "2", + "media.exr.compressionName": "Zip (1 scanline)", + "media.exr.dataWindow": "1,1,1918,1078", + "media.exr.displayWindow": "0,0,1919,1079", + "media.exr.lineOrder": "0", + "media.exr.nuke.input.frame_rate": "24", + "media.exr.nuke.input.timecode": "01:00:41:15", + "media.exr.pixelAspectRatio": "1", + "media.exr.screenWindowCenter": "0,0", + "media.exr.screenWindowWidth": "1", + "media.exr.type": "scanlineimage", + "media.exr.version": "1", + "media.input.bitsperchannel": "16-bit half float", + "media.input.ctime": "2024-09-23 08:37:23", + "media.input.filereader": "exr", + "media.input.filesize": "1095868", + "media.input.frame": "1", + "media.input.frame_rate": "24", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:37:23", + "media.input.timecode": "01:00:41:15", + "media.input.width": "1920", + "media.nuke.full_layer_names": "0", + "media.nuke.node_hash": "9b", + "media.nuke.version": "15.1v2", + "openpype.source.colourtransform": "scene_linear", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\with_tc", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "scene_linear", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.exr 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "24", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Float16) Open Color IO space: 7", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.exr 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "87399", + "foundry.source.umid": "bbfe0c90-5b76-424a-6351-4dac36a8dde7", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "scene_linear", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "24", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAAFAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAAAAAAC2VkZ2VfcGl4ZWxzAAAABWludDMyAAAAAAAAABFpZ25vcmVfcGFydF9uYW1lcwAAAARib29sAAAAAAhub3ByZWZpeAAAAARib29sAAAAAB5vZmZzZXRfbmVnYXRpdmVfZGlzcGxheV93aW5kb3cAAAAEYm9vbAE=", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.exr.channels": "B:{1 0 1 1},G:{1 0 1 1},R:{1 0 1 1}", + "media.exr.compression": "2", + "media.exr.compressionName": "Zip (1 scanline)", + "media.exr.dataWindow": "1,1,1918,1078", + "media.exr.displayWindow": "0,0,1919,1079", + "media.exr.lineOrder": "0", + "media.exr.nuke.input.frame_rate": "24", + "media.exr.nuke.input.timecode": "01:00:41:15", + "media.exr.pixelAspectRatio": "1", + "media.exr.screenWindowCenter": "0,0", + "media.exr.screenWindowWidth": "1", + "media.exr.type": "scanlineimage", + "media.exr.version": "1", + "media.input.bitsperchannel": "16-bit half float", + "media.input.ctime": "2024-09-23 08:37:23", + "media.input.filereader": "exr", + "media.input.filesize": "1095868", + "media.input.frame": "1", + "media.input.frame_rate": "24", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:37:23", + "media.input.timecode": "01:00:41:15", + "media.input.width": "1920", + "media.nuke.full_layer_names": "0", + "media.nuke.node_hash": "9b", + "media.nuke.version": "15.1v2", + "openpype.source.colourtransform": "scene_linear", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\with_tc", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 31.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "matte_paint", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.tif 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "25", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Int8) Open Color IO space: 5", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.tif 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "1000", + "foundry.source.umid": "918126ef-7109-4835-492e-67d31cd7f798", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "matte_paint", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "25", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAABAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAA", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.input.bitsperchannel": "8-bit fixed", + "media.input.ctime": "2024-09-23 08:36:04", + "media.input.filereader": "tiff", + "media.input.filesize": "784446", + "media.input.frame": "1", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:36:04", + "media.input.width": "1920", + "media.tiff.resolution_unit": "1", + "media.tiff.xresolution": "72", + "media.tiff.yresolution": "72", + "openpype.source.colourtransform": "matte_paint", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 25.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\no_tc", + "name_prefix": "output.", + "name_suffix": ".tif", + "start_frame": 1000, + "frame_step": 1, + "rate": 25.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + } + ], + "kind": "Video" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips_gap.json b/tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips_gap.json new file mode 100644 index 0000000000..85667a00dc --- /dev/null +++ b/tests/client/ayon_core/pipeline/editorial/resources/multiple_review_clips_gap.json @@ -0,0 +1,289 @@ +{ + "OTIO_SCHEMA": "Track.1", + "metadata": {}, + "name": "Video 2", + "source_range": null, + "effects": [], + "markers": [], + "enabled": true, + "children": [ + { + "OTIO_SCHEMA": "Gap.1", + "metadata": {}, + "name": "", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 2.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 88.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default ()", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "scene_linear", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.exr 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "24", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Float16) Open Color IO space: 7", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.exr 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "87399", + "foundry.source.umid": "bbfe0c90-5b76-424a-6351-4dac36a8dde7", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "scene_linear", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "24", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAAFAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAAAAAAC2VkZ2VfcGl4ZWxzAAAABWludDMyAAAAAAAAABFpZ25vcmVfcGFydF9uYW1lcwAAAARib29sAAAAAAhub3ByZWZpeAAAAARib29sAAAAAB5vZmZzZXRfbmVnYXRpdmVfZGlzcGxheV93aW5kb3cAAAAEYm9vbAE=", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.exr.channels": "B:{1 0 1 1},G:{1 0 1 1},R:{1 0 1 1}", + "media.exr.compression": "2", + "media.exr.compressionName": "Zip (1 scanline)", + "media.exr.dataWindow": "1,1,1918,1078", + "media.exr.displayWindow": "0,0,1919,1079", + "media.exr.lineOrder": "0", + "media.exr.nuke.input.frame_rate": "24", + "media.exr.nuke.input.timecode": "01:00:41:15", + "media.exr.pixelAspectRatio": "1", + "media.exr.screenWindowCenter": "0,0", + "media.exr.screenWindowWidth": "1", + "media.exr.type": "scanlineimage", + "media.exr.version": "1", + "media.input.bitsperchannel": "16-bit half float", + "media.input.ctime": "2024-09-23 08:37:23", + "media.input.filereader": "exr", + "media.input.filesize": "1095868", + "media.input.frame": "1", + "media.input.frame_rate": "24", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:37:23", + "media.input.timecode": "01:00:41:15", + "media.input.width": "1920", + "media.nuke.full_layer_names": "0", + "media.nuke.node_hash": "9b", + "media.nuke.version": "15.1v2", + "openpype.source.colourtransform": "scene_linear", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\with_tc", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + }, + { + "OTIO_SCHEMA": "Clip.2", + "metadata": {}, + "name": "output", + "source_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 11.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 0.0 + } + }, + "effects": [], + "markers": [], + "enabled": true, + "media_references": { + "DEFAULT_MEDIA": { + "OTIO_SCHEMA": "ImageSequenceReference.1", + "metadata": { + "clip.properties.blendfunc": "0", + "clip.properties.colourspacename": "default ()", + "clip.properties.domainroot": "", + "clip.properties.enabled": "1", + "clip.properties.expanded": "1", + "clip.properties.opacity": "1", + "clip.properties.valuesource": "", + "foundry.source.audio": "", + "foundry.source.bitmapsize": "0", + "foundry.source.bitsperchannel": "0", + "foundry.source.channelformat": "integer", + "foundry.source.colourtransform": "scene_linear", + "foundry.source.duration": "101", + "foundry.source.filename": "output.%04d.exr 1000-1100", + "foundry.source.filesize": "", + "foundry.source.fragments": "101", + "foundry.source.framerate": "24", + "foundry.source.fullpath": "", + "foundry.source.height": "1080", + "foundry.source.layers": "colour", + "foundry.source.pixelAspect": "1", + "foundry.source.pixelAspectRatio": "", + "foundry.source.pixelformat": "RGBA (Float16) Open Color IO space: 7", + "foundry.source.reelID": "", + "foundry.source.resolution": "", + "foundry.source.samplerate": "Invalid", + "foundry.source.shortfilename": "output.%04d.exr 1000-1100", + "foundry.source.shot": "", + "foundry.source.shotDate": "", + "foundry.source.startTC": "", + "foundry.source.starttime": "1000", + "foundry.source.timecode": "87399", + "foundry.source.umid": "bbfe0c90-5b76-424a-6351-4dac36a8dde7", + "foundry.source.umidOriginator": "foundry.source.umid", + "foundry.source.width": "1920", + "foundry.timeline.autodiskcachemode": "Manual", + "foundry.timeline.colorSpace": "scene_linear", + "foundry.timeline.duration": "101", + "foundry.timeline.framerate": "24", + "foundry.timeline.outputformat": "", + "foundry.timeline.poster": "0", + "foundry.timeline.posterLayer": "colour", + "foundry.timeline.readParams": "AAAAAQAAAAAAAAAFAAAACmNvbG9yc3BhY2UAAAAFaW50MzIAAAAAAAAAC2VkZ2VfcGl4ZWxzAAAABWludDMyAAAAAAAAABFpZ25vcmVfcGFydF9uYW1lcwAAAARib29sAAAAAAhub3ByZWZpeAAAAARib29sAAAAAB5vZmZzZXRfbmVnYXRpdmVfZGlzcGxheV93aW5kb3cAAAAEYm9vbAE=", + "foundry.timeline.samplerate": "Invalid", + "isSequence": true, + "media.exr.channels": "B:{1 0 1 1},G:{1 0 1 1},R:{1 0 1 1}", + "media.exr.compression": "2", + "media.exr.compressionName": "Zip (1 scanline)", + "media.exr.dataWindow": "1,1,1918,1078", + "media.exr.displayWindow": "0,0,1919,1079", + "media.exr.lineOrder": "0", + "media.exr.nuke.input.frame_rate": "24", + "media.exr.nuke.input.timecode": "01:00:41:15", + "media.exr.pixelAspectRatio": "1", + "media.exr.screenWindowCenter": "0,0", + "media.exr.screenWindowWidth": "1", + "media.exr.type": "scanlineimage", + "media.exr.version": "1", + "media.input.bitsperchannel": "16-bit half float", + "media.input.ctime": "2024-09-23 08:37:23", + "media.input.filereader": "exr", + "media.input.filesize": "1095868", + "media.input.frame": "1", + "media.input.frame_rate": "24", + "media.input.height": "1080", + "media.input.mtime": "2024-09-23 08:37:23", + "media.input.timecode": "01:00:41:15", + "media.input.width": "1920", + "media.nuke.full_layer_names": "0", + "media.nuke.node_hash": "9b", + "media.nuke.version": "15.1v2", + "openpype.source.colourtransform": "scene_linear", + "openpype.source.height": 1080, + "openpype.source.pixelAspect": 1.0, + "openpype.source.width": 1920, + "padding": 4 + }, + "name": "", + "available_range": { + "OTIO_SCHEMA": "TimeRange.1", + "duration": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 101.0 + }, + "start_time": { + "OTIO_SCHEMA": "RationalTime.1", + "rate": 24.0, + "value": 1000.0 + } + }, + "available_image_bounds": null, + "target_url_base": "C:\\with_tc", + "name_prefix": "output.", + "name_suffix": ".exr", + "start_frame": 1000, + "frame_step": 1, + "rate": 24.0, + "frame_zero_padding": 4, + "missing_frame_policy": "error" + } + }, + "active_media_reference_key": "DEFAULT_MEDIA" + } + ], + "kind": "Video" +} \ No newline at end of file diff --git a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py index 7bc1a750d7..25d689e7c1 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py +++ b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py @@ -37,27 +37,31 @@ def get_ffmpeg_executable(self, _): return ["/path/to/ffmpeg"] -def run_process(file_name: str): +def run_process(file_name: str, instance_data: dict = None): """ """ - # Get OTIO review data from serialized file_name - file_path = os.path.join(_RESOURCE_DIR, file_name) - clip = otio.schema.Clip.from_json_file(file_path) - # Prepare dummy instance and capture call object capture_call = CaptureFFmpegCalls() processor = extract_otio_review.ExtractOTIOReview() Anatomy = NamedTuple("Anatomy", project_name=str) - instance = MockInstance( - { + + if not instance_data: + # Get OTIO review data from serialized file_name + file_path = os.path.join(_RESOURCE_DIR, file_name) + clip = otio.schema.Clip.from_json_file(file_path) + + instance_data = { "otioReviewClips": [clip], "handleStart": 10, "handleEnd": 10, "workfileFrameStart": 1001, - "folderPath": "/dummy/path", - "anatomy": Anatomy("test_project"), } - ) + + instance_data.update({ + "folderPath": "/dummy/path", + "anatomy": Anatomy("test_project"), + }) + instance = MockInstance(instance_data) # Mock calls to extern and run plugins. with mock.patch.object( @@ -73,9 +77,14 @@ def run_process(file_name: str): with mock.patch.object( processor, "_get_folder_name_based_prefix", - return_value="C:/result/output." + return_value="output." ): - processor.process(instance) + with mock.patch.object( + processor, + "staging_dir", + return_value="C:/result/" + ): + processor.process(instance) # return all calls made to ffmpeg subprocess return capture_call.calls @@ -103,7 +112,7 @@ def test_image_sequence_with_embedded_tc_and_handles_out_of_range(): # Report from source exr (1001-1101) with enforce framerate "/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i " - "C:\\exr_embedded_tc\\output.%04d.exr -start_number 1001 " + f"C:\\exr_embedded_tc{os.sep}output.%04d.exr -start_number 1001 " "C:/result/output.%03d.jpg" ] @@ -133,7 +142,7 @@ def test_image_sequence_and_handles_out_of_range(): # 1001-1095 = source range conformed to 25fps # 1096-1096 = additional 1 tail frames "/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i " - "C:\\tif_seq\\output.%04d.tif -start_number 996 C:/result/output.%03d.jpg" + f"C:\\tif_seq{os.sep}output.%04d.tif -start_number 996 C:/result/output.%03d.jpg" ] assert calls == expected @@ -203,3 +212,119 @@ def test_short_movie_tail_gap_handles(): ] assert calls == expected + +def test_multiple_review_clips_no_gap(): + """ + Use multiple review clips (image sequence). + Timeline 25fps + """ + file_path = os.path.join(_RESOURCE_DIR, "multiple_review_clips.json") + clips = otio.schema.Track.from_json_file(file_path) + instance_data = { + "otioReviewClips": clips, + "handleStart": 10, + "handleEnd": 10, + "workfileFrameStart": 1001, + } + + calls = run_process( + None, + instance_data=instance_data + ) + + expected = [ + # 10 head black frames generated from gap (991-1000) + '/path/to/ffmpeg -t 0.4 -r 25.0 -f lavfi -i color=c=black:s=1280x720 -tune ' + 'stillimage -start_number 991 C:/result/output.%03d.jpg', + + # Alternance 25fps tiff sequence and 24fps exr sequence for 100 frames each + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1001 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i ' + f'C:\\with_tc{os.sep}output.%04d.exr ' + '-start_number 1102 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1199 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i ' + f'C:\\with_tc{os.sep}output.%04d.exr ' + '-start_number 1300 C:/result/output.%03d.jpg', + + # Repeated 25fps tiff sequence multiple times till the end + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1397 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1498 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1599 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1700 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1801 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 1902 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 2003 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 2104 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' + f'C:\\no_tc{os.sep}output.%04d.tif ' + '-start_number 2205 C:/result/output.%03d.jpg' + ] + + assert calls == expected + +def test_multiple_review_clips_with_gap(): + """ + Use multiple review clips (image sequence) with gap. + Timeline 24fps + """ + file_path = os.path.join(_RESOURCE_DIR, "multiple_review_clips_gap.json") + clips = otio.schema.Track.from_json_file(file_path) + instance_data = { + "otioReviewClips": clips, + "handleStart": 10, + "handleEnd": 10, + "workfileFrameStart": 1001, + } + + calls = run_process( + None, + instance_data=instance_data + ) + + expected = [ + # Gap on review track (12 frames) + '/path/to/ffmpeg -t 0.5 -r 24.0 -f lavfi -i color=c=black:s=1280x720 -tune ' + 'stillimage -start_number 991 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i ' + f'C:\\with_tc{os.sep}output.%04d.exr ' + '-start_number 1003 C:/result/output.%03d.jpg', + + '/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i ' + f'C:\\with_tc{os.sep}output.%04d.exr ' + '-start_number 1091 C:/result/output.%03d.jpg' + ] + + assert calls == expected From 1fce6108c69b15a8aeb3660182d4b6c17530bf84 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 2 Oct 2024 11:09:01 -0400 Subject: [PATCH 27/28] Fix linting --- .../pipeline/editorial/test_extract_otio_review.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py index 25d689e7c1..ea31e1a260 100644 --- a/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py +++ b/tests/client/ayon_core/pipeline/editorial/test_extract_otio_review.py @@ -83,7 +83,7 @@ def run_process(file_name: str, instance_data: dict = None): processor, "staging_dir", return_value="C:/result/" - ): + ): processor.process(instance) # return all calls made to ffmpeg subprocess @@ -233,11 +233,11 @@ def test_multiple_review_clips_no_gap(): ) expected = [ - # 10 head black frames generated from gap (991-1000) + # 10 head black frames generated from gap (991-1000) '/path/to/ffmpeg -t 0.4 -r 25.0 -f lavfi -i color=c=black:s=1280x720 -tune ' 'stillimage -start_number 991 C:/result/output.%03d.jpg', - # Alternance 25fps tiff sequence and 24fps exr sequence for 100 frames each + # Alternance 25fps tiff sequence and 24fps exr sequence for 100 frames each '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' f'C:\\no_tc{os.sep}output.%04d.tif ' '-start_number 1001 C:/result/output.%03d.jpg', @@ -254,7 +254,7 @@ def test_multiple_review_clips_no_gap(): f'C:\\with_tc{os.sep}output.%04d.exr ' '-start_number 1300 C:/result/output.%03d.jpg', - # Repeated 25fps tiff sequence multiple times till the end + # Repeated 25fps tiff sequence multiple times till the end '/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i ' f'C:\\no_tc{os.sep}output.%04d.tif ' '-start_number 1397 C:/result/output.%03d.jpg', @@ -292,7 +292,7 @@ def test_multiple_review_clips_no_gap(): '-start_number 2205 C:/result/output.%03d.jpg' ] - assert calls == expected + assert calls == expected def test_multiple_review_clips_with_gap(): """ From 0ab128b3bfac5aae72f10df11887e1ecf8b26968 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 2 Oct 2024 16:10:27 -0400 Subject: [PATCH 28/28] Add rounding support for OTIO <= 0.16.0 --- .../plugins/publish/extract_otio_review.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index 00a90df695..faba9fd36d 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -329,6 +329,20 @@ def _trim_available_range(self, avl_range, start, duration): trim_media_range, ) + def _round_to_frame(rational_time): + """ Handle rounding duration to frame. + """ + # OpentimelineIO >= 0.16.0 + try: + return rational_time.round().to_frames() + + # OpentimelineIO < 0.16.0 + except AttributeError: + return otio.opentime.RationalTime( + round(rational_time.value), + rate=rational_time.rate, + ).to_frames() + avl_start = avl_range.start_time # An additional gap is required before the available @@ -337,11 +351,12 @@ def _trim_available_range(self, avl_range, start, duration): gap_duration = avl_start - start start = avl_start duration -= gap_duration + gap_duration = _round_to_frame(gap_duration) # create gap data to disk - self._render_segment(gap=gap_duration.round().to_frames()) + self._render_segment(gap=gap_duration) # generate used frames - self._generate_used_frames(gap_duration.round().to_frames()) + self._generate_used_frames(gap_duration) # An additional gap is required after the available # range to conform to source end point + tail handles @@ -351,15 +366,16 @@ def _trim_available_range(self, avl_range, start, duration): if end_point > avl_end_point: gap_duration = end_point - avl_end_point duration -= gap_duration + gap_duration = _round_to_frame(gap_duration) # create gap data to disk self._render_segment( - gap=gap_duration.round().to_frames(), + gap=gap_duration, end_offset=duration.to_frames() ) # generate used frames self._generate_used_frames( - gap_duration.round().to_frames(), + gap_duration, end_offset=duration.to_frames() )