hate5sync icon indicating copy to clipboard operation
hate5sync copied to clipboard

Error: invalid value encountered in true_divide L_norm = L/np.max(L)

Open NuMetalz opened this issue 3 years ago • 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.

https://user-images.githubusercontent.com/22466109/164566839-8e395e3c-f286-46b5-8c1e-5ced0247800c.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'

NuMetalz avatar Apr 21 '22 23:04 NuMetalz

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: https://github.com/kkroening/ffmpeg-python/issues/174#issuecomment-823979132

hate5six avatar Apr 22 '22 00:04 hate5six