amcrest


Nameamcrest JSON
Version 1.9.8 PyPI version JSON
download
home_pagehttp://github.com/tchellomello/python-amcrest
SummaryPython wrapper implementation for Amcrest cameras.
upload_time2023-09-13 19:08:52
maintainer
docs_urlNone
authorDouglas Schilling Landgraf, Marcelo Moreira de Mello
requires_python
licenseGPLv2
keywords amcrest camera python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            ==============
Python Amcrest
==============

.. image:: https://badge.fury.io/py/amcrest.svg
    :target: https://badge.fury.io/py/amcrest

.. image:: https://travis-ci.org/tchellomello/python-amcrest.svg?branch=master
    :target: https://travis-ci.org/tchellomello/python-amcrest

.. image:: https://coveralls.io/repos/github/tchellomello/python-amcrest/badge.svg
    :target: https://coveralls.io/github/tchellomello/python-amcrest

.. image:: https://img.shields.io/pypi/pyversions/amcrest.svg
    :target: https://pypi.python.org/pypi/amcrest

A Python 2.7/3.x module for `Amcrest Cameras <https://www.amcrest.com/>`_ using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.

Documentation: `http://python-amcrest.readthedocs.io/ <http://python-amcrest.readthedocs.io/>`_

------------
Installation
------------

PyPI
----

.. code-block:: bash

    $ pip install amcrest --upgrade
    $ eval "$(register-python-argcomplete amcrest-cli)"

    # To enable amcrest-cli autocomplete in the system:
    $ echo 'eval "$(register-python-argcomplete amcrest-cli)"' >  /etc/profile.d/amcrest-cli-autocomplete.sh

RPM
---

.. code-block:: bash

    $ git clone git@github.com:tchellomello/python-amcrest.git
    $ ./autogen.sh
    $ make rpm
    $ dnf/yum install amcrest-cli-NVR.rpm pythonX-amcrest-NVR.rpm


-----
Usage
-----

.. code-block:: python

    from amcrest import AmcrestCamera
    camera = AmcrestCamera('192.168.0.1', 80, 'admin', 'password').camera

    #Check software information
    camera.software_information
    'version=2.420.AC00.15.R\r\nBuildDate=2016-09-08'

    #Capture snapshot
    camera.snapshot(0, "/home/user/Desktop/snapshot00.jpeg")
    <requests.packages.urllib3.response.HTTPResponse object at 0x7f84945083c8>

    #Capture audio
    camera.audio_stream_capture(httptype="singlepart", channel=1, path_file="/home/user/Desktop/audio.aac")
    CTRL-C to stop the continuous audio flow or use a timer

    #Move camera down
    camera.ptz_control_command(action="start", code="Down", arg1=0, arg2=0, arg3=0)

    #Record realtime stream into a file
    camera.realtime_stream(path_file="/home/user/Desktop/myvideo")
    CTRL-C to stop the continuous video flow or use a timer

Command Line
------------

.. code-block:: bash

    $ man amcrest-cli
    or
    $ amcrest-cli --help

    # Saving credentials to file.
    $ vim ~/.config/amcrest.conf
    [patio]
    hostname: 192.168.0.20
    username: admin
    password: 123456
    port: 80

    [living_room]
    hostname: 192.168.0.21
    username: admin
    password: secret
    port: 80

    $ amcrest-cli --camera living_room --version-http-api
    version=1.40

Text User Interface (TUI)
-------------------------
Configure amcrest.conf and trigger amcrest-tui, make sure the user
triggering amcrest-tui have access to framebuffer device or use sudo.

*NOTE:*
Execute it from console logins, like /dev/ttyX (Non X Window).
Pseudo-terminals like xterm, ssh, screen and others WONT WORK.

.. code-block:: bash

    $ vim ~/.config/amcrest.conf
    [patio]
    hostname: 192.168.0.20
    username: admin
    password: 123456
    port: 80

    [living_room]
    hostname: 192.168.0.21
    username: admin
    password: secret
    port: 80

    $ amcrest-tui


---------------------
Supportability Matrix
---------------------

Cameras
-------

+-------------------------+---------------+----------+-----------------+
| Model                   |     Tested    | Status   | Results/Issues  |
+=========================+===============+==========+=================+
| IPM-721                 | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IPM-HX1                 | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP2M-841                | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP2M-842                | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP3M-941                | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP3M-943                | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP3M-956                | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP3M-956E               | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP3M-HX2                | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP4M-1026B              | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP4M-1041B              | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP4M-1051B              | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP5M-1176EB             | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP8M-2496EB             | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+
| IP8M-T2499EW-28M        | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+


Network Video Recorders (NVR)
-----------------------------

+-------------------------+---------------+----------+-----------------+
| Model                   |     Tested    | Status   | Results/Issues  |
+=========================+===============+==========+=================+
| XVR DAHUA 5104S         | Yes           |  working |                 |
+-------------------------+---------------+----------+-----------------+


If you have different model, feel fee to contribute and report your results.


----
Help
----
If you need any help, please join our community on the Gitter channels available at `Gitter <https://gitter.im/python-amcrest>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/tchellomello/python-amcrest",
    "name": "amcrest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "amcrest camera python",
    "author": "Douglas Schilling Landgraf, Marcelo Moreira de Mello",
    "author_email": "dougsland@gmail.com, tchello.mello@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/30/41/61042da0114469309a499c651600f31f58f613f823ea1ba76349b9f327e8/amcrest-1.9.8.tar.gz",
    "platform": null,
    "description": "==============\nPython Amcrest\n==============\n\n.. image:: https://badge.fury.io/py/amcrest.svg\n    :target: https://badge.fury.io/py/amcrest\n\n.. image:: https://travis-ci.org/tchellomello/python-amcrest.svg?branch=master\n    :target: https://travis-ci.org/tchellomello/python-amcrest\n\n.. image:: https://coveralls.io/repos/github/tchellomello/python-amcrest/badge.svg\n    :target: https://coveralls.io/github/tchellomello/python-amcrest\n\n.. image:: https://img.shields.io/pypi/pyversions/amcrest.svg\n    :target: https://pypi.python.org/pypi/amcrest\n\nA Python 2.7/3.x module for `Amcrest Cameras <https://www.amcrest.com/>`_ using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.\n\nDocumentation: `http://python-amcrest.readthedocs.io/ <http://python-amcrest.readthedocs.io/>`_\n\n------------\nInstallation\n------------\n\nPyPI\n----\n\n.. code-block:: bash\n\n    $ pip install amcrest --upgrade\n    $ eval \"$(register-python-argcomplete amcrest-cli)\"\n\n    # To enable amcrest-cli autocomplete in the system:\n    $ echo 'eval \"$(register-python-argcomplete amcrest-cli)\"' >  /etc/profile.d/amcrest-cli-autocomplete.sh\n\nRPM\n---\n\n.. code-block:: bash\n\n    $ git clone git@github.com:tchellomello/python-amcrest.git\n    $ ./autogen.sh\n    $ make rpm\n    $ dnf/yum install amcrest-cli-NVR.rpm pythonX-amcrest-NVR.rpm\n\n\n-----\nUsage\n-----\n\n.. code-block:: python\n\n    from amcrest import AmcrestCamera\n    camera = AmcrestCamera('192.168.0.1', 80, 'admin', 'password').camera\n\n    #Check software information\n    camera.software_information\n    'version=2.420.AC00.15.R\\r\\nBuildDate=2016-09-08'\n\n    #Capture snapshot\n    camera.snapshot(0, \"/home/user/Desktop/snapshot00.jpeg\")\n    <requests.packages.urllib3.response.HTTPResponse object at 0x7f84945083c8>\n\n    #Capture audio\n    camera.audio_stream_capture(httptype=\"singlepart\", channel=1, path_file=\"/home/user/Desktop/audio.aac\")\n    CTRL-C to stop the continuous audio flow or use a timer\n\n    #Move camera down\n    camera.ptz_control_command(action=\"start\", code=\"Down\", arg1=0, arg2=0, arg3=0)\n\n    #Record realtime stream into a file\n    camera.realtime_stream(path_file=\"/home/user/Desktop/myvideo\")\n    CTRL-C to stop the continuous video flow or use a timer\n\nCommand Line\n------------\n\n.. code-block:: bash\n\n    $ man amcrest-cli\n    or\n    $ amcrest-cli --help\n\n    # Saving credentials to file.\n    $ vim ~/.config/amcrest.conf\n    [patio]\n    hostname: 192.168.0.20\n    username: admin\n    password: 123456\n    port: 80\n\n    [living_room]\n    hostname: 192.168.0.21\n    username: admin\n    password: secret\n    port: 80\n\n    $ amcrest-cli --camera living_room --version-http-api\n    version=1.40\n\nText User Interface (TUI)\n-------------------------\nConfigure amcrest.conf and trigger amcrest-tui, make sure the user\ntriggering amcrest-tui have access to framebuffer device or use sudo.\n\n*NOTE:*\nExecute it from console logins, like /dev/ttyX (Non X Window).\nPseudo-terminals like xterm, ssh, screen and others WONT WORK.\n\n.. code-block:: bash\n\n    $ vim ~/.config/amcrest.conf\n    [patio]\n    hostname: 192.168.0.20\n    username: admin\n    password: 123456\n    port: 80\n\n    [living_room]\n    hostname: 192.168.0.21\n    username: admin\n    password: secret\n    port: 80\n\n    $ amcrest-tui\n\n\n---------------------\nSupportability Matrix\n---------------------\n\nCameras\n-------\n\n+-------------------------+---------------+----------+-----------------+\n| Model                   |     Tested    | Status   | Results/Issues  |\n+=========================+===============+==========+=================+\n| IPM-721                 | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IPM-HX1                 | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP2M-841                | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP2M-842                | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP3M-941                | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP3M-943                | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP3M-956                | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP3M-956E               | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP3M-HX2                | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP4M-1026B              | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP4M-1041B              | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP4M-1051B              | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP5M-1176EB             | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP8M-2496EB             | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n| IP8M-T2499EW-28M        | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n\n\nNetwork Video Recorders (NVR)\n-----------------------------\n\n+-------------------------+---------------+----------+-----------------+\n| Model                   |     Tested    | Status   | Results/Issues  |\n+=========================+===============+==========+=================+\n| XVR DAHUA 5104S         | Yes           |  working |                 |\n+-------------------------+---------------+----------+-----------------+\n\n\nIf you have different model, feel fee to contribute and report your results.\n\n\n----\nHelp\n----\nIf you need any help, please join our community on the Gitter channels available at `Gitter <https://gitter.im/python-amcrest>`_.\n",
    "bugtrack_url": null,
    "license": "GPLv2",
    "summary": "Python wrapper implementation for Amcrest cameras.",
    "version": "1.9.8",
    "project_urls": {
        "Homepage": "http://github.com/tchellomello/python-amcrest"
    },
    "split_keywords": [
        "amcrest",
        "camera",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6fee0b399d6889d53c97a5af9e2c830af9cfa20685a0f05d0a2cd50426fc295b",
                "md5": "45588b2943093acf77f5803aacf61b4d",
                "sha256": "0b8175d0cf0af3a12aa2aa6212648ce2ae59d0fca2e69e7cda3f06b695583fe0"
            },
            "downloads": -1,
            "filename": "amcrest-1.9.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45588b2943093acf77f5803aacf61b4d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 54786,
            "upload_time": "2023-09-13T19:08:50",
            "upload_time_iso_8601": "2023-09-13T19:08:50.778289Z",
            "url": "https://files.pythonhosted.org/packages/6f/ee/0b399d6889d53c97a5af9e2c830af9cfa20685a0f05d0a2cd50426fc295b/amcrest-1.9.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "304161042da0114469309a499c651600f31f58f613f823ea1ba76349b9f327e8",
                "md5": "b19437e2c6c86b533425bde51b49e5be",
                "sha256": "bfc82cc2befa5cf94fcbb1ebe4d5d0ecb4668cfd4a53e6242cf27ff681ab66d2"
            },
            "downloads": -1,
            "filename": "amcrest-1.9.8.tar.gz",
            "has_sig": false,
            "md5_digest": "b19437e2c6c86b533425bde51b49e5be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 43565,
            "upload_time": "2023-09-13T19:08:52",
            "upload_time_iso_8601": "2023-09-13T19:08:52.522624Z",
            "url": "https://files.pythonhosted.org/packages/30/41/61042da0114469309a499c651600f31f58f613f823ea1ba76349b9f327e8/amcrest-1.9.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-13 19:08:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tchellomello",
    "github_project": "python-amcrest",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "amcrest"
}
        
Elapsed time: 1.74196s