Page 1 of 1

ip camera wiev help

Posted: Mon Apr 03, 2017 9:02 am
by erdogan_ozkaya
Friends,

I have a ip camera, I want to connect to it and watch it?

If you give an example, I am happy.

Thank you



RVCamera1.Parameters.Alias := 'Foscam';
RVCamera1.CameraHost := '192.168.1.245';
RVCamera1.CameraPort := 80;
RVCamera1.UserName := 'admin';
RVCamera1.UserPassword := '12345';
RVCamera1.SearchCamera;

IP camera model : DP-12CD1010-I

HTTP Port 80

RTSP Port 554

HTTPS Port 443

Server Port 8000

Re: ip camera wiev help

Posted: Mon Apr 03, 2017 9:46 am
by Sergey Tkachenko
If this camera is RTSP / H.264 camera, you need
1) Assign RVCamera1.VideoFormat := rvvfH264 (if it is equal to rvvfMJPEG, SearchCamera searches only for MJPEG streams)
2) Make sure that FFmpeg DLLs are available

PS: If you know that the camera is Foscam camera, you can speed up searching by specifying the parameter:
RVCamera1.SearchCamera([rvctFoscam]).

Re: ip camera wiev help

Posted: Mon Apr 03, 2017 9:52 am
by Sergey Tkachenko
As for CameraPort, you can leave it = 0, or specify 80, as you did.

Re: ip camera wiev help

Posted: Mon Apr 03, 2017 9:53 am
by erdogan_ozkaya
ip camera DP-12CD1010-I
demo 8Cams


The code is as follows

Thank you
// ----- Camera 1 -----
RVCamera1.Parameters.Alias := 'Foscam';
RVCamera1.CameraHost := '192.168.1.245';
RVCamera1.CameraPort :=554;
RVCamera1.UserName := 'admin';
RVCamera1.UserPassword := '12345';
RVCamera1.SearchCamera;

Re: ip camera wiev help

Posted: Mon Apr 03, 2017 10:05 am
by Sergey Tkachenko
So, does it work?

If not, assign
RVCamera1.VideoFormat := rvvfH264
RVCamera1.CameraPort := 0;

And make sure that FFmpeg library is available (the demo 8Cams shows when it can find FFmpeg)

Re: ip camera wiev help

Posted: Mon Apr 03, 2017 10:26 am
by erdogan_ozkaya
No no it does not work I can not connect to ip camer somehow.

Could you give an example?

Re: ip camera wiev help

Posted: Mon Apr 03, 2017 7:04 pm
by Sergey Tkachenko
For the both examples below, check RVCamera1.IsSupportedFFMPEG.
If it returns False, video from H.264 cameras cannot be displayed, so make sure that everything is ok.
FFmpeg can be taken, for example, from here: http://www.trichview.com/forums/viewtop ... =17&t=6880
(copy 32-bit DLLs to the application folder)

Example 1, wait mode
SearchCamera returns when search is finished. The applications freezes while searching.

Code: Select all

RVCamera1.CommandMode := rvsmWait;
RVCamera1.VideoFormat := rvvfH264 ;
RVCamera1.CameraHost := '192.168.1.245';
RVCamera1.CameraPort := 0;
RVCamera1.UserName := 'admin';
RVCamera1.UserPassword := '12345';
if RVCamera1.SearchCamera then
  RVCamera1.PlayVideoStream
else 
  // show error
Example 1, no-wait mode
SearchCamera returns immediately; when search is finished, OnSearchComplete occurs.

Code: Select all

RVCamera1.CommandMode := rvsmNoWait;
RVCamera1.VideoFormat := rvvfH264 ;
RVCamera1.CameraHost := '192.168.1.245';
RVCamera1.CameraPort := 0;
RVCamera1.UserName := 'admin';
RVCamera1.UserPassword := '12345';
RVCamera1.SearchCamera then
  RVCamera1.PlayVideoStream;
OnSearchComplete event:

Code: Select all

procedure TfrmMain.RVCamera1SearchComplete(Sender: TObject; Status: Integer);
begin
  if Status = 0 then
    RVCamera1.PlayVideoStream
  else
    // show error
end;

Re: ip camera wiev help

Posted: Thu Apr 06, 2017 3:37 pm
by erdogan_ozkaya
Thank you very much for your reply
Your code does not work I have tried it in a lot of ways, but is not it a simple example you can throw?
Thank you

Re: ip camera wiev help

Posted: Thu Apr 06, 2017 6:43 pm
by Sergey Tkachenko
Answered in a private message