Pelco Developer Network (PDN)

ViewVideo

Is it possible to view the video stream from a IXE30 through the SDK without a DVR device on the network? The ViewVideo example when modified to add a Edge Device "System" shows the camera name but the video feed will not show on the right hand side.

I've looked at this example: http://pdn.pelco.com/content/viewing-live-video-sdk-object-model as a guide. I could not get that example to work stand alone with the IXE30. Maybe because MJPEG isn't supported? The error says that it is an invalid device type.

It still seems like the ViewVideo example should work though. I've tried several different configurations of the video stream with no success. Any thoughts?

It should work as an Edge system (no DVR). You can try kSTREAM_FORMAT_AUTO or kSTREAM_FORMAT_MPEG4_H264 instead of MJPEG. Also try Wireshark and see if the video is streaming, just not displaying. Is the display gray where the video should be?

The C++ example does not work at all even with similar settings to the C# ViewVideo.

The C# ViewVideo example (modified to work as an Edge system) seems to be working with what looks to be video coming in on Wireshark but all I get is a gray image for display.

Any thoughts?

In the C++ sample try explicitly setting the stream to Unicast in case your router/switch is not allowing multicast:

. . .
PelcoSDK::Stream stream(camera);

// Set stream configuration options
PelcoSDK::StreamConfiguration config = stream.GetConfiguration();
config.VideoFormat = PelcoSDK::kSTREAM_FORMAT_AUTO;
config.DeliveryMode = PelcoSDK::kDELIVER_UNICAST;

// Specify address of this machine if using multiple NICs.
//config.UnicastIp = "192.168.0.99";

stream.SetConfiguration(config);

HWND hwnd = GetConsoleWindow();

PelcoSDK::Display display = PelcoSDK::Display(hwnd);
display.Show(stream);

stream.Play(PelcoSDK::kFWD_1X);
stream.GotoLive();
. . .

Also, if it throws an exception or prints an error regarding the device or system try removing the cache file and running again. On Windows 7 the cache is at C:\ProgramData\Pelco\SDK\. A better solution is to modify the code to allow for the existence of the system and device combination in the cache.

In the C# sample the corresponding lines are in CameraCollectionForm.cs:

. . .
// Set the stream configuration (OPTIONAL)
// Without it, the defaults, StreamProtocolRtp, multicast, streamAudio are set to true; lossyNetwork is set to false
StreamConfiguration config = new Pelco.SDK.StreamConfiguration();
config.deliveryMode = Pelco.SDK.StreamDeliveryMode.DeliverUnicast;
config.lossyNetwork = true;
_stream.StreamConfig = config;
. . .

I am testing locally with a D5118 but the same API calls apply.

The Edge system setup is now working and callbacks seem to work as well. Messing with the stream 2 settings seem to also change whether I'm getting data or not. Is there a way to specify in the SDK which stream you want from the camera of the 2 available? For example if you wanted one H.264 to use with the SDK and stream 2 as MJPEG, the SDK seems to arbitrarily pick one of the streams and if the stream is MJPEG it (as documented) won't work.

Is there a clear way to decide which stream the SDK subscribes to?

Comment moved to above reply.

exception with ViewVideo

Hi, I just started working on integration with Pelco Digital Sentry with its SDK. And I opened the sample project ViewVideo, when I run the project I got the following exception,

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'Pelco.SDK.dll' or one of its dependencies. The specified module could not be found.

I set up the path to point the Pelco.SDK.dll directory, or copied all .dll files from Libs directory to the current .exe location. But the exception still happens. Does anyone have the same issue? And how to resolve this. Thanks!

Make sure that your file path is pointing correctly to either release or debug folder DLLs and that you are running ViewVideo in either debug or release mode correspondingly.

Also please start a new forum post if you have a new question, if you could, rather then commenting on a very old post. We would appreciate it.

Thanks!