Hi everyone,
After they broke in by my mother and a few weeks later by my sister at home ...
I decided to install some IP cameras and to connect them to a PC running win,
internal camera via wifi, and two external cameras via LAN (CAT5) cables.
this two cameras are connected to a HUB and PC.
Is there a way to create a IP connection via PB 5.70, and view in a real time steaming window,
and store the images on a HDD ?
thanks,
marc
IP camera wiewer ...
IP camera wiewer ...
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: IP camera wiewer ...
How large is your HDD ?
If you only want to store the stream it should be no problem.
But I think it is enough to fetch every 5 second a picture and store it.
In this way you can also show the pictures directly in PB.
For the stream you need to embed/involve VLC or ffmpg.
But you will get a lot of traffic on the net.
In our company we installed a complete own network infrastructure for the cams,
because else they slow down the normal user network.
If you only want to store the stream it should be no problem.
But I think it is enough to fetch every 5 second a picture and store it.
In this way you can also show the pictures directly in PB.
For the stream you need to embed/involve VLC or ffmpg.
But you will get a lot of traffic on the net.
In our company we installed a complete own network infrastructure for the cams,
because else they slow down the normal user network.
Re: IP camera wiewer ...
Hi marc_256,
I know you're familar with PureBasic Interface to OpenCV, but have you tried connecting your camera via OpenCV's RTSP, particularlly using the FFMPEG functions; see the example cv_RTSP_writeframe_FFMPEG.pb. Combine this with the example cv_webcam_zone_tracking.pb, could make for a powerful application.
Another option might be to use the WebGadget, capturing the RTSP stream, drawing its contents to an image. Depending on the cameras manufacture, it should come with a configuration tool built-in to the firmware.
Cheers!
I know you're familar with PureBasic Interface to OpenCV, but have you tried connecting your camera via OpenCV's RTSP, particularlly using the FFMPEG functions; see the example cv_RTSP_writeframe_FFMPEG.pb. Combine this with the example cv_webcam_zone_tracking.pb, could make for a powerful application.
Another option might be to use the WebGadget, capturing the RTSP stream, drawing its contents to an image. Depending on the cameras manufacture, it should come with a configuration tool built-in to the firmware.
Cheers!
Re: IP camera wiewer ...
Hi infratec,
I will also extend in my company the existing alarm system with some cameras,
and I bought a exterior HDD of 2 x 2TB in RAID 1 mode.
With a separated LAN for the cameras.
And you are write every 5 sec is OK to send via WIFI,
and streaming only if there is an alarm.
Yes, I was looking to VLC ...
Hello JHPJHP,
"I know you're familar with PureBasic Interface to OpenCV"
I think you are the best man who is familar with OpenCV
Oh, yes I will see for it,
I like to use PB so I can control some stuff myself.
I gone work on it this WE ...
thanks for the tip.
greetings,
marc
I will also extend in my company the existing alarm system with some cameras,
and I bought a exterior HDD of 2 x 2TB in RAID 1 mode.
With a separated LAN for the cameras.
And you are write every 5 sec is OK to send via WIFI,
and streaming only if there is an alarm.
Yes, I was looking to VLC ...
Hello JHPJHP,
"I know you're familar with PureBasic Interface to OpenCV"
I think you are the best man who is familar with OpenCV
Oh, yes I will see for it,
I like to use PB so I can control some stuff myself.
I gone work on it this WE ...
thanks for the tip.
greetings,
marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: IP camera wiewer ...
this code has not been tested!!
Code: Select all
;///////////////////////////////////////////////////////////////////
;!!warning this code has not been tested, And use at your own risk!!
;///////////////////////////////////////////////////////////////////
InitNetwork()
ip.s = "192.168.1.22" ;ip camera
Port = 8091 ; port camera
path.s = "/videostream.cgi" ; path of request
authentification.s = "yourauth==" ; your authentification!
workmemory = AllocateMemory(1024*1024*2) ;memory to receive image data
c= OpenNetworkConnection(ip,Port)
If c
SendNetworkString(c,"GET " + path + " HTTP/1.1" + #CRLF$ +
"Host: " + ip + ":" + Port + #CRLF$ +
"Connection: keep-alive" + #CRLF$ +
"Authorization: Basic " + authentification + #CRLF$ + #CRLF$ ,#PB_Ascii) ; send request to get image
Repeat
ec = NetworkClientEvent(c)
If ec = #PB_NetworkEvent_Data
rs = ReceiveNetworkData(c,workmemory,1024*1024*2)
req.s = PeekS(workmemory,-1,#PB_Ascii);get request
ShowMemoryViewer(workmemory,rs)
imagesize = Val(StringField(StringField(req,2,"Content-Length: "),1,#CRLF$))
imageaddress = workmemory + rs - imagesize
;;........
EndIf
Until ec = #PB_NetworkEvent_Disconnect
EndIf
interested in Cybersecurity..