Hello,
I am developing an API to forward video from a Milestone server. Currently, I am using XProtectMobile to gather the necessary information. I have successfully obtained a valid ConnectionId by sending the appropriate XML request. Now, I am attempting to request a video stream and retrieve the video data.
Here is the XML I am sending to /XProtectMobile/Communication:
<?xml version="1.0" encoding="utf-8"?>${token2}
<Type>Request</Type>
<Name>RequestStream</Name>
<InputParams>
<Param Name="Fps" Value="30"/>
<Param Name="DestHeight" Value="1920"/>
<Param Name="StreamType" Value="Transcoded"/>
<Param Name="KeyFramesOnly" Value="No"/>
<Param Name="DestWidth" Value="1080"/>
<Param Name="MethodType" Value="Push"/>
<Param Name="ItemId" Value="${cameraUid}"/>
<Param Name="SignalType" Value="Live"/>
<Param Name="ComprLevel" Value="70"/>
<Param Name="Time" Value="${timestamp}"/>
<Param Name="TimeRangeBegin" Value="${timestamp}"/>
<Param Name="TimeRangeEnd" Value="${timestamp+30}"/>
<Param Name="ExportAvi" Value="Yes"/>
<Param Name="ExportDatabase" Value="Yes"/>
<Param Name="ExportJpeg" Value="Yes"/>
</InputParams>
<OutputParams/>
In response, I receive the StreamId and VideoId, for example:
<?xml version="1.0" encoding="utf-8"?>11afaaae-cfdd-48dd-8405-f651559b6025
<Type>Response</Type>
<Name>RequestStream</Name>
<InputParams />
<OutputParams>
<Param Name="Live" Value="Yes" />
<Param Name="Playback" Value="Yes" />
<Param Name="PTZ" Value="No" />
<Param Name="Preset" Value="No" />
<Param Name="ExportAvi" Value="Yes" />
<Param Name="ExportDatabase" Value="Yes" />
<Param Name="ExportJpeg" Value="Yes" />
<Param Name="BookmarkAdd" Value="Yes" />
<Param Name="BookmarkEdit" Value="Yes" />
<Param Name="BookmarkView" Value="Yes" />
<Param Name="BookmarkDelete" Value="Yes" />
<Param Name="Sequences" Value="Yes" />
<Param Name="VideoId" Value="75c2f983-54e8-49f7-9394-87cbea6698e2" />
<Param Name="StreamId" Value="75c2f983-54e8-49f7-9394-87cbea6698e2" />
<Param Name="ByteOrder" Value="LittleEndian" />
<Param Name="StreamType" Value="Transcoded" />
<Param Name="SrcWidth" Value="1920" />
<Param Name="SrcHeight" Value="1080" />
</OutputParams>
<Items />
<Result>OK</Result>
At this point, I am trying to retrieve the stream and send it to my frontend application. I have attempted to fetch the stream using Axios and directly in Postman at /XProtectMobile/Video/, but I am not receiving any data. This issue is blocking my progress.
Additionally, I have a few questions:
Once I obtain the stream, do I need to use the command to manage the stream, such as changing the speed or retrieving a different time of the video, or do I need to make another stream request?
If I want to implement multi-camera playback, is it better to try to manage this with the Milestone stream or to create two separate streams?
Have a nice day,
Thanks for your help