Page 1 of 1

ONVIF probe - Can't call method "get_Width"

Posted: Sun Nov 24, 2019 12:14 pm
by kazak
Hi,
I'm on 1.32.3 and trying to probe my ONVIF camera. When start command manually I get those error bellow.
Looks to me as a bug in /usr/share/perl5/ZoneMinder/ONVIF.pm line 276, or at least it bump on that point.

/usr/bin/zmonvif-probe.pl -v profiles http://192.168.88.230:8080/onvif/device_service 1.2
Name "ZoneMinder::ONVIF::verbose" used only once: possible typo at /usr/bin/zmonvif-probe.pl line 81.
ERror cannot add_IPFilter
ERror cannot add_ZeroConfiguration
ERror cannot add_IPVersion6
ERror cannot add_DynDNS
ERror cannot add_Extension
ERror cannot add_DiscoveryResolve
ERror cannot add_DiscoveryBye
ERror cannot add_RemoteDiscovery
ERror cannot add_SystemBackup
ERror cannot add_SystemLogging
ERror cannot add_FirmwareUpgrade
ERror cannot add_SupportedVersions
ERror cannot add_SupportedVersions
ERror cannot add_SupportedVersions
ERror cannot add_SupportedVersions
ERror cannot add_SupportedVersions
ERror cannot add_SupportedVersions
ERror cannot add_Extension
ERror cannot add_TLS1__1
ERror cannot add_TLS1__2
ERror cannot add_OnboardKeyGeneration
ERror cannot add_AccessPolicyConfig
ERror cannot add_X__509Token
ERror cannot add_SAMLToken
ERror cannot add_KerberosToken
ERror cannot add_RELToken
ERror cannot add_Extension
Received message:
<GetProfilesResponse xmlns="http://www.onvif.org/ver10/media/wsdl"><Profiles token="MediaProfile000" fixed="true"><Name xmlns="http://www.onvif.org/ver10/schema">Medi ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... en><Bounds x="0" y="0" width="2048" height="1536"></Bounds></VideoSourceConfiguration><VideoEncoderConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... ticsModule Name="MyCellMotion" Type="tt:CellMotionEngine"><Parameters><SimpleItem Name="Sensitivity" Value="60"></SimpleItem><ElementItem Name="Layout"></ElementItem></Parameters></AnalyticsModule><AnalyticsModule Name="MyTamper" Type="tt:TamperEngine"><Parameters><SimpleItem Name="Sensitivity" Value="48"></SimpleItem><ElementItem Name="Field"></ElementItem><ElementItem Name="Transformation"></ElementItem></Parameters></AnalyticsModule></AnalyticsEngineConfiguration><RuleEngineConfiguration><Rule Name="Region1" Type="tt:CellMotionDetector"><Parameters><SimpleItem Name="MinCount" Value="4"></SimpleItem><SimpleItem Name="AlarmOnDelay" Value="1000"></SimpleItem><SimpleItem Name="AlarmOffDelay" Value="1000"></SimpleItem><SimpleItem Name="ActiveCells" Value="0P8A8A=="></SimpleItem></Parameters></Rule><Rule Name="MyTamperDetector" Type="tt:TamperDetector"><Parameters><ElementItem Name="Field"></ElementItem></Parameters></Rule></RuleEngineConfiguration></VideoAnalyticsConfiguration><PTZConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... peed><Zoom x="0.800000" space="http://www.onvif.org/ver10/tptz/ZoomSpa ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... ><Profiles token="MediaProfile001" fixed="true"><Name xmlns="http://www.onvif.org/ver10/schema">Medi ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... en><Bounds x="0" y="0" width="2048" height="1536"></Bounds></VideoSourceConfiguration><VideoEncoderConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... ticsModule Name="MyCellMotion" Type="tt:CellMotionEngine"><Parameters><SimpleItem Name="Sensitivity" Value="60"></SimpleItem><ElementItem Name="Layout"></ElementItem></Parameters></AnalyticsModule><AnalyticsModule Name="MyTamper" Type="tt:TamperEngine"><Parameters><SimpleItem Name="Sensitivity" Value="48"></SimpleItem><ElementItem Name="Field"></ElementItem><ElementItem Name="Transformation"></ElementItem></Parameters></AnalyticsModule></AnalyticsEngineConfiguration><RuleEngineConfiguration><Rule Name="Region1" Type="tt:CellMotionDetector"><Parameters><SimpleItem Name="MinCount" Value="4"></SimpleItem><SimpleItem Name="AlarmOnDelay" Value="1000"></SimpleItem><SimpleItem Name="AlarmOffDelay" Value="1000"></SimpleItem><SimpleItem Name="ActiveCells" Value="0P8A8A=="></SimpleItem></Parameters></Rule><Rule Name="MyTamperDetector" Type="tt:TamperDetector"><Parameters><ElementItem Name="Field"></ElementItem></Parameters></Rule></RuleEngineConfiguration></VideoAnalyticsConfiguration><PTZConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... peed><Zoom x="0.800000" space="http://www.onvif.org/ver10/tptz/ZoomSpa ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... esResponse>
Can't call method "get_Width" on an undefined value at /usr/share/perl5/ZoneMinder/ONVIF.pm line 276.

BR
Kazak

Re: ONVIF probe - Can't call method "get_Width"

Posted: Sun Nov 24, 2019 2:51 pm
by kazak
Hi,
I managed to find out when this issue is shown.
If I use encode mode H.265 on the camera, then it shows the error.

But if use encode mode H.264 on the camera, then everything seems fine with onvif profile probe and add monitor.

Received message:
<GetProfilesResponse xmlns="http://www.onvif.org/ver10/media/wsdl"><Profiles token="MediaProfile000" fixed="true"><Name xmlns="http://www.onvif.org/ver10/schema">Medi ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... en><Bounds x="0" y="0" width="2048" height="1536"></Bounds></VideoSourceConfiguration><VideoEncoderConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... ticsModule Name="MyCellMotion" Type="tt:CellMotionEngine"><Parameters><SimpleItem Name="Sensitivity" Value="60"></SimpleItem><ElementItem Name="Layout"></ElementItem></Parameters></AnalyticsModule><AnalyticsModule Name="MyTamper" Type="tt:TamperEngine"><Parameters><SimpleItem Name="Sensitivity" Value="48"></SimpleItem><ElementItem Name="Field"></ElementItem><ElementItem Name="Transformation"></ElementItem></Parameters></AnalyticsModule></AnalyticsEngineConfiguration><RuleEngineConfiguration><Rule Name="Region1" Type="tt:CellMotionDetector"><Parameters><SimpleItem Name="MinCount" Value="4"></SimpleItem><SimpleItem Name="AlarmOnDelay" Value="1000"></SimpleItem><SimpleItem Name="AlarmOffDelay" Value="1000"></SimpleItem><SimpleItem Name="ActiveCells" Value="0P8A8A=="></SimpleItem></Parameters></Rule><Rule Name="MyTamperDetector" Type="tt:TamperDetector"><Parameters><ElementItem Name="Field"></ElementItem></Parameters></Rule></RuleEngineConfiguration></VideoAnalyticsConfiguration><PTZConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... peed><Zoom x="0.800000" space="http://www.onvif.org/ver10/tptz/ZoomSpa ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... ><Profiles token="MediaProfile001" fixed="true"><Name xmlns="http://www.onvif.org/ver10/schema">Medi ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... en><Bounds x="0" y="0" width="2048" height="1536"></Bounds></VideoSourceConfiguration><VideoEncoderConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... ticsModule Name="MyCellMotion" Type="tt:CellMotionEngine"><Parameters><SimpleItem Name="Sensitivity" Value="60"></SimpleItem><ElementItem Name="Layout"></ElementItem></Parameters></AnalyticsModule><AnalyticsModule Name="MyTamper" Type="tt:TamperEngine"><Parameters><SimpleItem Name="Sensitivity" Value="48"></SimpleItem><ElementItem Name="Field"></ElementItem><ElementItem Name="Transformation"></ElementItem></Parameters></AnalyticsModule></AnalyticsEngineConfiguration><RuleEngineConfiguration><Rule Name="Region1" Type="tt:CellMotionDetector"><Parameters><SimpleItem Name="MinCount" Value="4"></SimpleItem><SimpleItem Name="AlarmOnDelay" Value="1000"></SimpleItem><SimpleItem Name="AlarmOffDelay" Value="1000"></SimpleItem><SimpleItem Name="ActiveCells" Value="0P8A8A=="></SimpleItem></Parameters></Rule><Rule Name="MyTamperDetector" Type="tt:TamperDetector"><Parameters><ElementItem Name="Field"></ElementItem></Parameters></Rule></RuleEngineConfiguration></VideoAnalyticsConfiguration><PTZConfiguration xmlns="http://www.onvif.org/ver10/schema"><Nam ... peed><Zoom x="0.800000" space="http://www.onvif.org/ver10/tptz/ZoomSpa ... figuration xmlns="http://www.onvif.org/ver10/schema"><Nam ... esResponse>
MediaProfile000, MediaProfile_Channel1_MainStream, H264, 2592, 1520, 20, rtsp://192.168.88.230:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
MediaProfile001, MediaProfile_Channel1_SubStream1, H264, 704, 576, 20, rtsp://192.168.88.230:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif

BR
Kazak

Re: ONVIF probe - Can't call method "get_Width"

Posted: Wed Apr 08, 2020 7:09 pm
by rabsym
Hello mate,

I'm having the same issue with Zoneminder 1.34.9 on Debian using a Dahua Camera with adding monitor and onvif probe.

I've done as suggested the change in encoding at camera settigns to use H264 but still getting "

Can't call method "get_Width" on an undefined value at /usr/share/perl5/ZoneMinder/ONVIF.pm line 304.

Any more suggestion would be very appreciatted.

Maybe should I open a case in zoneminder GIT?

Thanks in advance.
Raimon

Re: ONVIF probe - Can't call method "get_Width"

Posted: Wed Apr 08, 2020 8:58 pm
by iconnor
Yes please open an issue.

Re: ONVIF probe - Can't call method "get_Width"

Posted: Wed Apr 08, 2020 10:09 pm
by rabsym
Just opened, thanks again for giving a chance.

Regards
Raimon