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

Gap (delay) between loops in 'loop' FX #1358

Open
ArztKlein opened this issue Oct 18, 2020 · 4 comments
Open

Gap (delay) between loops in 'loop' FX #1358

ArztKlein opened this issue Oct 18, 2020 · 4 comments
Labels
feature-request Request for a new feature or additional functionality. good-first-issue Especially suitable for people new to moviepy and/or programming; beginner-friendly.

Comments

@ArztKlein
Copy link

I'd like to request an argument with the audio_loop function which is a gap duration - a gap of time with no audio between the loops.
https://zulko.github.io/moviepy/ref/audiofx/moviepy.audio.fx.all.audio_loop.html

@ArztKlein ArztKlein added the feature-request Request for a new feature or additional functionality. label Oct 18, 2020
@tburrows13
Copy link
Collaborator

It's a good idea. Probably worth noting that I was thinking that we could probably get rid of audio_loop entirely in favour of the existing loop (which should work for both video and audio) because whilst the implementation is quite different, the end result is the same. Presumably the 'gap' could also work in the video version of loop and just have a blank (or transparent) screen for the gap duration.

@tburrows13 tburrows13 added the good-first-issue Especially suitable for people new to moviepy and/or programming; beginner-friendly. label Oct 21, 2020
@DJ73
Copy link

DJ73 commented Oct 27, 2020

I would like to try this out. Although, if there is a common loop option for audio and video, then the function should have a different file structure. I think audio_loop should ideally return just the audio, without the video and similarly, video_loop could return the video without audio. A common loop function can probably have options to retain audio or video such that it calls the other two for further processing

@tburrows13
Copy link
Collaborator

I'd like to keep the current loop as it is, as it follows a standard set out by other effects in video.fx (such as e.g. time_mirror), that is, have it always apply to video, audio and mask, if available. In the rare case where the user wishes to apply it only to the audio of a video, then they can simply do clip.audio = clip.audio.loop(...). Similar solutions can be done to any variation that you can think of.

Before you add the gap parameter, I'd recommend that you do #1368 first :)

@tburrows13
Copy link
Collaborator

audio_loop is now gone in #1451, so we just have loop that works on audio and video. Anyone is still welcome to implement a gap parameter to it.

@mondeja mondeja changed the title Gap (Delay) between loops in audio_loop Gap (delay) between loops in 'loop' FX Jan 21, 2021
@tburrows13 tburrows13 mentioned this issue Jan 22, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature or additional functionality. good-first-issue Especially suitable for people new to moviepy and/or programming; beginner-friendly.
Projects
None yet
Development

No branches or pull requests

3 participants