get-vmscamerareport | Export-Csv -path “.\camreport.csv”
This produces a .csv with of course several columns, one of which is ConfiguredRecordedFPS, but every single entry is blank.
get-vmscamerareport | Export-Csv -path “.\camreport.csv”
This produces a .csv with of course several columns, one of which is ConfiguredRecordedFPS, but every single entry is blank.
What version on MilestonePSTools you using and what version of Xprotect you re connecting?
Hi @Travis, what kind of cameras do you have and what XProtect device pack driver are you using with them? My first guess is that your cameras don’t have a stream setting with the key FPS or FrameRate which is what the report is looking for. A small number of camera drivers don’t have an FPS setting or maybe there’s an additional key we should look for?
Can you export the stream settings from one of the cameras to a JSON file and share the content here? The one-liner below will prompt you to select a camera, and then it will save information about all available streams on that camera to a file in the current folder.
Get-VmsCamera | Out-GridView -PassThru | Get-VmsCameraStream | Select-Object * -ExcludeProperty Camera, ValueTypeInfo | ConvertTo-Json | Set-Content .\streams.json
Here’s the output from one of my cameras for reference:
[
{
"Name": "Video stream 01",
"DisplayName": "Video stream 1",
"Enabled": true,
"LiveMode": "WhenNeeded",
"LiveDefault": false,
"RecordingTrackName": "Primary",
"PlaybackDefault": true,
"UseEdge": true,
"Dirty": false,
"Settings": {
"ProfileName": "Profile000_MainStream",
"MulticastTTL": "64",
"Bitrate": "6144",
"MulticastPort": "4000",
"StreamReferenceId": "28DC44C3-079E-4C94-8EC9-60363451EB40",
"EdgeStorageSupported": "false",
"FPS": "15",
"Resolution": "2560x1920",
"Codec": "H.264 High Profile",
"Quality": "100",
"Protocol": "RTP/RTSP/TCP",
"MaxGOPSize": "40",
"KeepAliveMethod": "Default",
"MulticastForceSSM": "No",
"MulticastAddress": "239.0.1.0",
"MaxGOPMode": "Default (determined by driver)"
}
},
{
"Name": "Video stream 02",
"DisplayName": "Video stream 2",
"Enabled": true,
"LiveMode": "WhenNeeded",
"LiveDefault": true,
"RecordingTrackName": "Secondary",
"PlaybackDefault": false,
"UseEdge": true,
"Dirty": false,
"Settings": {
"ProfileName": "Profile001_SubStream",
"MulticastTTL": "64",
"Bitrate": "256",
"MulticastPort": "4000",
"StreamReferenceId": "28DC44C3-079E-4C94-8EC9-60363451EB41",
"EdgeStorageSupported": "false",
"FPS": "15",
"Resolution": "640x480",
"Codec": "H.264 Baseline Profile",
"Quality": "40",
"Protocol": "RTP/RTSP/TCP",
"MaxGOPSize": "40",
"KeepAliveMethod": "Default",
"MulticastForceSSM": "No",
"MulticastAddress": "239.0.1.0",
"MaxGOPMode": "Default (determined by driver)"
}
}
]
25.2.38 for MilestonePSTools
2021 R2 for Xprotect
All of these cameras are using Stream 1 with FPS configured. How do I export the stream setting into JSON?
A PowerShell command to export a camera’s streams to JSON is in my comment above.
A copy of a row from the original CSV might also lend us some hints.
Oh I missed that didn’t I. Ok here is Stream 1 (the rest are not configured)
{
“Name”: “Video stream 1”,
“DisplayName”: “Video stream 1”,
“Enabled”: true,
“LiveMode”: “Always”,
“LiveDefault”: true,
“RecordingTrackName”: “None”,
“PlaybackDefault”: false,
“UseEdge”: false,
“Dirty”: false,
“Settings”: {
“ControlMode”: “Variable bit rate”,
“StreamingMode”: “RTP/RTSP/TCP”,
“FPS”: “21”,
“Compression”: “60”,
“ZGopLength”: “300”,
“MaxGOPSize”: “21”,
“Resolution”: “1920x1080”,
“Codec”: “H.264”,
“ZStrength”: “Medium”,
“IncludeDate”: “No”,
“TargetBitrate”: “2000”,
“ZGopMode”: “Dynamic”,
“ZFpsMode”: “Fixed”,
“IncludeTime”: “No”,
“EdgeStorageSupported”: “true”,
“ControlPriority”: “None”,
“MaxGOPMode”: “Default (determined by driver)”
}
}
And here is a line from the csv:
| LiveStream | LiveStreamDescription | LiveStreamMode | ConfiguredLiveResolution | ConfiguredLiveCodec | ConfiguredLiveFPS | CurrentLiveResolution | CurrentLiveCodec | CurrentLiveFPS | CurrentLiveBitrate | RecordedStream | RecordedStreamDescription | RecordedStreamMode | ConfiguredRecordedResolution | ConfiguredRecordedCodec | ConfiguredRecordedFPS | CurrentRecordedResolution | CurrentRecordedCodec | CurrentRecordedFPS | CurrentRecordedBitrate | RecordingEnabled | RecordKeyframesOnly | RecordOnRelatedDevices | PrebufferEnabled | PrebufferSeconds | PrebufferInMemory | RecordingStorageName | RecordingPath | ExpectedRetentionDays | PercentRecordedOneWeek | MediaDatabaseBegin | MediaDatabaseEnd | UsedSpaceInGB | MotionEnabled | MotionKeyframesOnly | MotionProcessTime | MotionManualSensitivityEnabled | MotionManualSensitivity | MotionThreshold | MotionMetadataEnabled | MotionExcludeRegions | MotionHardwareAccelerationMode | PrivacyMaskEnabled |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Video stream 1 | Video stream 1 | Always | 2304x1728 | H.264 | 21 | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | TRUE | FALSE | TRUE | TRUE | 3 | TRUE | Local default | E:\MediaDatabase\254DBC8F-586D-4C3E-99FE-C4A62834FBE7 | 30 | NotIncluded | NotIncluded | NotIncluded | 126.83 | TRUE | TRUE | Ms500 | FALSE | 33 | 2000 | TRUE | FALSE | Off | FALSE |
I can share links to the original files via dropbox if you need, unless there’s a more straightforward way to do it.
Do you know if the Data Collector service has anything to do with this command? They have been disabled on this server by someone else on my team, presumably to help with performance.
I don’t think the data collector is used here at all. I think I see the issue though. You’re on an older version of XProtect that predates the secondary recorded stream feature. I think I must have expected the client-side SDK to normalize that RecordingTrackName to “Primary” for all recorded streams since there is only one recording track but the stream info you shared shows that MilestonePSTools is reporting the recording track as “None” instead.
So it seems that pstools isn’t showing the configured recording FPS because it is misinterpreting the stream info. Since RecordingTrackName is “None” it’s not reporting a value.
I’ll have to do some testing against an old XProtect version and make sure the difference in behavior is accounted for. I’ll be out of office next week for the PowerShell + DevOps Global Summit conference in Bellevue and will hopefully have a chance to take a peek after that.
Ok that sounds great, thanks for helping out with this!