-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ‘ignore’ for UTF8 decoding to avoid error on non-UTF8 characters #959
Add ‘ignore’ for UTF8 decoding to avoid error on non-UTF8 characters #959
Conversation
this fix raise an OSError for me : Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): MoviePy error: FFMPEG encountered the following error while writing file /vagrant/media/videos/video/tasters/81_5I1Zgx6.mp4: b'' |
@chrisapplegate would you be able to provide a video that causes this behaviour? |
I support this fix |
No problem for me using this fix. |
I am afraid not - when I filed this PR I was contracting for a client and I am no longer working for them. In any case, the video was confidential. It would not be too hard for me to annotate a public-domain video with the same, if you like? |
Here is one. We have the same problem from our side with this video : https://www.dropbox.com/s/k41malnj0cod4zt/test-videoblocks-footage-of-a-crowd-partying-at-a-rock-concert-or-dj-party_srgs6suqzb__a3c1a2474db660108239cf12e44a8ca7__P360.mp4?dl=0 |
@believeinnovation, does it work if you update to v2.0.0.dev2? (Use |
Hello Tom,
Yes with 2.0.0.dev2 this video file works 👍🏼
Is there any change file for this new version ?
|
Good to hear! Changelog is at https://github.com/Zulko/moviepy/blob/master/CHANGELOG.md#v200dev2-2020-10-05 |
is this still not released? :( |
You can install |
I encountered an issue using moviepy with a video that had been produced by a Spanish-speaking client. In the metadata of the video, the description of the video had a non-UTF8 character in it - the letter "í" of "vídeo" was encoded in some non-UTF8 encoding.
This was causing line 262 of
moviepy/video/io/ffmpeg_reader.py
, the functionffmpeg_parse_infos
, to bug out with aUnicodeDecodeError
:'utf-8' codec can't decode byte 0x92 in position 1712: invalid start byte
I am not overtly familiar with this code base but I don't think adding
ignore
causes the code to break in any meaningful way. The code is not parsing or relying on thatMetadata
field, and as the exception wasn't being caught or handled, I don't think there is an expected input for this function that was working, and now no longer works thanks to this change.