Skip to content
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

MoviePy 2.0 throws exception on loading video previous version worked with #2256

Closed
Breakthrough opened this issue Nov 23, 2024 · 2 comments · Fixed by #2253
Closed

MoviePy 2.0 throws exception on loading video previous version worked with #2256

Breakthrough opened this issue Nov 23, 2024 · 2 comments · Fixed by #2253
Labels
bug Issues that report (apparent) bugs.

Comments

@Breakthrough
Copy link
Contributor

Expected Behavior

MoviePy should continue to work with the same videos it did previously, even if those videos aren't fully compliant (e.g. are missing some metadata).

Actual Behavior

The same video crashes on MoviePy 2.0 but works with MoviePy 1.x.

Steps to Reproduce the Problem

See the corrupt_video.mp4 file from https://github.com/Breakthrough/PySceneDetect/tree/resources/tests/resources and the associated unit test in https://github.com/Breakthrough/PySceneDetect/blob/95d20ddca57bb8cba77354697cc092643bd04afb/tests/test_video_stream.py#L359

The issue seems to come from the ffmpeg info parser assuming the presence of certain metadata fields. Instead of failing, MoviePy should probably try to set some reasonable default value for these fields if they are not critical, to improve compatibility with media files.

Specifications

Tested on a wide variety of OS and Python versions:

  • os: [macos-13, macos-14, ubuntu-20.04, ubuntu-latest, windows-latest]
  • python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
@Breakthrough Breakthrough added the bug Issues that report (apparent) bugs. label Nov 23, 2024
@aperture147
Copy link

moviepy v2 has a lot of unexpected error, like transparent sometimes work incorrectly. Currently I have to switch to libopenshot for my project

@Breakthrough
Copy link
Contributor Author

Thanks for getting a fix for this out so quickly @Zulko, much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants