Skip to content

Commit

Permalink
Fix broken -st/--start-time argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
Breakthrough committed Mar 13, 2021
1 parent d85d260 commit 38e4b28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dvr_scan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


# Used for module identification and when printing copyright & version info.
__version__ = 'v1.2.1'
__version__ = 'v1.2.2'

# About & copyright message string shown for the -v/--version CLI argument.
ABOUT_STRING = """-----------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions dvr_scan/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def __init__(self, input_videos, frame_skip=0, show_progress=False):
# Input Video Parameters
self._video_paths = input_videos # -i/--input
self._frame_skip = frame_skip # -fs/--frame-skip
self._start_time = None # -st/--start-time
self._end_time = None # -et/--end-time

self._cap = None
self._cap_path = None
Expand Down Expand Up @@ -222,11 +224,10 @@ def set_event_params(self, min_event_len=2, time_pre_event="1.5s", time_post_eve

def set_video_time(self, start_time=None, end_time=None, duration=None):
# type: (str, str, str) -> None
self._start_time = None
self._end_time = None
""" Used to select a sub-set of the video in time for processing. """
assert self._video_fps is not None
if start_time is not None:
self._start_time = FrameTimecode(self._video_fps, start_time)
self._start_time = FrameTimecode(start_time, self._video_fps)
if duration is not None:
duration = FrameTimecode(duration, self._video_fps)
if self._start_time is not None:
Expand All @@ -237,7 +238,6 @@ def set_video_time(self, start_time=None, end_time=None, duration=None):
elif end_time is not None:
self._end_time = FrameTimecode(end_time, self._video_fps)


def _load_input_videos(self):
# type: () -> bool
""" Opens and checks that all input video files are valid, can
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_extra_requires():

setup(
name='dvr-scan',
version='1.2.1',
version='1.2.2',
description="Tool for finding and extracting motion events in video files"
"(e.g. security camera footage).",
long_description=open('package-info.rst').read(),
Expand Down

0 comments on commit 38e4b28

Please sign in to comment.