ip camera wiev help

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
erdogan_ozkaya
Posts: 4
Joined: Mon Apr 03, 2017 8:49 am

ip camera wiev help

Post 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
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ip camera wiev help

Post 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]).
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ip camera wiev help

Post by Sergey Tkachenko »

As for CameraPort, you can leave it = 0, or specify 80, as you did.
erdogan_ozkaya
Posts: 4
Joined: Mon Apr 03, 2017 8:49 am

Re: ip camera wiev help

Post 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;
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ip camera wiev help

Post 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)
erdogan_ozkaya
Posts: 4
Joined: Mon Apr 03, 2017 8:49 am

Re: ip camera wiev help

Post by erdogan_ozkaya »

No no it does not work I can not connect to ip camer somehow.

Could you give an example?
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ip camera wiev help

Post 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;
erdogan_ozkaya
Posts: 4
Joined: Mon Apr 03, 2017 8:49 am

Re: ip camera wiev help

Post 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
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ip camera wiev help

Post by Sergey Tkachenko »

Answered in a private message
Post Reply