beaston02 / CamsodaRecorder

52 stars 78 forks source link

Multiple Recordings of same Stream / error in recording_models list index out of range #8

Open deepsy4711 opened 6 years ago

deepsy4711 commented 6 years ago

got error "error in recording_models list index out of range" after a few iterations then the stream start recording again. so then therer are multiple recordings running

actual test-branch

sorry for my bad english

rpseleven commented 6 years ago

I see multiple recordings spawning as well on a Windows system on the test branch. I noticed it was very periodic, happening every 8 or so loops, so I figured it must be related to a static time definition. There are only two such lines that compare time like this, and only one that is followed by a call to start a recording.

The part in camsoda.py that tries to start a new recording if a recording has not been updated in 300 seconds (5 minutes) based on file modification time (st_mtime) seems to not work as expected on a Windows platform. You can just replace line 156 (RecordingThread(model_data, settings, r).start()) with "pass" and it will stop spawning unneeded multiple recordings. You could also print out something to console to see how this call always tests true after a little while after the recording has started. I'll see if I can find exactly why this is doing this, and find a way to get it to work on a Windows platform.

Sort of funny, this can really snowball if you either are recording lots of models or have left the script going for a while. Good way to get an IP ban.

alucard13s commented 6 years ago

@deepsy4711 hi i don't know if it could help from searching to record with sound i found when changed ffmpeg version it stop to record in loop. But i have an another problem in windows it don't record with sound, if you could share your directory with your ffmpeg version to see if it's my version that make this. i didn't found a download link of ffmpeg for windows with all codec enabled. First time that i don't have sound with record. Can you help me ? Thanks in advance. If you @rpseleven can help me too it will be great. I have windows 8.1 installed. Thanks