man(1)

NAME
amcrest-cli - A tool to manage Amcrest camera

SYNOPSIS
amcrest-cli [-H HOSTNAME -u USERNAME -p PASSWORD] [--camera <camera>] [options]

DESCRIPTION
amcrest-cli is a command line tool to manage Amcrest camera.

By default it reads the default ~/.config/amcrest.conf configuration file. If the file does not exist, it requires the use of -H HOSTNAME -u USERNAME -p PASSWORD options.

The current format for ~/.config/amcrest.conf is:

    [mycamera1]
    hostname: mycamera1.example.com
    username: admin
    password: 1234567
    port: 80

    [mycamera2]
    hostname: mycamera2.example.com
    username: admin
    password: 7654321
    port: 80

Note that when having more than one camera defined, it will be required to use the option --camera.

    $ amcrest-cli --camera mycamera2 --save ~/Desktop/mycamera2_snapshot.jpg

The password will be prompted to the user if not found in the configuration file.

OPTIONS

-h, --help
    Displays a list of options.

--current-time
    Get current time from camera.

--snapshot
    Get snapshot, use one of the following options:
    0 - regular snapshot
    1 - motion detection snapshot
    2 - alarm snapshot

--save
    save output as file for operations like:
    --snapshot
    --audio-stream-capture
    --config-backup

--motion-detection-status
    Returns if the motion detection is enabled or disabled

--motion-detection
    Enable or Disable motion detection, use true or false

--general-config
    Get general config

--network-config
    Get network config

--telnet-config
    Show or set telnet service, use true or false

--scan-wlan-devices <SSID>
    Scan wlan devices

--wlan-config <PARAM=value>
    Show/Set wlan config

--version-http-api
    Get version of HTTP API

--network-interfaces
    Get network interfaces

--vendor-information
    Get vendor information

--onvif-information
    Get Onvif information

--software-information
    Get software information

--system-information
    Get system information

--serial-number
    Get serial number

--machine-name
    Get machine name

--device-class
    Get device class

--device-type
    Get device type

--config-backup
    Download all settings of a device

--hardware-version
    Get hardware version

--scan-devices
    Scan amcrest cameras in the subnet provided. Masks support: /16, /24, /25, /27, /28, /29, /30, /31
    If mask not provide, will be used /24.

--info-user <username>
    Get information about the username

--info-all-users
    Get information about all usernames

--info-all-active-users
    Get information about all active users

--info-group <group>
    Get information about group

--info-all-groups
    Get information about all groups

--add-user <username> <password> <group> [sharable] [reserved] [memo]
    username - username for user
    password - password for user
    group - string the range is "admin" and "user". In different group,
            the user has different authorities.
    sharable - bool, true means allow multi-point login
    reserved - bool, true means this user can't be deleted
    memo - memo to user

--modify-password <username> <new password> <old password>
    Modify user password

--modify-user <username> <attribute> <new value>
    Modify user attribute
    Possible attributes: group, sharable, reserved, memo

--delete-user <username>
    Delete user

--shutdown
    Shutdown the camera (it's like reboot now)

--reboot [delay]
    Reboot the camera

--mjpg-stream [ChannelNo] [TypeNo]
    Capture mjpg stream

--video-blind-detect-config
    Get video blind detect config

--video-loss-detect-config
    Get video loss detect config

--event-handler-config <configname>
    Get event handler configname

--alarm-config
    get alarm config

--alarm-out-config
    get alarm out config

--alarm-states-output-channels
    alarm states output channels

--alarm-states-input-channels
    alarm states input channels

--alarm-input-channels
    alarm input channels

--alarm-output-channels
    alarm output channels

--event-login-failure
    event login failure

--event-storage-not-exist
    event storage not exist

--event-management
    event management

--event-storage-access-failure
    event storage access failure

--event-storage-low-space
    event storage low space

--event-net-abort
    event net abort

--event-ip-conflict
    event ip conflict

--event-channels-happened <channel>
    channel params: VideoMotion, VideoLoss, VideoBlind, Alarmlocal

--audio-input-channels-numbers
    audio input channels numbers

--audio-output-channels-numbers
    audio output channels numbers

--record-mode
    show/set record mode (0 Automatically record, 1 Manually Record, 0 Stop Record)

--record-capability
    show record capability

--record-config
    show record config

--play-wav
    play a wav file in the camera microphone

--audio-send-stream
    play audio into the camera microphone, user must specify httptype, channel, file and codec

--factory-create
    create a media file finder

--media-global-config
    media global config

--video-max-extra-stream
    max extra stream

--video-color-config
    color config

--encode-capability
    encode capability

--encode-config-capability
    encode config capability

--encode-media
    encode media

--encode-region-interested
    encode region interested

--ptz-presets-list
    show all PTZ preset regions

--ptz-goto-preset
    move camera to a PTZ preset region

--video-channel-title
    channel title

--video-input-channels-device-supported
    input channels device supported

--video-output-channels-device-supported
    output channels device supported

--video-max-remote-input-channels
    max remote input channels

--video-in-options
    video in options

--video-out-options
    video out options

--video-input-capability
    video input capability

--video-coordinates-current-window <channel>
    set coordinates current window

--video-standard [PAL or NTSC]
    view/set video standard <PAL or NTSC>

EXAMPLES

Get general config
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --general-config

Grab snapshot and save in /tmp/self.jpeg
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --snapshot --save /tmp/self.jpeg

Check if motion detection is enable or disable
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --motion-detection

Enable motion detection
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --motion-detection true

Disable motion detection
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --motion-detection false

Get network config
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --network-config

Get network interfaces
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --network-interfaces

Get current time
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --current-time

Set current time
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --current-time "2016-10-28 13-48-00"

Scan Amcrest devices
    $ amcrest-cli -H 192.168.1.10 --scan-devices 192.168.0.1/24

Get version of HTTP API
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --version-http-api

Get device type
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --device-type

Show telnet service settings
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --telnet-config

Disable telnet service
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --telnet-config false

Get software information
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --software-information

Capture audio stream with httptype as singlepart, channel as 1 and 10 sec as timer
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --audio-stream-capture singlepart 1 10 --save /home/user/myaudio.aac

Capture mjpeg with 20 sec as timer
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --mjpg-stream 20 --save /home/user/myfile.mjpg

Show UPnP status
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --upnp-status

Show UPnP config
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --upnp-config

Setting UPnP config
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --upnp-config UPnP.Enable=true
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --upnp-config "UPnP.Enable=true&UPnP.MapTable[0].Protocol=UDP"

NTP Examples
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --ntp-config NTP.Address=pool.ntp.org
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --ntp-config NTP.Enable=true

Move camera to a preset region on channel 0 preset 1
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --ptz-goto-preset 0 1
    $ amcrest-cli --camera mycamera1 --ptz-goto-preset 0 1

Play wav file
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --play-wav /path/file.wav

Play audio stream
    $ amcrest-cli -H 192.168.1.10 -u admin -p password --audio-send-stream singlepart 1 /path/file.wav G.711A

BUGS
Report bugs to <https://github.com/tchellomello/python-amcrest/issues>

SEE ALSO
amcrest-cli(1)

COPYRIGHT
Copyright 2016 License GPLv2: GNU GPL Version 2 <http://gnu.org/licenses/gpl.html>.