mipc-camera-client


Namemipc-camera-client JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/pan-maruda/mipc-camera-client-python
Summarycommand-line interface and client library for MIPC IP cameras
upload_time2024-02-24 19:16:38
maintainer
docs_urlNone
authorPan Maruda
requires_python>=3.10,<4.0
licenseBSD-3-Clause
keywords webcam mipc rtsp ip camera cli command line interface ptz
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mipc_camera_client

[![PyPI version](https://badge.fury.io/py/mipc-camera-client.svg)](https://badge.fury.io/py/mipc-camera-client)

Simple client for MIPC-based webcam. 
I bought a cheapo used WiFi camera on eBay, turns out the local web UI accessible over LAN is broken,
and using the OEM's app proxies all the video through random IP addresses which I'm not cool with.

## supported features

- login & auth - reverse-engineered from the broken web UI on my camera :)
- getting a snapshot
- getting a stream URL
- control pan/tilt

## Using the library

Install the package as usual per your package manager and:
```python
camera_ip = "192.168.0.123"
camera_user = "exampleuser"
camera_password = "P@ssw0rd"

from mipc_camera_client import MipcCameraClient

c = MipcCameraClient(camera_ip)
c.login(camera_user, camera_password)
jpeg_data = c.get_image()
with open("hello.jpg", mode="wb") as file:
    file.write(jpeg_data)
```

Also see [examples/](./examples/).

## CLI

```
$ usage: mipc_camera_client [-h] [--host HOST] [--user USER] {snapshot,stream,ptz} ...

CLI client for MIPC cameras

options:
  -h, --help            show this help message and exit
  --host HOST           Camera address (hostname or IP), uses CAMERA_HOST env var if not supplied
  --user USER           Camera username (from the web interface), uses CAMERA_USER env var if not supplied. Set CAMERA_PASSWORD for password.

commands:
  Available commands

  {snapshot,stream,ptz}
    snapshot            take a JPEG snapshot
    stream              get RTMP stream URL
    ptz                 control pan/tilt/zoom
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pan-maruda/mipc-camera-client-python",
    "name": "mipc-camera-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "webcam,mipc,rtsp,ip camera,cli,command line interface,ptz",
    "author": "Pan Maruda",
    "author_email": "panmaruda@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c1/18/f38ee7e8868261d64dac1241c028f49a080e49ede6f02371c5497eca54aa/mipc_camera_client-0.1.3.tar.gz",
    "platform": null,
    "description": "# mipc_camera_client\n\n[![PyPI version](https://badge.fury.io/py/mipc-camera-client.svg)](https://badge.fury.io/py/mipc-camera-client)\n\nSimple client for MIPC-based webcam. \nI bought a cheapo used WiFi camera on eBay, turns out the local web UI accessible over LAN is broken,\nand using the OEM's app proxies all the video through random IP addresses which I'm not cool with.\n\n## supported features\n\n- login & auth - reverse-engineered from the broken web UI on my camera :)\n- getting a snapshot\n- getting a stream URL\n- control pan/tilt\n\n## Using the library\n\nInstall the package as usual per your package manager and:\n```python\ncamera_ip = \"192.168.0.123\"\ncamera_user = \"exampleuser\"\ncamera_password = \"P@ssw0rd\"\n\nfrom mipc_camera_client import MipcCameraClient\n\nc = MipcCameraClient(camera_ip)\nc.login(camera_user, camera_password)\njpeg_data = c.get_image()\nwith open(\"hello.jpg\", mode=\"wb\") as file:\n    file.write(jpeg_data)\n```\n\nAlso see [examples/](./examples/).\n\n## CLI\n\n```\n$ usage: mipc_camera_client [-h] [--host HOST] [--user USER] {snapshot,stream,ptz} ...\n\nCLI client for MIPC cameras\n\noptions:\n  -h, --help            show this help message and exit\n  --host HOST           Camera address (hostname or IP), uses CAMERA_HOST env var if not supplied\n  --user USER           Camera username (from the web interface), uses CAMERA_USER env var if not supplied. Set CAMERA_PASSWORD for password.\n\ncommands:\n  Available commands\n\n  {snapshot,stream,ptz}\n    snapshot            take a JPEG snapshot\n    stream              get RTMP stream URL\n    ptz                 control pan/tilt/zoom\n```\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "command-line interface and client library for MIPC IP cameras",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/pan-maruda/mipc-camera-client-python"
    },
    "split_keywords": [
        "webcam",
        "mipc",
        "rtsp",
        "ip camera",
        "cli",
        "command line interface",
        "ptz"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da30f3ef90f842d06e7de3c8f1d9fd203fa0268ec00262bc614d1745f7499057",
                "md5": "e91c80cedd19126f82b727005e07dd14",
                "sha256": "2f87562d00f98d71120beeff8b275d1a8aebca6fcfd6c83eef7f427992a85735"
            },
            "downloads": -1,
            "filename": "mipc_camera_client-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e91c80cedd19126f82b727005e07dd14",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 9542,
            "upload_time": "2024-02-24T19:16:37",
            "upload_time_iso_8601": "2024-02-24T19:16:37.739410Z",
            "url": "https://files.pythonhosted.org/packages/da/30/f3ef90f842d06e7de3c8f1d9fd203fa0268ec00262bc614d1745f7499057/mipc_camera_client-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c118f38ee7e8868261d64dac1241c028f49a080e49ede6f02371c5497eca54aa",
                "md5": "8f889ce220070cbea7058476c37ccc9f",
                "sha256": "3c2dedc74b80459c9f8623ef4874b798e6b05ae6e7d99c35484e456c9c7a9e04"
            },
            "downloads": -1,
            "filename": "mipc_camera_client-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8f889ce220070cbea7058476c37ccc9f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 8074,
            "upload_time": "2024-02-24T19:16:38",
            "upload_time_iso_8601": "2024-02-24T19:16:38.824503Z",
            "url": "https://files.pythonhosted.org/packages/c1/18/f38ee7e8868261d64dac1241c028f49a080e49ede6f02371c5497eca54aa/mipc_camera_client-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-24 19:16:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pan-maruda",
    "github_project": "mipc-camera-client-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mipc-camera-client"
}
        
Elapsed time: 0.20867s