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

Inconsistent video duration before and after write_videofile #2203

Open
chamecall opened this issue Jul 13, 2024 · 1 comment
Open

Inconsistent video duration before and after write_videofile #2203

chamecall opened this issue Jul 13, 2024 · 1 comment
Labels
bug Issues that report (apparent) bugs.

Comments

@chamecall
Copy link

chamecall commented Jul 13, 2024

Steps to Reproduce the Problem

from moviepy.video.VideoClip import ColorClip
clip = ColorClip((600, 400), color=(255, 100, 0), duration=3.1, )
clip.fps = 24

clip.write_videofile("out.mp4")
loaded_clip = VideoFileClip("out.mp4")
print('difference:', loaded_clip.duration - clip.duration)

Expected Behavior

difference: 0.0

Actual Behavior

difference in durations not equal to zero and differs depending on source duration.
for this exact example I have the following:

difference: -0.020000000000000018

Specifications

  • Python Version: Python 3.10.0
  • MoviePy Version: any of (1.0.3, 2.0.0.dev1, 2.0.0.dev2)
  • Platform Name: Windows
  • Platform Version: 10
@chamecall chamecall added the bug Issues that report (apparent) bugs. label Jul 13, 2024
@chamecall
Copy link
Author

chamecall commented Jul 13, 2024

I checked saved video duration using ffprobe and it has the same duration like after repeated moviepy load so it appears that duration changes during saving not loading

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

No branches or pull requests

1 participant