File size: 2,395 Bytes
eb65429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# 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.