JasonLovesDoggo/RedditVideoMakerBot

[Issue] Video clipper having issues shortening video

Closed this issue · 9 comments

Seem to be getting this hit-and-miss issue when running main.py. It will get the images, do the audio, but when segmenting the video, this error shows up 3/5 times.

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 285, in ffmpeg_parse_infos
line = [l for l in lines if keyword in l][index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 47, in
main()
File "main.py", line 33, in main
chop_background_video(length)
File "/Users/user/Desktop/RVMB/video_creation/background.py", line 42, in chop_background_video
background = VideoFileClip(f"assets/backgrounds/{choice}")
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in init
self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in init
infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 289, in ffmpeg_parse_infos
raise IOError(("MoviePy error: failed to read the duration of file %s.\n"
OSError: MoviePy error: failed to read the duration of file assets/backgrounds/.DS_Store.
Here are the file infos returned by ffmpeg:

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
assets/backgrounds/.DS_Store: Invalid data found when processing input

I'm going to throw out a wildcard and guess that you are on Mac
FFmpg has some issues on Mac

I'm going to throw out a wildcard and guess that you are on Mac FFmpg has some issues on Mac

No, I have the same error ive been monitoring this thread like a NSA agent, Im on windows 10 enterprise.

https://superuser.com/questions/757593/what-is-ds-store-file-in-windows

I'm going to throw out a wildcard and guess that you are on Mac FFmpg has some issues on Mac

No, I have the same error ive been monitoring this thread like a NSA agent, Im on windows 10 enterprise.

try deleting the DS_STORE file as the program doesn't need it.

https://superuser.com/questions/757593/what-is-ds-store-file-in-windows

I'm going to throw out a wildcard and guess that you are on Mac FFmpg has some issues on Mac

No, I have the same error ive been monitoring this thread like a NSA agent, Im on windows 10 enterprise.

try deleting the DS_STORE file as the program doesn't need it.

Doesn't even exist yet sir.

It does. Just hidden from file explorer

Will be closing tomorrow morning if this remains inactive