Comments (2)
Having the same issue here... Did you find the solution?!
from sensecam-control.
It is possible that your camera has multiple stream profiles. By default the API is set up to control profile 1, for me this wasa fish eye viewport since my PTZ is all digital. There is no PTZ operation to do here. However if you go to the definition for _camera_command in vapix_control.py, you will find a dict called base_q_args. There is an item called camera in there, you can change it to the appropriate stream that you are working with. This solved the issue for me. Perhaps worth updating this repo with a setup option for this.
def _camera_command(self, payload: dict):
"""
Function used to send commands to the camera
Args:
payload: argument dictionary for camera control
Returns:
Returns the response from the device to the command sent
logging.info('camera_command(%s)', payload)
base_q_args = {
'camera': 6,
'html': 'no',
'timestamp': int(time.time())
}
payload2 = CameraControl.__merge_dicts(payload, base_q_args)
url = 'http://' + self.__cam_ip + '/axis-cgi/com/ptz.cgi'
resp = requests.get(url, auth=HTTPDigestAuth(self.__cam_user, self.__cam_password),
params=payload2)
if (resp.status_code != 200) and (resp.status_code != 204):
soup = BeautifulSoup(resp.text, features="lxml")
logging.error('%s', soup.get_text())
if resp.status_code == 401:
sys.exit(1)
return resp
from sensecam-control.
Related Issues (10)
- 'CameraControl' object has no attribute 'camera_ptz' HOT 2
- How to get snapshot
- Calculating pan, tilt and zoom values
- Sample / tutorial HOT 2
- AttributeError: 'CameraControl' object has no attribute 'camera_ptz' HOT 3
- onvif.exceptions.ONVIFError: Unknown error: HTTPConnectionPool HOT 1
- digital zoom HOT 1
- onvif.exceptions.ONVIFError: Unknown error: Unknown fault occured HOT 1
- IRCutFilter error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sensecam-control.