On a PTZ camera, I can get Presets, send presets etc, but I didn't manage to get the stream URI unfortunately, despite spending hours tinkering with the library and checking the ONVIF specs...
Here is how I ask for streams :
$o = new Rockyjvec\Onvif\Onvif("http://192.168.1.47:81/onvif/device_service", "admin", "password");
$o->media->GetProfiles();
$params = [
'StreamSetup'=>
[
'Stream'=>'RTP-Unicast',
'Transport'=>
[
'Protocol'=>'RTSP'
]
],
'ProfileToken' => 'profile_cam1_stream1'
];
print_r($o->media->GetStreamUri($params));
And here is the output :
PHP Fatal error: Uncaught SoapFault exception: [s:Client] Validation constraint violation: empty value provided where a value is required in element 'SOAP-ENC:Struct' in /home/nicolas/Projets/onphp/vendor/rockyjvec/onvif/src/Rockyjvec/Onvif/Soap/SoapClient.php:75
If someone passes by and succesfully cot their camera stream uri :) any help is welcome.
On a PTZ camera, I can get Presets, send presets etc, but I didn't manage to get the stream URI unfortunately, despite spending hours tinkering with the library and checking the ONVIF specs...
Here is how I ask for streams :
And here is the output :
PHP Fatal error: Uncaught SoapFault exception: [s:Client] Validation constraint violation: empty value provided where a value is required in element 'SOAP-ENC:Struct' in /home/nicolas/Projets/onphp/vendor/rockyjvec/onvif/src/Rockyjvec/Onvif/Soap/SoapClient.php:75If someone passes by and succesfully cot their camera stream uri :) any help is welcome.