Reproduce

October 15, 2025 ยท View on GitHub

  1. Setup database root path with export DATABASE_DIR=/path/to/your/database/folder.

  2. Download the pre-built database from here. Or you can use the script wget https://huggingface.co/datasets/xyzhang626/LongVideoBenchmarkCaptions/resolve/main/LVBench_4.1.zip to download the database.

  3. Prepare the database json files. You can use the script in prepare_lvbench_db.py to prepare the database json files. Please modify the path to your downloaded LVBench database. It will generate the database json files into $DATABASE_DIR/LVBench_4.1.

python -m reproduce.prepare_database /path/to/your/zipfile $DATABASE_DIR
  1. Download LVBench dataset, you could find this 3rd party assets in here. Or you can use the script to download the dataset.
export TARGET_DIR=$DATABASE_DIR/LVBench_4.1
bash reproduce/download_lvbench.sh
  1. Decode the videos into raw frames, you could use the script in decode_frames.py, please modify the path to your downloaded LVBench dataset.
python -m reproduce.decode_frames --part $DATABASE_DIR/LVBench_4.1/all_videos_split.zip.001 --out $TARGET_DIR --fps 2
  1. Run the benchmark. You can use the script in run_benchmark.py to run the benchmark. Please modify the path to your prepared database json files.
python -m reproduce.run_benchmark $TARGET_DIR  $TARGET_DIR/video_info.meta.jsonl