VideoRAG icon indicating copy to clipboard operation
VideoRAG copied to clipboard

Quick start can not work in saving segments

Open shawnyan-01 opened this issue 8 months ago • 1 comments

When following the example, there is a error in saving segments as below. I have tried using moviepy to process the video, it can work independently.

Saving Video Segments test: 0%| | 0/6 [00:01<?, ?it/s] Process Process-2: Traceback (most recent call last): File "/root/autodl-tmp/VideoRAG-main/videorag/_videoutil/split.py", line 76, in saving_video_segments subvideo.write_videofile(os.path.join(video_segment_cache_path, video_file), codec='libx264', verbose=False, logger=None) File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/moviepy/decorators.py", line 54, in requires_duration return f(clip, *a, **k) ^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default return f(clip, *new_a, **new_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB return f(clip, *a, **k) ^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/moviepy/video/VideoClip.py", line 300, in write_videofile ffmpeg_write_video(self, filename, fps, codec, File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_writer.py", line 213, in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec = codec, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/videorag/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_writer.py", line 88, in init '-r', '%.02f' % fps, ~~~~~~~~^~~~~ TypeError: must be real number, not NoneType

Here is my conda environment:

_libgcc_mutex == 0.1
_openmp_mutex == 5.1
accelerate == 0.30.1
annotated-types == 0.7.0
anyio == 4.9.0
asttokens == 3.0.0
av == 12.3.0
bitsandbytes == 0.43.1
bzip2 == 1.0.8
ca-certificates == 2025.2.25
cartopy == 0.24.1
certifi == 2025.1.31
charset-normalizer == 3.4.1
coloredlogs==15.0.1
comm == 0.2.1
contourpy == 1.3.1
ctranslate2 == 4.4.0
cycler == 0.12.1
debugpy == 1.8.11
decorator == 4.4.2
distro == 1.9.0
einops == 0.8.1
eva-decord == 0.6.1
executing == 0.8.3
faster-whisper == 1.0.3
filelock == 3.18.0
flatbuffers == 25.2.10
fonttools == 4.57.0
fsspec == 2025.3.2
ftfy == 6.3.1
fvcore == 0.1.5.post20221221
h11 == 0.14.0
hnswlib == 0.8.0
httpcore == 1.0.8
httpx == 0.28.1
huggingface-hub == 0.30.2
humanfriendly == 10.0
idna == 3.10
imagebind == 0.1.0
imageio == 2.37.0
imageio-ffmpeg == 0.6.0
iopath 0.1.10
ipykernel 6.29.5
ipython 8.30.0
jedi 0.19.2
jinja2 3.1.6
jiter 0.9.0
jupyter_client 8.6.3
jupyter_core 5.7.2
kiwisolver 1.4.8
ld_impl_linux-64 2.40
libffi 3.4.4
libgcc-ng 11.2.0
libgomp 11.2.0
libsodium 1.0.18
libstdcxx-ng 11.2.0
libuuid 1.41.5
markupsafe 3.0.2
matplotlib 3.10.1
matplotlib-inline 0.1.6
moviepy 1.0.3
mpmath 1.3.0
nano-vectordb 0.0.4.3
neo4j 5.28.1
nest-asyncio 1.6.0
networkx 3.4.2
numpy 1.26.4
nvidia-cublas-cu12 12.1.3.1
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 8.9.2.26
nvidia-cufft-cu12 11.0.2.54
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-nccl-cu12 2.18.1
nvidia-nvjitlink-cu12 12.8.93
nvidia-nvtx-cu12 12.1.105
ollama 0.4.7
onnxruntime 1.21.0
openai 1.74.0
openssl 3.0.16 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main packaging 24.2 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main parameterized 0.9.0 pypi_0 pypi parso 0.8.4 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pexpect 4.8.0 pyhd3eb1b0_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pillow 10.4.0 pypi_0 pypi pip 25.0 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main platformdirs 4.3.7 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main portalocker 3.1.1 pypi_0 pypi proglog 0.1.11 pypi_0 pypi prompt-toolkit 3.0.43 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main prompt_toolkit 3.0.43 hd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main protobuf 6.30.2 pypi_0 pypi psutil 7.0.0 pypi_0 pypi ptyprocess 0.7.0 pyhd3eb1b0_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pure_eval 0.2.2 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pydantic 2.11.3 pypi_0 pypi pydantic-core 2.33.1 pypi_0 pypi pygments 2.19.1 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pyparsing 3.2.3 pypi_0 pypi pyproj 3.7.1 pypi_0 pypi pyshp 2.3.1 pypi_0 pypi python 3.11.11 he870216_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python-dateutil 2.9.0post0 py311h06a4308_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python-dotenv 1.1.0 pypi_0 pypi pytorchvideo 0.1.5 pypi_0 pypi pytz 2025.2 pypi_0 pypi pyyaml 6.0.2 pypi_0 pypi pyzmq 26.2.0 py311h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main readline 8.2 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main regex 2024.11.6 pypi_0 pypi requests 2.32.3 pypi_0 pypi safetensors 0.5.3 pypi_0 pypi setuptools 75.8.0 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main shapely 2.1.0 pypi_0 pypi six 1.17.0 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main sniffio 1.3.1 pypi_0 pypi sqlite 3.45.3 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main stack_data 0.2.0 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main sympy 1.13.3 pypi_0 pypi tabulate 0.9.0 pypi_0 pypi tenacity 9.1.2 pypi_0 pypi termcolor 3.0.1 pypi_0 pypi tiktoken 0.9.0 pypi_0 pypi timm 1.0.15 pypi_0 pypi tk 8.6.14 h39e8969_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tokenizers 0.15.2 pypi_0 pypi torch 2.1.2 pypi_0 pypi torchaudio 2.1.2 pypi_0 pypi torchvision 0.16.2 pypi_0 pypi tornado 6.4.2 py311h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tqdm 4.67.1 pypi_0 pypi traitlets 5.14.3 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main transformers 4.37.1 pypi_0 pypi triton 2.1.0 pypi_0 pypi types-regex 2024.11.6.20250403 pypi_0 pypi typing-extensions 4.13.2 pypi_0 pypi typing-inspection 0.4.0 pypi_0 pypi typing_extensions 4.12.2 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tzdata 2025a h04d1e81_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main urllib3 2.4.0 pypi_0 pypi wcwidth 0.2.13 pypi_0 pypi wheel 0.45.1 py311h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main xxhash 3.5.0 pypi_0 pypi xz 5.6.4 h5eee18b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main yacs 0.1.8 pypi_0 pypi zeromq 4.3.5 h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main zlib 1.2.13 h5eee18b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

shawnyan-01 avatar Apr 23 '25 13:04 shawnyan-01

Hi 👋!

Thanks for your interest in VideoRAG! It looks like the issue is caused by ffmpeg not working correctly. Please check whether ffmpeg is properly installed on your device :)

Best regards, Xubin

Re-bin avatar Aug 28 '25 14:08 Re-bin