0

Maybe someone know how to use moviepy.video.fx.all.lum_contrast?

I try to use it like stabdart crop and resize:

clip = VideoFileClip("clip.mp4")
clip2 = clip.lum_contrast(1, 1, 126)
clip2.write_videofile("clip_changed.mp4")

But I get some errors:

    clip2 = clip.lum_contrast( 1, 1, 126)
AttributeError: 'VideoFileClip' object has no attribute 'lum_contrast'
Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Adam
  • 3
  • 2

1 Answers1

0

Looking at the documentation something like this should work:

import moviepy.video.fx.all as vfx

clip = VideoFileClip("clip.mp4")
clip2 = clip.fx(vfx.lum_contrast, lum=1, contrast=1, contrast_thr=126)
clip2.write_videofile("clip_changed.mp4")

ArendE
  • 957
  • 1
  • 8
  • 14