Package: hikload
HikLoadA collection of short Python scripts that utilize the ISAPI specification for Hikvision DVR/NVRs/Cameras.Using the UIIf you want to use the new interface written in Qt, you can use the commandhikload-qtafter installing using one of the recommended methods (only pip and source).Using the terminalTo use your own DVR it is usually only needed to change the arguments for the script. The first parameter is the IP, the second one is the username and the third is the password. Here are all of the possible parameters:usage: hikload [-h] [--server SERVER] [--username USERNAME] [--password PASSWORD] [--starttime STARTTIME] [--endtime ENDTIME]
               [--folders {onepercamera,oneperday,onepermonth,oneperyear}] [--debug | --no-debug] [--videoformat {mkv,mp4,avi}] [--downloads DOWNLOADS] [--frames FRAMES]
               [--force | --no-force] [--skipseconds SKIPSECONDS] [--seconds SECONDS] [--days DAYS] [--skipdownload | --no-skipdownload] [--allrecordings | --no-allrecordings]
               [--cameras CAMERAS] [--localtimefilenames | --no-localtimefilenames] [--yesterday | --no-yesterday] [--ffmpeg | --no-ffmpeg]
               [--forcetranscoding | --no-forcetranscoding] [--photos | --no-photos] [--mock | --no-mock] [--ui | --no-ui]

Download Recordings from a HikVision server, from a range interval

options:
  -h, --help            show this help message and exit
  --server SERVER       the hikvision server's address
  --username USERNAME   the username
  --password PASSWORD   the password
  --starttime STARTTIME
                        the start time in ISO format (default: today at 00:00:00, local time)
  --endtime ENDTIME     the start time in ISO format (default: today at 23:59:59, local time)
  --folders {onepercamera,oneperday,onepermonth,oneperyear}
                        create a separate folder per camera/duration (default: disabled)
  --debug, --no-debug   enable debug mode (default: false)
  --videoformat {mkv,mp4,avi}
                        specify video format (default: mkv)
  --downloads DOWNLOADS
                        the downloads folder (default: "Downloads")
  --frames FRAMES       save a frame for every X frames in the video (default: false)
  --force, --no-force   force saving of files (default: false)
  --skipseconds SKIPSECONDS
                        skip first X seconds for each video (default: 0)
  --seconds SECONDS     save only X seconds for each video (default: inf)
  --days DAYS           download videos for the last X days (ignores --endtime and --starttime)
  --skipdownload, --no-skipdownload
                        do not download anything
  --allrecordings, --no-allrecordings
                        download all recordings saved
  --cameras CAMERAS     camera IDs to search (example: --cameras=201,301)
  --localtimefilenames, --no-localtimefilenames
                        save filenames using date in local time instead of UTC
  --yesterday, --no-yesterday
                        download yesterday's videos
  --ffmpeg, --no-ffmpeg
                        enable ffmpeg and disable downloading directly from server
  --forcetranscoding, --no-forcetranscoding
                        force transcoding if downloading directly from server
  --photos, --no-photos
                        enable experimental downloading of saved photos
  --mock, --no-mock     enable mock mode WARNING! This will not download anything from the server
  --ui, --no-ui         enable UI interface WARNING! Requires Qt5 to be installed (default: False)The DVR/NVR needs to have ISAPI and RTSP enabled in System/Security and H264+ disabled for every camera.Installing and running the scriptYou can install the script fromPyPi, run the script directly from the source, or use the Docker image:dockerpullghcr.io/tedyst/hikload
dockerrun-v$(pwd)/Downloads:/app/Downloadsghcr.io/tedyst/hikload--server192.168.10.239--useradmin--passwordpasswordIf you decide to use the PyPi package, there will be a command calledhikloadin your PATH, and also a program namedhikload-qtfor the UI version:pipinstallhikload
hikload-hTo run the script from source, you can use this command from the root directory of the project:pythonsetup.pyinstall
hikload-hAfter this command, you will have installedhikloadandhikload-qtin your PATH.If you want to use the default arguments, you can specify only the required arguments:hikload--server192.168.10.239--userusername--passwordpasswordFor more advanced users, you can specify optional arguments like the start and end time for the video search:hikload--server192.168.10.239--userusername--passwordpassword--starttime2021-09-19T03:00:00+03:00--endtime2021-09-20T04:00:00+00:00Or just specify the cameras that you want to search(be sure to use the HikVision format - 101 for first camera, 201 for the second one...):hikload--server192.168.10.239--userusername--passwordpassword--cameras=201,301Installing DependenciesDue tocommon problemsfound while installing the dependencies needed by this project, it is recommended to use a python virtualenv. Here is how to setup one:pipinstallpipenv
pipenvinstall--dev
pipenvshellAnd everytime you restart the terminal and want to use the virtualenv, you need to run these commands:pipenvshell