Skip to content

Commit

Permalink
timestamp extraction and notes correction
Browse files Browse the repository at this point in the history
  • Loading branch information
philipqueen committed Sep 4, 2024
1 parent 5312da8 commit 28e5023
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cameras/philips_camera_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

2. You can test different camera framerates in the `bandwidth manager`, but bandwidth during recording appears to be higher than in the bandwidth manager testing, as frames drop during recording but not testing.

3. The `Recording Settings` appear to reset when the program is closed and FOR EVERY CAMERA. Make sure the settings are correct every time before recording:
3. The `Recording Settings` need to be set for every camera, but the settings do persist when closing the software. Make sure the settings are correct every time before recording:
- Set to Video
- output format: AVI
- Set fixed playback speed: OFF
Expand Down
14 changes: 12 additions & 2 deletions Cameras/test_scripts/file_explore.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
import cv2

from pathlib import Path
from datetime import datetime


def print_video_info(videos_path: Path):
for video_path in videos_path.iterdir():
if video_path.suffix not in {".avi", ".AVI", ".mp4", ".MP4"}:
continue
print(f"video name: {video_path.name}")
starting_timestamp = video_path.stem.split("__")[-1]
starting_datetime = datetime.fromisoformat(starting_timestamp)
print(f"starting datetime: {starting_datetime}")
cap = cv2.VideoCapture(str(video_path))
print(f"frame count: {cap.get(cv2.CAP_PROP_FRAME_COUNT)}")
print(f"fps: {cap.get(cv2.CAP_PROP_FPS)}")
cap.release()


if __name__ == "__main__":
folder_path = Path("/Users/philipqueen/Documents/Humon Research Lab/Basler Stuff/calibration_attempt/")
folder_path = Path(
"/Users/philipqueen/Documents/Humon Research Lab/Basler Stuff/calibration_attempt/"
)
raw_videos_path = folder_path / "raw_videos"
synched_videos_path = folder_path / "synched_videos"

print_video_info(synched_videos_path)
print_video_info(synched_videos_path)

0 comments on commit 28e5023

Please sign in to comment.