recording¶
Recording: a project's videos opened as streams, with the frame count they agree on.
open_recording opens the videos a project's
manifest names (ADR-0081): each pattern is matched through glob.glob, so .. and
absolute patterns work; a bare directory is refused, since a folder of stills is a
glob; and videos that disagree on the frame count are refused.
Recording
dataclass
¶
Videos opened as streams, keyed by video name, with their agreed frame count.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
What the stages' log and error lines call it: the project's name in the invocation (project_names), its leaf when it is opened on its own. |
directory |
Path
|
The project folder, absolute and normalized. |
videos |
dict[str, Video]
|
|
n_frames |
int
|
The frame count every video has. |
project |
Project
|
The project the videos are of. |
fps |
float | None
|
The videos' declared frame rate, or |
Source code in src/deeperfly/recording.py
match_patterns ¶
The files one video's patterns name, relative to base, in stream order.
A pattern is a file or a glob, relative to base or absolute, matched through
glob.glob, which takes .. and absolute patterns; base itself is taken
literally, so a file whose name holds *?[ is written escaped (glob.escape). A
.. climbs out of the folder the filesystem reaches, a symlinked base being
followed, and a file is reported the same way whether a glob or its literal name
found it. A glob's matches are sorted and an explicit list of parts keeps its
order. where prefixes every message.
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If a pattern matches no file. |
ValueError
|
If a pattern names a directory. |
Source code in src/deeperfly/recording.py
normalized ¶
An absolute, ..-free path that does not follow symlinks: the one typed.
open_recording ¶
Open the videos a project's manifest names, in its [videos] order.
Probing is eager, a project being the unit of failure (ADR-0037), and once per
video: a hexaview project probes two videos for its six views, and nothing stays
open (ADR-0101). name is what the recording is called, the project's own name by
default.
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If a pattern matches no file. |
ValueError
|
If a pattern names a directory, two videos claim one file, a frame count cannot be read, or the videos disagree on it. |
Source code in src/deeperfly/recording.py
under_folder ¶
A file path of a folder's document, against folder when it is relative.
Each .. is taken as the filesystem takes it, climbing out of the folder a
symlinked folder points at, as for a video pattern
(match_patterns); a name is not globbed.