-
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
MoviePy VideoClip Methods and Gif Looping Issue: set_ Methods Ineffective for VideoClip, Gif Not Looping in Python Code #2084
Comments
Using loop function or concatenate_videoclips:
from moviepy.video.fx.loop import loop
bg = VideoFileClip(r'D:\AI\YT_Automation\Video_Maker\brole.mp4')
gf = VideoFileClip(r'D:\AI\YT_Automation\Video_Maker\tmp7dzte94v.gif')
gf = loop(gf, duration=bg.duration)
CompositeVideoClip([bg, gf]).write_videofile('temp.mp4', fps=16)
bg = VideoFileClip(r'D:\AI\YT_Automation\Video_Maker\brole.mp4')
gf = VideoFileClip(r'D:\AI\YT_Automation\Video_Maker\tmp7dzte94v.gif')
duration = bg.duration
loop_count = int(duration // gf.duration + 1)
gf_loop = concatenate_videoclips([gf] * loop_count)
gf_loop = gf_loop.set_duration(duration)
CompositeVideoClip([bg, gf_loop]).write_videofile('temp.mp4', fps=16) |
Thanks for the GIF issue solving but there are more Issues with the set_ methods and also with the CompositeVideoClip the CompositeVideoClip Put the Video over each other instead of their own Cordinates. |
The CompositeVideoClip DO Not Work Properly. It Do not Position the Clips on each other properly.
|
Thank you for your contributions and for reporting issues in this repository. With the release of v2, which introduces significant changes to the codebase and API, we’ve reviewed the backlog of open PRs and issues. Due to the length of the backlog and the likelihood that many of these are either fixed or no longer applicable, we’ve made the decision to close all previous PRs and issues. If you believe that any of these are still relevant to the current version or if you'd like to reopen a related discussion, please feel free to create a new issue or pull request, referencing the old one. Thank you for your understanding and continued support! |
Description
The Set methods do not work as expected they do not change the new video data.
The Gif Do not Loop.
Issue Details
Expected Behavior
When using
set_start
,set_end
,set_position
, etc., theCompositeVideoClip
should incorporate these changes into the final video, adjusting the start time, end time, and position of the GIF accordingly.Actual Behavior
The
set_start
,set_end
, andset_position
methods appear to be ineffective in modifying the originalVideoFileClip
. Consequently, the composite video does not reflect the specified alterations, and the output remains inconsistent with the expected changes.Problematic Code
Output Video:-
temp.mp4
Output Comparison
Working Code
Output Video:-
temp.mp4
Output Comparison
Specifications
Windows Specification
Hardware
The text was updated successfully, but these errors were encountered: