Legacy-exact codec video preprocessing wheel
Project description
codec-video-prep-legacy-exact
This repository is a clean legacy-exact source tree for reproducing old codec
preprocessing results. It is intentionally separate from the newer
codec-video-prep package.
The legacy pipeline uses the old cv_reader.api.read_video_cb backend. It does
not use cv_reader_fast, and this repository does not build or package
cv_reader_fast.
Contents
codec_selector/ # legacy selector pipeline
src/cv_reader/ # old cv_reader Python package and C++ extension source
tool/ # legacy scripts used by the CLI
ffmpeg/ffmpeg_patch/ # patched FFmpeg source files
ffmpeg/install_ffmpeg.sh # downloads FFmpeg 5.1, applies patches, builds static libs
build_scripts/ # wheel build and verification helpers
codec_video_prep_legacy_exact_cli.py
setup.py
pyproject.toml
Generated files are intentionally excluded from the clean tree:
*.so
build/
dist/
*.egg-info/
ffmpeg/ffmpeg_install/
ffmpeg/ffmpeg_source/
__pycache__/
Build patched FFmpeg
Run once per build machine/container:
cd /video_vit/yunyaoyan/code/codec-video-prep-legacy-exact
bash build_scripts/build_patched_ffmpeg.sh
This downloads FFmpeg 5.1, copies files from ffmpeg/ffmpeg_patch/ into the
FFmpeg source tree, and installs static FFmpeg libraries under:
ffmpeg/ffmpeg_install/
setup.py reads FFmpeg flags from:
ffmpeg/ffmpeg_install/lib/pkgconfig
Build wheels
Build for available local Python versions:
cd /video_vit/yunyaoyan/code/codec-video-prep-legacy-exact
bash build_scripts/build_wheels.sh
Choose Python versions:
PY_LIST="3.10 3.11 3.12" bash build_scripts/build_wheels.sh
Set version:
LEGACY_EXACT_VERSION=0.2.5.post4 bash build_scripts/build_wheels.sh
Set a platform tag when building inside a target platform/container:
PLAT_NAME=manylinux_2_35_x86_64 bash build_scripts/build_wheels.sh
PLAT_NAME=manylinux_2_39_aarch64 bash build_scripts/build_wheels.sh
For aarch64, run the same scripts inside an aarch64 container or machine after building patched FFmpeg there.
Verification
The wheel verifier runs automatically from build_wheels.sh. You can also run
it manually:
python3 build_scripts/verify_legacy_wheel.py dist/*.whl
It checks:
- exactly one
cv_reader/api*.sois present; - no
cv_reader_fastfiles are present; - no unexpected
cv_reader/*.sofiles are present.
Manual inspection:
unzip -l dist/codec_video_prep_legacy_exact-*.whl | grep -E 'cv_reader.*\.so|cv_reader_fast'
Expected output should include cv_reader/api...so and should not include
cv_reader_fast.
Smoke test
python3.10 -m pip install --force-reinstall dist/codec_video_prep_legacy_exact-*-cp310-*.whl
cd /tmp
python3.10 - <<'PY'
from cv_reader import api
print(api.__file__)
PY
codec-video-prep-legacy-exact --help
Legacy behavior note
Do not replace cv_reader.api with the newer cv_reader_fast path if you need
old src_patch_position.npy reproduction. The old exact behavior depends on
cv_reader.api.read_video_cb and its historical frame/bitcost alignment behavior.
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 Distributions
Built Distributions
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 codec_video_prep_legacy_exact-0.2.5.post4-cp312-cp312-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: codec_video_prep_legacy_exact-0.2.5.post4-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 34.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f92b39b6ee0aaa0bc4ffd56da891e7eb0b4f4fb65b3ef3ddb3f5db3a11ae216
|
|
| MD5 |
3bb72e0a5aeb3a87bc20e7fc29b1530a
|
|
| BLAKE2b-256 |
1abd5ad97180648a97bd5df5c038473891d1390be0c14d4a72544071e765e001
|
File details
Details for the file codec_video_prep_legacy_exact-0.2.5.post4-cp311-cp311-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: codec_video_prep_legacy_exact-0.2.5.post4-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 34.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d54159ed25ac9b34660804f84a46abc091713bd1d28cdd6011ca52a615a28596
|
|
| MD5 |
47490bdc725f9203ea57ee329358eff5
|
|
| BLAKE2b-256 |
cc21a4acc7865e00cadd9c81ad23f502caf045f846b963971e444395d0b9b17d
|
File details
Details for the file codec_video_prep_legacy_exact-0.2.5.post4-cp310-cp310-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: codec_video_prep_legacy_exact-0.2.5.post4-cp310-cp310-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 34.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c409a224631d3dbe0ac8a7c9af08aa7acac4e0ca6807d74fc9d8341f34416d2c
|
|
| MD5 |
f58c8bfa133f2ee81ca7e47d37047884
|
|
| BLAKE2b-256 |
93fbdbbc2f49bea49c9ce6579e5a5b4c1a06430e62f42d6e1a12d79fdf1ccb01
|