Skip to content

Add shared video schema: recordings, cameras and processed videos - #16

Open
deruyter92 wants to merge 3 commits into
jaap/add-file-schemafrom
jaap/add-video-schema
Open

deruyter92 wants to merge 3 commits into
jaap/add-file-schemafrom
jaap/add-video-schema

Conversation

@deruyter92

Copy link
Copy Markdown
Collaborator

Summary
Shared video tables. A video only needs to be a registered file; linking it to a session is optional.

Changes

Tables

  • video.VideoFile (-> File): fps, size and frame count read with OpenCV.
  • video.Camera (-> Lab, camera_code): a camera or view, named by the lab.
  • video.VideoRecording (-> Session, -> Camera, take): one take of one camera in a session; -> VideoFile.
  • video.VideoRecording.FrameTimestamps: frame times in seconds.
  • video.VideoTransform (-> Lab, transform_code): a lab's processing recipe; the steps are stored as JSON that SCENE does not interpret.
  • video.ProcessedVideo (-> VideoRecording, -> VideoTransform): the processed video; -> VideoFile.

helpers

  • Write: register_video, register_video_recording, ensure_video_transform, register_processed_video. Each is safe to run again and refuses conflicting content.

Notes

  • No identity transform: an unprocessed video is just its VideoFile. Downstream tools (like dlc) can also use videos that come from no registered session.
  • Cameras and transforms belong to a lab.
  • Frame timestamps are not checked against n_frames

The reader lives in ingestion/video/_transient until dlccore provides it.
VideoRecording (-> Session, -> Camera, take --- -> VideoFile, start_time)
with FrameTimestamps; register_video_recording registers the video and
the recording, and refuses a camera of another lab.
A lab's named processing recipe (steps as JSON) and the video it made
from a recording; ensure_video_transform, register_processed_video.
@deruyter92
deruyter92 added this pull request to stack #18 November 24, 2026 17:04
@deruyter92
deruyter92 removed this pull request from stack #18 November 24, 2026 17:06
@deruyter92
deruyter92 changed the base branch from dev to jaap/add-file-schema November 24, 2026 17:07
@deruyter92
deruyter92 added this pull request to stack #19 November 24, 2026 17:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant