diff --git a/trap/config.py b/trap/config.py index f992d15..9220f29 100644 --- a/trap/config.py +++ b/trap/config.py @@ -194,8 +194,8 @@ frame_emitter_parser.add_argument("--video-src", default=lambda: list(Path('../DATASETS/VIRAT_subset_0102x/').glob('*.mp4'))) #TODO: camera as source -frame_emitter_parser.add_argument("--video-no-loop", - help="By default it emitter will run indefiniately. This prevents that and plays every video only once.", +frame_emitter_parser.add_argument("--video-loop", + help="By default it emitter will run only once. This allows it to loop the video file to keep testing.", action='store_true') #TODO: camera as source diff --git a/trap/frame_emitter.py b/trap/frame_emitter.py index 832e302..478ce8c 100644 --- a/trap/frame_emitter.py +++ b/trap/frame_emitter.py @@ -36,10 +36,10 @@ class FrameEmitter: logger.info(f"Connection socket {config.zmq_frame_addr}") - if self.config.video_no_loop: - self.video_srcs = self.config.video_src - else: + if self.config.video_loop: self.video_srcs = cycle(self.config.video_src) + else: + self.video_srcs = self.config.video_src def emit_video(self):