| # Video preparation scripts |
|
|
| These scripts help you assemble the source videos that the SFT dataset |
| references. **The videos themselves are NOT redistributed in this repo** for |
| licensing reasons; only annotations and tool-returned frames are included. |
|
|
| ## What is referenced |
|
|
| Each parquet row has a `video_relpath` column such as: |
|
|
| ``` |
| LongVT/videos/0b8d0b9e-...mp4 |
| VideoVista/videos/xxx.mp4 |
| LLaVA-Video-178K/nextqa/videos/xxx.mp4 |
| CinePile/videos/xxx.mp4 |
| ``` |
|
|
| You need to make these paths resolve from wherever you use the dataset. |
|
|
| ## Quick start |
|
|
| ```bash |
| # 1. Download the SFT dataset |
| huggingface-cli download MihailSlutsky/videotir-sft-v2 --local-dir ./videotir-sft-v2 |
| cd ./videotir-sft-v2 |
| tar xzf images.tar.gz |
| |
| # 2. Download the original source videos |
| HF_TOKEN=xxx python scripts/download_sources.py \ |
| --sft-dir ./videotir-sft-v2 \ |
| --output-dir ./videotir-sft-v2-videos |
| |
| # 3. Build a single video tree aligned with video_relpath |
| python scripts/prepare_videos.py \ |
| --sft-dir ./videotir-sft-v2 \ |
| --video-source-dir ./videotir-sft-v2-videos \ |
| --output-dir ./videotir-sft-v2/videos \ |
| --verify |
| ``` |
|
|
| After step 3, `videotir-sft-v2/videos/<video_relpath>` should exist for every |
| row. |
|
|
| ## Source-specific notes |
|
|
| ### LongVT / VideoVista |
|
|
| - LongVT: `EvolvingLMMs-Lab/LongVT` |
| - VideoVista: `MasterBin-IIAU/VideoVista` |
| - Accept the dataset license on HuggingFace before downloading. |
|
|
| ### LLaVA-Video-178K |
|
|
| - Repo: `lmms-lab/LLaVA-Video-178K` |
| - Videos are packed in per-split tar.gz archives (e.g. |
| `0_30_s_nextqa/0_30_s_nextqa_videos_1.tar.gz`). `download_sources.py` |
| downloads the archives, extracts the needed files, and flattens them into |
| `LLaVA-Video-178K/<split>/videos/`. |
|
|
| ### CinePile |
|
|
| - Repo: `joezid/cinepile` |
| - Videos are under the `videos/` folder in that dataset. |
|
|
| ### Ego4D |
|
|
| - Full raw videos are **not** available from HuggingFace. |
| - You must accept the Ego4D license at https://ego4d-data.org/ and download |
| the videos yourself. |
| - `download_sources.py` will create a placeholder file explaining this; |
| `prepare_videos.py` will then be able to symlink your local Ego4D clips if |
| you place them at `videotir-sft-v2-videos/ego4d_nlq/videos/`. |
|
|
| ## Manual fallback |
|
|
| If a source is not reachable from your current HuggingFace endpoint, you can |
| manually download the videos and just use `prepare_videos.py` with |
| `--video-source-dir` pointing at your local tree. |
|
|