Skip to content

Commit

Permalink
Separate recording files every 1min
Browse files Browse the repository at this point in the history
  • Loading branch information
xeonqq committed Mar 27, 2024
1 parent 8fde119 commit 50ff8d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/camera_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 26,11 @@ def __init__(self, camera, fps, led, recording_folder, daemon=True):
self._is_recording = False
self._event_queue = queue.Queue()
self._encoder = H264Encoder(10000000)

filepath = "{}/recording_{}.mp4".format(
filepath = "{}/recording_{}_d.mp4".format(
self._folder, time.strftime("%Y%m%d-%H%M%S")
)
self._tape = FfmpegOutput(filepath)
options = "-movflags faststart -segment_time 00:01:00 -f segment -reset_timestamps 1 -y "
self._tape = FfmpegOutput(options filepath)
if daemon:
self._thread = threading.Thread(target=self.run, daemon=True)
self._thread.start()
Expand Down

0 comments on commit 50ff8d5

Please sign in to comment.