Skip to content

Commit 08d333f

Browse files
committed
[save-edl] Remove PTS correction in end timestamp calculation #516
1 parent 7dee4b9 commit 08d333f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scenedetect/_cli/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def get_edl_timecode(timecode: FrameTimecode):
292292
# Add each shot as an edit entry
293293
for i, (start, end) in enumerate(scenes):
294294
in_tc = get_edl_timecode(start)
295-
out_tc = get_edl_timecode(end - 1) # Correct for presentation time
295+
out_tc = get_edl_timecode(end) # Correct for presentation time
296296
# Format the edit entry according to CMX 3600 format
297297
event_line = f"{(i + 1):03d} {reel} V C {in_tc} {out_tc} {in_tc} {out_tc}"
298298
edl_content.append(event_line)

tests/test_cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def invoke_scenedetect(
104104
if config_file:
105105
command += " -c %s" % config_file
106106
command += " " + args.format(**value_dict)
107-
return subprocess.call(command.strip().split(" "))
107+
return subprocess.call(command.strip().split(" "), shell=True)
108108

109109

110110
def test_cli_no_args():
@@ -757,8 +757,8 @@ def test_cli_save_edl(tmp_path: Path):
757757
TITLE: {DEFAULT_VIDEO_NAME}
758758
FCM: NON-DROP FRAME
759759
760-
001 AX V C 00:00:02:00 00:00:03:17 00:00:02:00 00:00:03:17
761-
002 AX V C 00:00:03:18 00:00:05:23 00:00:03:18 00:00:05:23
760+
001 AX V C 00:00:02:00 00:00:03:18 00:00:02:00 00:00:03:18
761+
002 AX V C 00:00:03:18 00:00:06:00 00:00:03:18 00:00:06:00
762762
"""
763763
assert output_path.read_text() == EXPECTED_EDL_OUTPUT
764764

@@ -778,8 +778,8 @@ def test_cli_save_edl_with_params(tmp_path: Path):
778778
TITLE: title
779779
FCM: NON-DROP FRAME
780780
781-
001 BX V C 00:00:02:00 00:00:03:17 00:00:02:00 00:00:03:17
782-
002 BX V C 00:00:03:18 00:00:05:23 00:00:03:18 00:00:05:23
781+
001 BX V C 00:00:02:00 00:00:03:18 00:00:02:00 00:00:03:18
782+
002 BX V C 00:00:03:18 00:00:06:00 00:00:03:18 00:00:06:00
783783
"""
784784
assert output_path.read_text() == EXPECTED_EDL_OUTPUT
785785

0 commit comments

Comments
 (0)