Moviepy: Loop vfx will cut audio unexpectedly

Created on 3 Nov 2020  路  2Comments  路  Source: Zulko/moviepy

The bug

When using the loop vfx with an n smaller than 1 (or a duration smaller than original duration),
the audio clip will cut unexpectedly.

from moviepy.editor import *

PATH = ""
vid = VideoFileClip(PATH)
vid = vid.fx(vfx.loop, n=0.5)

vid.write_videofile("render.mp4")

# The resulting file length will be half of the original, as intended.
# However, In the rendered file, the audio will cut halfway through! (a quarter of original duration)

Specifications

  • Python Version: 3.6
  • Moviepy Version: 2.0.0.dev2
  • Platform Name: Windows 10
  • Platform Version: 10.0
audio bug

Most helpful comment

@RealA10N , @tburrows13 I was able to reproduce this for the current moviepy version.
PR #1373 should fix this.
I used big_buck_bunny_0_30.webm found in media folder for video clip and on giving n=0.5, the clip is generated fine. Audio is not cut halfway.

All 2 comments

@RealA10N , @tburrows13 I was able to reproduce this for the current moviepy version.
PR #1373 should fix this.
I used big_buck_bunny_0_30.webm found in media folder for video clip and on giving n=0.5, the clip is generated fine. Audio is not cut halfway.

I can confirm that #1373 fix this :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Netherdrake picture Netherdrake  路  5Comments

skizzy picture skizzy  路  3Comments

tburrows13 picture tburrows13  路  3Comments

Swiffers picture Swiffers  路  4Comments

bilel picture bilel  路  4Comments