Open-Sora/tools/scene_cut
2024-04-13 15:44:24 +08:00
..
__init__.py
main_cut_multi_thread.py
main_cut_pandarallel.py
process_meta.py
README.md a bunch of update for data 2024-04-13 15:44:24 +08:00
scene_detect.py
utils_video.py

Scene Detection and Video Splitting

Formatting

Input meta should be {prefix}.csv with column 'videoId'

python tools/scene_cut/process_meta.py --task append_format --meta_path /mnt/hdd/data/pexels_new/raw/meta/popular_6.csv --split popular_6

Output is {prefix}_format.csv (with column path) and {prefix}_intact.csv (with column intact and path)

Scene Detection

Input meta should be {prefix}_format.csv

python tools/scene_cut/scene_detect.py --meta_path /mnt/hdd/data/pexels_new/raw/meta/popular_6_format.csv

Output is {prefix}_format_timestamp.csv

Video Splitting

Input meta should be {prefix}_timestamp.csv

python tools/scene_cut/main_cut_pandarallel.py \
    --meta_path /mnt/hdd/data/pexels_new/raw/meta/popular_6_format_timestamp.csv \
    --out_dir /mnt/hdd/data/pexels_new/scene_cut/data/popular_6

Output is {out_dir}/{wo_ext}_scene-{sid}.mp4

TODO: meta for video clips