I am currently trying to export a video clip from a particular camera. I was told that these cameras are associated to a NSM device. Now when I tried to export a video clip based on the code provided in the sample provided, I am getting an SDK exception - Unable to find associated recorded device.
May I know what this exception exactly means? Is this error due to unable to find the NSM device or another recording device that the camera is meant to have?
I appreciate your help in this matter. Thank you.
This is usually a problem with the setup of the VMS itself. The camera has stale info in it's Associated recording device data.
You can use Sqlite browser application to open and review the PelcoDeviceCache.db file that Pelco SDK creates. Looking the 'Browse Data' tab, look at the Device table and locate the camera. Cross reference the DeviceID with values in the PelcoDevice table to find the 'AssociatedNVR' uuid. You can try and track down which recorder the camera is recording to -- according to the System Manager. The Pelco SDK is doing a query to the SM when it builds this data. If there is incorrect data in the SM database, that will result in a problem trying to retrieve recorded video.
Sometimes to correct this you'll need to remove the camera from a recording pool in the VMS and add it back there again. Pelco Product Support can assist with this sort of troubleshooting to ensure that the camera is associated with the proper recorder AND that the SM's database has the proper values there for the Pelco SDK to query. You will also probably want to delete the cache file (or rename it) to create a fresh one with proper valid correct data from an SM query.
I have successfully exported a video from a my own lab camera. The problem I am facing now is that sometimes, I will encounter a System.AccessViolationException at the Pelco.SDK.DLL randomly whenever I attempt to export a video. I have tried to catch these exceptions but to no avail. As such I am wondering about this error and how do I fix it? Please advice. Thank you and a Happy New Year to you.
Hmm, that's interesting.
During export, the SDK should be trying to update the status of the export itself, such as the % complete. My best guess is that somewhere during the export process, the SDK is having a problem communicating to the recorder to find out the status.
It could also be that the export itself is having a problem communicating with the recorder and not have anything to do with the status requests or updates too. In either case, my best guess is that it is a problem between the SDK and recorder in your testing environment.
How long are the exports you're attempting to make - how much video are you trying to export? Perhaps, depending on the environment you're using and where the recorder is, if it's taking too long or the network is under heavy load, something fails and results in the exception.
I'm tossing out suggestions because if it were a clear situation of always failing, then it could indicate a problem at the recorder end or the SDK end. But because it fails "sometimes" it might be something that changes in between, like the kind of video being exported or the network between if you're trying to export the exact same video clips every time and sometimes it works and sometimes it doesn't.
Thanks for the reply. Your post have certainly shed some light on the problem and since the problem seems to have settled itself, I will just have to monitor and try your suggestion if it comes again. Also if I may ask this here, is it possible for you to point me to a documentation that lists the ports that are being used for the exporting of the videos.
This is because due to security reasons, the firewall for this network is being tighten and my network guys will need to know which ports to configure for the outgoing/ingoing of the network in order for my application to connect to the SM and export the videos. Currently I have only identified port: 60001 and I am wondering if any other ports are involved. Thanks Chris for the help, I'm looking forward to your reply.
The Pelco SDK actually discovers the port for streaming and for exporting in the background. I did some searching through the source and discovered that the SDK starts with port 8000 and increments by 2 from there until it finds an open port. For that reason it should work as long as there are open ports available.
I've seen many different ports used for streaming in the past. If you like, you can utilize Pelco Logging Executable (installed with the Pelco SDK), to generate logs and then using those, see which ports are typically being used in the system you're on. Take a look at the generated PelcoSDK.log and MPF.log files. MPF logs are specific to streaming sessions, so they might have more helpful information in them related this.
Privacy and Cookies Policy
Copyright © Pelco