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

Streaming from IP4M-1051W? #203

Open
allComputableThings opened this issue Dec 13, 2021 · 0 comments
Open

Streaming from IP4M-1051W? #203

allComputableThings opened this issue Dec 13, 2021 · 0 comments

Comments

@allComputableThings
Copy link

I'm trying to stream from a IP4M-1051W

from amcrest import AmcrestCamera

user = 'admin'
password = '*****'
hostname = '10.0.1.104'

conn = AmcrestCamera(
    host=hostname,
    port=80,
    # user=None,
    # password=None,
    user=user,
    password=password
)

camera = conn.camera
print(camera.software_information)                                            # Success
camera.snapshot(channel=0, path_file="./snapshot00.0.jpeg")  # Success
camera.snapshot(channel=1, path_file="./snapshot00.1.jpeg")  # Success

for (channel, typeno) in [
    (1, 0),
    (0, 1),
    (0, 0),
    (1, 1),
]:
    try:
        print(f"channel={channel}  typeno={typeno}")
        camera.realtime_stream(path_file="./vid.mp4",
                               channel=channel,
                               typeno=typeno
                               )
    except Exception as e:
        print(e)

... connects to the camera, performs screenshots, but fails with:

<AMC0479C_73416F:AMC0479C650B73416F> Trying again due to error: HTTPError('400 Client Error: Bad Request for url: http://10.0.1.104:80/cgi-bin/realmonitor.cgi?action=getStream&channel=1&subtype=0')
400 Client Error: Bad Request for url: http://10.0.1.104:80/cgi-bin/realmonitor.cgi?action=getStream&channel=1&subtype=0

I see that IP4M-1051B is supported (I assume this is IP4M-1051W but in black).

Is streaming not supported for this model, or am I using the API wrong?

Thanks in advance.

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