AXIS API Not Working #728
-
Hello. This is my first question, so please point out any inadequacies. The API here refers to, for example, After restarting the application, it operates normally for a while, How can I acquire images normally and stably? I have tried
Model: M2035-LE Bullet Camera The following is the most recent system log. (I did not find much content in it when I read it...)
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
Hi @kise1043tai , Code used for testingimport requests
from requests.auth import HTTPDigestAuth
import time
# URL and authentication details
url = "http://195.60.68.14:11110/jpg/image.jpg"
username = "VLTuser"
password = "bX60XXXX"
# Function to download the image
def download_image():
# Use Digest Authentication
auth = HTTPDigestAuth(username, password)
try:
# Send a GET request
response = requests.get(url, auth=auth)
response.raise_for_status() # Check for HTTP errors
# Save the image with an int64 timestamp as the filename
timestamp = int(time.time_ns()) # Get current time in nanoseconds since epoch
with open(f"{timestamp}.jpg", "wb") as file:
file.write(response.content)
print(f"Image saved: {timestamp}.jpg")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
# Download image every second
try:
while True:
download_image()
time.sleep(1) # Wait for 1 second
except KeyboardInterrupt:
print("Stopped.") Postman: |
Beta Was this translation helpful? Give feedback.
-
The API should work, the reason of failure should be video encoder source buffer related. The camera chipset is CV25, comparing to Artpec, its encoder performance is a little lower. if all the source buffer is occupied, your request of jpg will fail. please check all your VMS and try to use same video profile to save more for you jpeg. https://help.axis.com/en-us/axis-os-knowledge-base#performance-considerations-and-maximum-bitrate |
Beta Was this translation helpful? Give feedback.
In the server report, there is some information which client is connect to camera with port, so you can see if someone else is also try to stream from the camera, I guess it is yes, so you need check with other software, try to limit the stream number.
try to upload the server report of your camera is possible.