mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Add test for tail handles only.
This commit is contained in:
parent
4b27971a8e
commit
7a83b8ec97
3 changed files with 444 additions and 4 deletions
|
|
@ -344,12 +344,12 @@ class ExtractOTIOReview(publish.Extractor):
|
|||
# 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
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue