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

Fixed Optional Progress Bar in cuts/detect_scenes #587

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions moviepy/video/tools/cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def write_gifs(self, clip, gif_dir):

@use_clip_fps_by_default
def detect_scenes(clip=None, luminosities=None, thr=10,
progress_bar=False, fps=None):
progress_bar=True, fps=None):
""" Detects scenes of a clip based on luminosity changes.

Note that for large clip this may take some time
Expand Down Expand Up @@ -320,7 +320,7 @@ def detect_scenes(clip=None, luminosities=None, thr=10,

if luminosities is None:
luminosities = [f.sum() for f in clip.iter_frames(
fps=fps, dtype='uint32', progress_bar=1)]
fps=fps, dtype='uint32', progress_bar=progress_bar)]

luminosities = np.array(luminosities, dtype=float)
if clip is not None:
Expand Down