Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get stream uri because of soap validation constraint violation #5

Open
tozman51 opened this issue May 18, 2021 · 0 comments

Comments

@tozman51
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant