Pelco Developer Network (PDN)

Export Failed

Export Failed

Im trying to create a new export but its failing. It initiated the export, i was able to get id,name, etc. When i try to get the export object, the status became 2(failed) and the reason is unknown error.

In the attached image(source_code.jpg) at line 384, the value of exportItem is shown in the pending.jpg image. Then on line 389(source_code.jpg) the value of the export item is shown in the failed.jpg.

Admin Edit: added links to the text so that others can see the attachments that were added. Please see Post Attachments for additional information.

Hello there, thank you for your post.

I'm sorry to hear that you're having a problems exporting video. I've looked at your screenshots and ran the ExampleRunner C++ sample today to check some behavior, and so far here is some things that I've noticed:

#1: your dataUri path: that should have the IP address of the VideoXpert system (typically). I see in your screenshot that you're using 'localhost' ... is the VideoXpert system running on the same PC that the code is running from? That's an usual setup; I haven't seen that before. Typically the VideoXpert system is running on another system elsewhere on the network, and the SDK is running on a client somewhere and connecting to it. In theory I would think that it should work, but it's worth pointing out that I personally have never done testing using the SDK or samples in that kind of setup.

#2: what are the values for your exportClip? That object that is part of the exportItem should contain the dataSourceId, the startTime, and the endTime. I'm unable to tell from the pending.jpg or the failed.jpg screenshots what the values are for exportClip. As an example, here is what mine where when I tested: C++ export sample.PNG.

I did have a little trouble with my sample actually indicating that the export had completed. However, when I restarted the C++ sample application and checked the option to View Exports, I could see that the test exports I'd provided names for had been successfully created.

Please let me know if this information is helpful. You may also wish to example the vx sdk logs that are typically created in ProgramData\Pelco\vxsdk folder (by default), to see if you can find any other additional information too.

Hi,

I am using a simulator, which allowed me to use localhost. I also tried using IP address of our actual pelco server, and still getting the same issue.

I provided the dataSourceId and the value of the startTime is "2019-05-01T18:40:35Z" and endTime is "2019-05-01T18:43:15Z".

best,
Errol

This is the log report. I provided the license key like this Utilities::StrCopySafe(loginInfo.licenseKey,"DCovPyw...wYF");

2019-05-07_11:08:50 [SerSystem.cpp:23] Attempting to login to 192.168.10.200
2019-05-07_11:08:51 [SerSystem.cpp:1160] Successfully logged in to 192.168.10.200
2019-05-07_11:08:51 [LicenseValidator.cpp:184] No license was found on the system. Using the license grace period for this system which expires: 2019-07-31T05:56:16Z
2019-05-07_11:08:51 [SerSystem.cpp:964] Created new export: abf2d083-134b-4559-8bd3-cc137df45ebe

this is what im getting when i tried to get the export object. 'Status test'||'dataUri'||'statusReason'||'isTrashed'
Export Failed||https://192.168.10.200:449/system/5.0/exports/data/abf2d083-134b-4559-8bd3-cc137df45ebe||0||0

(Admin edit: 59711404_266648510935392_8185016551485734912_n.jpg)

Thank you for the added details. I've added a link to your latest screenshot to make it viewable.

Your license string appears valid, otherwise you wouldn't be able to log into the VX system at all -- the "no license found on the system" message in the log is indicating that there isn't a matching license entitlement on the VideoXpert system. Licensing is 2 parts; one on the VX system for an entitlement, and the string that you use in the code with the SDK. That's all that part is (by the way). You're able to log in because you have a valid license string when using the SDK.

The screenshot ... it looks like the project is displaying the list of available clips, and then what seems to be failing is a download of a specific clip. Do I have the problem stated and understood correctly?

Exporting video with VideoXpert is two parts; (1) is to request an export clip be created using a series of parameters - which is then created and housed on the VideoXpert Core, and part (2) is to download the created export clip. It would appear that, based on what I see in the screenshot, there are exported clips available but the download of a created clip is what is failing.

Does this behavior work properly in the ExampleRunner C++ sample? That sample code is available here: VideoXpertSdk-Examples. In reviewing the sample code, in the DownloadExport.cpp file, there is code there to specify the path where the export will be saved and the name of the exported file ... are you doing that as well in the sample project?

It may be worth trying with the ExampleRunner C++ sample code to try and obtain another data point; to help determine if the problem you're experiencing is possibly with the VideoXpert system (possibly a network issue in trying to download exports using the sample code also?), or if the problem possibly exists in Project1 (which might point to something missing in the Project that works in the ExampleRunner sample code). Additionally I'm curious if the sample fails... it makes me wonder again about running the code on the same machine that the Core is running on. Technically if you're doing that then the exports already exist on the same PC already anyway... right?

If you're still completely stuck, please provide the vxsdk log text file when using the sample code (it's typically found in ProgramData\Pelco\vxsdk directory by default). You may also want to try creating a few different logs using different VxLogLevels (like Trace and Debug), using VxSetLogLevel in main.cpp.

I attached the code that i am using, assuming ip address, license key, username and passwords are all correct. I provided some comments to show you where its failing to create the export. Take note im not yet downloading the exported mkv, im still on the process of creating it.

Is a very straight forward code, I copied exactly ExampleRunner sample code. The exact log report is the below:

2019-05-07_11:08:50 [SerSystem.cpp:23] Attempting to login to 192.168.10.200
2019-05-07_11:08:51 [SerSystem.cpp:1160] Successfully logged in to 192.168.10.200
2019-05-07_11:08:51 [LicenseValidator.cpp:184] No license was found on the system. Using the license grace period for this system which expires: 2019-07-31T05:56:16Z
2019-05-07_11:08:51 [SerSystem.cpp:964] Created new export: abf2d083-134b-4559-8bd3-cc137df45ebe

[Admin edit: link to main.cpp]

Hello, thank you for your follow up post.

I did download your main.cpp file, however I had a build error and sadly did not have time today to try and work on determining the root cause of it. Most of our work these days is in C#, and I know that the C++ sample was typically last to be updated for this reason.

I'm really very interested in if the original Sample project - ExampleRunner - the C++ sample will run or not. Would you please try that and let me know the results?

Thanks!

The Sample project - ExampleRunner - the C++ was running properly, so I copied the code exactly, but when i tried it the exporting is failing. I dont know what is missing.

Best,
Errol

Thanks for the information.

I'm very sorry to hear that the code you're working with is failing. If the Sample code is successful to create and to download the clips that are being created... then the problem must be elsewhere.

I am sorry to say that if the problem is only exhibited in the adaptation and copying it to another place, there is only so much support that we can manage. This is made more difficult since this is C++ you're working with.

I did ping another developer to see if he can offer any insight -- he suggested double checking the time strings specifically after looking at your main.cpp file. There was some code that was converting the times to UTC, but then other code to create the export itself that was hardcoded. It may be something that you do need to try and identify as an exercise on your own.

Oh -- I just noticed something ... check line #367. It looks like you're assigning the start time to the end time, so I think you're trying to export the same times for start and end (based on the code you posted).

	string startTimeUtc = searchEndTimeStr;//ConvertUTCtoLocalTime(startTime);
	string endTimeUtc = searchEndTimeStr;//ConvertUTCtoLocalTime(endtime);