moviepy: OSError: MoviePy error: failed to read the duration of file
Problem : Reading video in local and docker-compose file works fine but in minikube below issue occured
Expected Behavior
>>> from moviepy.editor import *
>>> clip=VideoFileClip("https://videorenderingbucket.s3.ap-south-1.amazonaws.com/video_file/Pranali_Shukan_Wedding_Invite.mp4_video_2023-06-19_10%3A25%3A13.685572.mp4")
>>> clip
<moviepy.video.io.VideoFileClip.VideoFileClip object at 0x7f175c97ac40>
Actual Behavior
From moviepy. Editor import *
clip=videofileclip("https: //videorenderingbucket. S3. Ap-south-1. Amazonaws. Com/video_file/the+breathtaking+beauty+of+nature+-+hd. Mp4")`
### Logs
traceback (most recent call last):
file "/usr/local/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 "<stdin>", line 1, in <module>
file "/usr/local/lib/python3.8/site-packages/moviepy/video/io/videofileclip. Py", line 88, in __init__
self. Reader = ffmpeg_videoreader(filename, pix_fmt=pix_fmt,
file "/usr/local/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 "/usr/local/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 https: //videorenderingbucket. S3. Ap-south-1. Amazonaws. Com/video_file/the+breathtaking+beauty+of+nature+-+hd. Mp4.
Here are the file infos returned by ffmpeg:
ffmpeg version 4.2.2-static https: //johnvansickle. Com/ffmpeg/ copyright (c) 2000-2019 the ffmpeg developers
built with gcc 8 (debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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`
Specifications
- Python Version: 3.8.10
- MoviePy Version:1.0.3
- Platform Name: Minikube
- Platform Version: v1.30.1
Requirement.txt
- aiofiles==23.1.0
- autopep8==2.0.2
- bcrypt==4.0.1
- boto3==1.26.144
- chill==0.9.0
- cloudpickle==2.2.1
- cryptography==41.0.1
- fastapi==0.95.0
- ffmpeg-python==0.2.0
- ffpyplayer==4.4.0
- flower==1.2.0
- httpx==0.23.3
- ipykernel==6.22.0
- moviepy==1.0.3
- mysql-connector-python==8.0.33
- opencv-python==4.7.0.72
- pandas==1.5.3
- pip-chill==1.0.1
- pyjwt==2.7.0
- pymysql==1.0.3
- python-decouple==3.8
- python-dotenv==1.0.0
- python-multipart==0.0.6
- rabbitmq==0.2.0
- redis==4.5.4
- sqlalchemy==2.0.12
- uvicorn==0.21.1
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 21
our concerns is why this library can’t load video from s3 link that’s right direction to think i guess
please open my issue again i did formating stuff
thanks i will update in proper format
Closing this issue as it’s missing information for reproducability, like useful code samples or properly formatted error logs. Please use code-formatted text for code and logs, not screenshots.
We can reopen the issue once you’ve updated it. Please be aware you should always try to work with the latest master of MoviePy where possible, not the last PyPI release, which is quite old.