Error: invalid value encountered in true_divide L_norm = L/np.max(L)
NuMetalz opened this issue · 1 comments
Hey I'm getting this error when running this script on the attached video.
Trying to sync my elgato game capture footage to my microphone.
video-file.mp4
My series of errors includes this:
E:/hate5sync.py:30: RuntimeWarning: invalid value encountered in true_divide
L_norm = L/np.max(L)
Traceback (most recent call last):
File "E:/hate5sync.py", line 78, in
peak_audio = compute_audio_peak(video_f
ile, fps)
File "E:/hate5sync.py", line 52, in compute_audio_peak
ffmpeg.input(video_file).output(audio_stream).run()
AttributeError: module 'ffmpeg' has no attribute 'input'
For best results the screen recording should start when the slate video is full screen and not sooner, otherwise the algorithm will struggle to find the actual peak.
Also, which version of ffmpeg are you running? Based on that error it sounds like the wrong package may be installed. This might be helpful: kkroening/ffmpeg-python#174 (comment)