Skip to main content

Hive Video Tools

hive-video provides command-line tools and Python APIs for downloading, resequencing, and extracting fragments from honey bee hive videos. It is part of the Collective Logic Lab's honeybee-hive-video project.

  • download selects a recording from the Edmond 2019 honey bee video archive, resumes partial transfers, and verifies the archive MD5 checksum.
  • fragment extracts a PNG frame or an MP4 clip from a local video and writes a JSON sidecar with provenance and an output checksum.
  • resequence provides individual reconstruction, inspection, quality-control, and rendering stages. Its dependencies are optional.

Version 0.1.0 is the first public package release. These tools have been used in research; the packaged API is still evolving. During 0.x, incompatible interface changes receive a minor version increment and release notes. Retain a dependency lockfile for reproducible work.

Install

Use Python 3.12 or newer. To install the command-line tools with uv:

uv tool install hive-video
hive-video --help

To include resequencing support, install with the optional extra:

uv tool install 'hive-video[resequence]'

FFmpeg and ffprobe are resolved automatically. The tools use an explicitly configured pair or a complete pair on PATH; otherwise, the included provider downloads and caches platform-specific builds from the FFmpeg 8 family. Prepare them before offline work with:

hive-video setup-ffmpeg

This reports their executable paths, versions, and checksums. Help and archive downloading do not need FFmpeg.

Extract a fragment

Given a local source.mp4, extract its first 25 frames:

hive-video fragment --video source.mp4 --start-frame 0 --duration-frames 25 --out clip.mp4

Omit the duration and use a .png output to extract one frame. Existing output files are refused. The bee progress display can be changed with --progress plain or disabled with --progress off.

Use from Python

Add the library to the project that will import it:

uv add hive-video

Use uv add 'hive-video[resequence]' if you also need resequencing. Then download a recording and extract a clip:

from pathlib import Path

from hive_video.download import download_video
from hive_video.fragment import create_fragment

my_dir = Path("data/day22")
source = download_video(day=22, side=0, panel="top", target=my_dir)
clip = create_fragment(source, my_dir / "clip.mp4", start=0, duration=30, unit="seconds")
print(clip)

day=22 selects the archive's sequential start22 capture identifier; the filename gives its calendar timestamp. Downloading retrieves the entire source recording, which can be tens of gigabytes. Seconds use the source's nominal frame clock. See the package interface guide for selectors, transfer settings, progress callbacks, and fragment conventions.

Resequencing and scientific scope

Resequencing is computationally expensive and includes human inspection and join quality control. Follow the stage workflow and methods record. Reconstruction does not independently establish absolute recording chronology or validate a biological interpretation.

This distribution contains the reusable video tools. Internal analyses, experimental recipes, Slurm launchers, and research data remain in the source project.

The package source is MIT licensed. FFmpeg executables are supplied separately by the selected system installation or binary provider.

Release files for hive-video 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hive-video 0.1.0
File Size Uploaded
hive_video-0.1.0.tar.gz 63.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hive-video 0.1.0
File Interpreter ABI Platform
hive_video-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 142.8 kB

Release files / hive_video-0.1.0.tar.gz

Download URL hive_video-0.1.0.tar.gz
Size 63.8 kB
Tags Source
SHA-256 checksum
How to use checksums
48bbd806b0a2248d057c315dca5905c5248766ecdaf9f7c63c6a355eed35cd68
BLAKE2b-256 checksum
How to use checksums
8feb2981caf8fffb75e2c1581003d383b6797584da90387706b71ba366be80da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release files / hive_video-0.1.0-py3-none-any.whl

Download URL hive_video-0.1.0-py3-none-any.whl
Size 79.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b48c3d12c9c5066cf5e68c966aa8d99ed64be0da427e40274493d35d6d5cf96
BLAKE2b-256 checksum
How to use checksums
0f5dff2c4325f6bff548d36bcafa450d945bdff607b25bc4aa9cfa3522ce3d25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page