Jump to content

IP Camera stream + record


FireFox
 Share

Recommended Posts

looks like it still crashes even while displaying 1 camera too..

nope the memory usage peaks at 24MB and is usually around 22MB

crash = brutal crash w no error (even tried running in console mode to see if autoit caught an error - nope)

Link to comment
Share on other sites

do you think its one of the variables reaching a high number or something?

im going to add this to the while loop...

_FileWriteLog($log_file, "$bRecvtmp_A: " & $bRecvtmp_A & ", " & "$sStream_A: " & $sStream_A & ", " & "$iContLenPos_A: " & $iContLenPos_A & ", " & "$iEOH_A: " & $iEOH_A & ", " & "$sTrim2ContLen_A: " & $sTrim2ContLen_A & ", " & "$iImgLen_A: " & $iImgLen_A & ", " & "$iStreamLen_A: " & $iStreamLen_A & ", " & "$hBMP_A: " & $hBMP_A & ", " & "$hHBITMAP2_A: " & $hHBITMAP2_A)
_FileWriteLog($log_file, "$bRecvtmp_B: " & $bRecvtmp_B & ", " & "$sStream_B: " & $sStream_B & ", " & "$iContLenPos_B: " & $iContLenPos_B & ", " & "$iEOH_B: " & $iEOH_B & ", " & "$sTrim2ContLen_B: " & $sTrim2ContLen_B & ", " & "$iImgLen_B: " & $iImgLen_B & ", " & "$iStreamLen_B: " & $iStreamLen_B & ", " & "$hBMP_B: " & $hBMP_B & ", " & "$hHBITMAP2_B: " & $hHBITMAP2_B & @CRLF)

have you been able to see the crash behavior?

thanks again for your help! =)

Link to comment
Share on other sites

hmm maybe im logging too much this log file looks crazy!

logging these instead

 

_FileWriteLog($log_file, "$iContLenPos_A: " & $iContLenPos_A & ", " & "$iEOH_A: " & $iEOH_A & ", " & "$iImgLen_A: " & $iImgLen_A & ", " & "$iStreamLen_A: " & $iStreamLen_A & @CRLF)
Edited by gcue
Link to comment
Share on other sites

other clues?

- i put in a >timer to see how long it takes when it crashes - the last two times it crashed at 01:49:16 and 01:49:23 (in both cases, 1 hour and 49 minutes later)

- could it be that the data pulls happen too frequently? i see some instances where ~300 requests occur in 1 second

im trying to set 2048 instead of 4096 to see how that plays out

 

TCPRecv($iSocket_B, 2048, 1)
Edited by gcue
Link to comment
Share on other sites

Made in China, that's all I can say.

See that I don't disconnect the camera if there is a TCPRecv error because in reality the camera is not disconnected, so it may explains this amount of requests until the data is back.

It will take some time to solve the issue because as you know it does not crash fastly.

Link to comment
Share on other sites

If the data is not a valid image the script will write it into a debug file and exit, I hope to find something interesting.

Attached the current script I have.

Edited by FireFox
Link to comment
Share on other sites

what if we put a sleep(100) in there? i added this also...

 

If $iSocket_A <> "" Then
$bRecvtmp_B = TCPRecv($iSocket_B,...

I don't know, I'm not doing my tests on your script.

Edit: Putting a sleep won't fix the crash, it will only get down the fps.

Edited by FireFox
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...