CLI to extract playable video from EZVIZ/Hikvision SD cards' proprietary round-robin storage format. Works specifically for devices that use hiv<xxxxx>.mp4 and index00.bin files.
Project description
ezhikstract
CLI tool to extract playable video from EZVIZ and Hikvision SD cards' proprietary round-robin storage format.
It works specifically with security camera or video doorbell SD cards that contain files named hiv<xxxxx>.mp4 and an index00.bin metadata/index file. The tool parses the index file, validates video segments, extracts the raw MPEG-PS streams, and remuxes them into standard .mp4 containers, merging segments from the same day into a single daily video file.
No full video re-encoding is performed; video streams (HEVC) are copied directly. Audio streams (e.g., PCM G.711 / Alaw) are re-encoded to Opus to ensure compatibility with standard media players.
Installation
Install the package directly from the repository directory:
pip install ezhikstract
Usage
The CLI provides two main commands: list and extract.
Command: list
Lists all valid recordings found on the SD card without extracting them.
Usage
ezhikstract list INPUT_DIR
Arguments
INPUT_DIR(Required): Root directory of the SD card containingindex00.bin.
Command: extract
Extracts recording segments from the SD card, filters them by date/time if specified, and merges segments from the same day into a single file named by start time (DDMMYYYY HHMMSS.mp4).
Usage
ezhikstract extract INPUT_DIR [OPTIONS]
Arguments
INPUT_DIR(Required): Root directory of the SD card containingindex00.bin.
Options
-o, --output PATH: Output directory for the extracted and merged.mp4files. Default isrecordings.--from DATETIME: Inclusive start filter, UTC (format:YYYY-MM-DD HH:MM:SS).--to DATETIME: Exclusive end filter, UTC (format:YYYY-MM-DD HH:MM:SS).--replace / --no-replace: Whether to overwrite existing files in the output directory. Default is--replace.
How it Works
The SD cards of these cameras use a pre-allocated round-robin storage file format:
index00.bin(and the backup copyindex01.bin) contains pointers, timestamps, offsets, and checksums for the recorded video segments.- The video data is written to pre-allocated
hivxxxxx.mp4files, which are all exactly 268.4 MB (as are the index files). - Within the
hivxxxxx.mp4files, the videos are stored as raw MPEG-PS streams (MPEG Program Stream with HEVC video and G.711/PCM audio). ezhikstractparsesindex00.bin, verifies the boundaries and starts of the segments insidehivxxxxx.mp4(checking for valid MPEG-PS headers), extracts the segments, groups them by day, stream-copies the HEVC video tracks, re-encodes the audio to Opus, and concats the daily segments using the FFmpeg concat demuxer.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezhikstract-0.1.0.tar.gz.
File metadata
- Download URL: ezhikstract-0.1.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa3d4ce12ad9ddb8792c976a3f11d7caddce03e079a985382eedfb51daf9e91
|
|
| MD5 |
2b032bf0985272ec38bb3ab43e163c8d
|
|
| BLAKE2b-256 |
3d929758e14c6e1b275bf54e6b256c89501a3b938ef9bd11e85e869a62f32db2
|
Provenance
The following attestation bundles were made for ezhikstract-0.1.0.tar.gz:
Publisher:
release.yml on damianjude/ezhikstract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezhikstract-0.1.0.tar.gz -
Subject digest:
daa3d4ce12ad9ddb8792c976a3f11d7caddce03e079a985382eedfb51daf9e91 - Sigstore transparency entry: 2191821726
- Sigstore integration time:
-
Permalink:
damianjude/ezhikstract@8d7f264048afb1aa51b5534ee5ebfa2a33b40f92 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/damianjude
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8d7f264048afb1aa51b5534ee5ebfa2a33b40f92 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ezhikstract-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ezhikstract-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff341b18e4a8ef1d3699adc6ff25c3c351dbec56b0644f5afdba7868950b0b96
|
|
| MD5 |
cf42a3f1c4838cafe3608627d4ce0806
|
|
| BLAKE2b-256 |
4bebe2b7e6594bf2f2862658a560c375986c0556af8f36bec89aa8fc9bb1b7ce
|
Provenance
The following attestation bundles were made for ezhikstract-0.1.0-py3-none-any.whl:
Publisher:
release.yml on damianjude/ezhikstract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezhikstract-0.1.0-py3-none-any.whl -
Subject digest:
ff341b18e4a8ef1d3699adc6ff25c3c351dbec56b0644f5afdba7868950b0b96 - Sigstore transparency entry: 2191821775
- Sigstore integration time:
-
Permalink:
damianjude/ezhikstract@8d7f264048afb1aa51b5534ee5ebfa2a33b40f92 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/damianjude
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8d7f264048afb1aa51b5534ee5ebfa2a33b40f92 -
Trigger Event:
release
-
Statement type: