Expand description
Video Thumbnails
Tuwunel decodes no video itself. An operator-configured program extracts a still frame, which the image thumbnailer then treats as the source picture.
StructsΒ§
- Reaper π
- Kills the programβs process group on every exit that leaves it running, so that a shutdown or a disconnected client takes a wrapperβs descendants with it exactly as an expired deadline does. Disarmed once the child is reaped, past which the identifier could name a group this server never spawned.
ConstantsΒ§
- DIAGNOSTIC_
LEN π - FAILURES π
- Videos remembered as having failed.
- FAILURE_
COOLDOWN π - How long a video whose extraction failed is left alone. Retrying it at once would spend a slot to fail again, and at the default concurrency of one that is the slot every other video is waiting for.
- FAIR_
SHARE π - Fraction of the deadline the program must still have to be worth running, and to be answerable for missing.
- HEIGHT π
- INPUT π
- Tokens replaced in every configured argument before each call.
- NAME_
LENGTH π - STAGED π
- Distinguishes a staged video from anything else in the staging directory, so the startup sweep reclaims only what this module wrote.
- VIDEO π
- Content-type prefix of media a still frame is extracted from.
- WIDTH π
FunctionsΒ§
- drain π
- kill_
group π - run π
- Collect the frame the program writes to standard output, refusing one past the limit rather than decoding a truncation. The program runs in its own process group, so a wrapper overrunning the deadline cannot orphan the work it spawned.
- stage π
- Write the video to a fresh private file: the program needs a seekable input, and a pipe cannot serve formats whose index trails the media.
- staging_
dir π - Videos are staged beside the database rather than in the system temporary directory, which is commonly memory-backed and sized for small files.
- substitute π
- sweep_
staging_ πdir - Reclaim videos staged by a previous run: the scope guard that unlinks them survives neither a kill nor the exec of an in-place restart. Runs during construction, before a request can stage a file this would race, which is also before the service graph exists to read the configuration through.
Type AliasesΒ§
- Failures π
- Videos whose frame extraction failed, against the time it last did. Bounded, since forgetting an entry early only costs a retry.