There is no sample that is ASP.NET, but we hope you will see how you can still use the samples by extracting or transforming bits of it. In general the samples should give you ideas how it works.
Thanks for your response. I will go through thins link.
Is there any document available for all PTZ functions such as what parameters are required to perform Pan/Tilt/Zoom.
We would create a web-api in ASP.NET which will expose REST endpoint to our user-interface. Our user-interface has PTZ buttons already enabled such as up-down-left-right-zoom in/out.
Each click of the button would send a request to the Web-API
Another way is the example mentioned by @Rie Kiuchi (Milestone Systems) earlier in the responses.
Are both of these valid correct? If yes, which one should I use. In our use-case, we already have a PTZ web-ui where user can do up/down/left/right/zoom-in/out etc.
There are methods in the MIP SDK and there in the Mobile SDK. I can understand the confusion now.
When you have a web-UI I suspect Mobile SDK is the better choice, my clear recommendation is; if you get video using Mobile SDK then do PTZ using Mobile SDK.
We are getting video using a encoder such as Wowza to our web-page. Mobile SDK is not used to get video from Milestone. We only want to perform PTZ. But I also think mobile SDK would be more suitable as it has direct functions to send up/down/left/right requests.
There are advantages to both using a Mobile Server and using the direct approach.
The Mobile Server can be placed in a DMZ, on the other hand if direct methods are used the Mobile Server might not be needed at all and your customers can choose not to install it.
PTZ in “steps” is also possible with the direct methods, those are the ones in the sample used on the buttons with arrows.
Thanks for your precise sample for using PTZ with direct methods. As I understand, the direct methods doesn’t require an additional installation of mobile server. So it has less dependency as some customers may not have mobile server installed.
For your query, we utilize RTSP streams from camera/VMS and ingest them into Wowza to get HLS/WebRTC streams which play in all modern HTML5 browsers natively.
Hi @Bo Ellegård Andersen (Milestone Systems), @R & L Admin I tried using the sample shared by you but it seems PTZ operation is not working. I don’t receive any errors as well.
I am able to log into the management server successfully but PTZ command sent to the camera isn’t working. Here is the code
private static void loginToMileStone()
{
Uri uri = new Uri("http://172.30.41.171");
bool secureOnly = false;
CredentialCache cc =
VideoOS.Platform.Login.Util.
BuildCredentialCache(uri, "user", "******", "Basic");
VideoOS.Platform.SDK.Environment.AddServer(secureOnly, uri, cc);
try
{
VideoOS.Platform.SDK.Environment.Login(uri);
VideoOS.Platform.Messaging.Message msg =
new VideoOS.Platform.Messaging.Message(MessageId.Control.PTZMoveCommand,
VideoOS.Platform.Messaging.PTZMoveCommandData.Right);
FQID cameraFQID = new FQID();
cameraFQID.ObjectId = Guid.Parse("78e0957a-80f8-46d4-a8f2-b08d57c56481");
EnvironmentManager.Instance.PostMessage(msg, cameraFQID);
}
catch (ServerNotFoundMIPException snfe)
{
Console.WriteLine("Server does not exist");
}
catch (InvalidCredentialsMIPException ice)
{
Console.WriteLine("Invalid credentials");
}
catch (Exception)
{
Console.WriteLine("Other exception");
}
Console.WriteLine("logged in successfully to Milestone");
}
Even if I enter a wrong camera GUID, the code flow doesn’t reach to the last Exception block. Am I missing to include some events before performing the PTZ operation
Yes @Bo Ellegård Andersen (Milestone Systems) I figured the same yesterday and I was able to get the FQID using the same way you mentioned. I am now able to do Zoom/Tilt/Pan.