moviepy: Can't make VideoFileClip 'utf8'
'utf8' codec can't decode byte 0xce in position 1873: invalid continuation byte
Exception AttributeError: "VideoFileClip instance has no attribute 'reader'" in <bound method
VideoFileClip.__del__ of <moviepy.video.io.VideoFileClip.VideoFileClip instance at 0x02D9F440>> ignored
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (3 by maintainers)
Hi,
I have the same trouble, so I investigate and I found the line, in the moviepy lib, it’s the file video/io/ffmpeg_reader.py line 263. The error come from the line error.decode(‘utf8’), The error content is: b"ffmpeg version 4.1-static https://johnvansickle.com/ffmpeg/ Copyright © 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --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-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘e00f5d50d5c444a8894d119dd7f879bf.mp4’: Metadata: major_brand : mp42 minor_version : 1 compatible_brands: mp42mp41 creation_time : 2017-09-11T09:44:59.000000Z Duration: 00:00:20.40, start: 0.000000, bitrate: 10186 kb/s Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 9926 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default) Metadata: creation_time : 2017-09-11T09:44:59.000000Z handler_name : Module de gestion vid\x8eo Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default) Metadata: creation_time : 2017-09-11T09:44:59.000000Z handler_name : Module de gestion sonore At least one output file must be specified "
Indeed correct the line 263 with the line:
infos = error.decode('utf8','ignore')
fix the bug @Zulko can you investigate this error? I tried a basicVideoFileClip("file.mp4")
orVideoFileClip("file.mov")
but the error is the same.The bug is the same in 1.0.0 and 1.0.1.
Thanks a lot!
I met the same problem. Someone has proposed to correct this by using
decode('utf8','ignore')
https://blog.51cto.com/cfy10/2391370