Git Product home page Git Product logo

Comments (7)

Tedyst avatar Tedyst commented on June 26, 2024

This should be now fixed in master, can you please clone the repository and then run python setup.py install to update hikload to the newest version and see if it works? If that dosen't work, can you please enable the debug mode because that may help us debug the issue. Thanks.

from hikload.

XlashDev avatar XlashDev commented on June 26, 2024

Hi, thank you for fast response.

Installed via master as advised. I double check my credentials but is good so I don't know why this error shows up, no debug outputs on terminal
Screenshot from 2022-03-06 11-57-09

Tried via command line. It freezes with this command. I checked also the ISAPI dev info and streaming channels and it shows all relevant infos. So im not sure why it is not working.
Screenshot from 2022-03-06 11-34-14

from hikload.

Tedyst avatar Tedyst commented on June 26, 2024

Maybe the device dosen't support directly downloading the videos? Can you try to enable ffmpeg to see if streaming from the DVR works? Thanks.

from hikload.

XlashDev avatar XlashDev commented on June 26, 2024

I downloaded videos using iVMS-4200. I only use Windows because of that downloader.

Here is the error after I run with ffmpeg options. Looks like similar to an open issue.

`hikload --server 192.168.1.75 --user admin --password Admin12345@ --starttime 2022-02-09T06:00:00+08:00 --endtime 2022-02-09T07:00:00+00:00 --debug --ffmpeg
DEBUG:hikload:http://admin:Admin12345@@192.168.1.75/ISAPI/System/deviceInfo
DEBUG:hikload:http://admin:Admin12345@@192.168.1.75/ISAPI/Streaming/channels
DEBUG:hikload:Data sent: 6a489c8e-0e2b-4f0d-9adb-b5d30aad1f9e1012022-02-09T06:00:00+08:00Z2022-02-09T07:00:00+00:00Z64
DEBUG:hikload:Starting download from: rtsp://admin:Admin12345@@192.168.1.75/ISAPI/Streaming/tracks/101/?starttime=20220208T215519Z&endtime=20220208T220521Z&name=ch01_00000000083000000&size=260276224
0%| ****
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/hikvisionapi/RTSPutils.py", line 57, in downloadRTSP
return ffmpeg.run(stream, capture_stdout=debug, capture_stderr=debug)
File "/home/xxxx/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 325, in run
raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.9/site-packages/tqdm/contrib/logging.py", line 28, in emit
msg = self.format(record)
File "/usr/lib/python3.9/logging/init.py", line 927, in format
return fmt.format(record)
File "/usr/lib/python3.9/logging/init.py", line 663, in format
record.message = record.getMessage()
File "/usr/lib/python3.9/logging/init.py", line 367, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/usr/local/bin/hikload", line 11, in
load_entry_point('hikload==1.1.2', 'console_scripts', 'hikload')()
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/main.py", line 27, in main
run(args)
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 355, in run
download_recordings(server, args, downloadQueue)
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 327, in download_recordings
download_recording(server, args, recordingobj, original_path)
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 308, in download_recording
video_download_from_channel(
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 139, in video_download_from_channel
hikvisionapi.downloadRTSP(
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/hikvisionapi/RTSPutils.py", line 59, in downloadRTSP
logging.error('stdout:', e.stdout.decode('utf8'))
File "/usr/lib/python3.9/logging/init.py", line 2064, in error
root.error(msg, *args, **kwargs)
File "/usr/lib/python3.9/logging/init.py", line 1475, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python3.9/logging/init.py", line 1589, in _log
self.handle(record)
File "/usr/lib/python3.9/logging/init.py", line 1599, in handle
self.callHandlers(record)
File "/usr/lib/python3.9/logging/init.py", line 1661, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.9/logging/init.py", line 952, in handle
self.emit(record)
File "/home/xxxx/.local/lib/python3.9/site-packages/tqdm/contrib/logging.py", line 34, in emit
self.handleError(record)
Message: 'stdout:'
Arguments: ('',)
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/hikvisionapi/RTSPutils.py", line 57, in downloadRTSP
return ffmpeg.run(stream, capture_stdout=debug, capture_stderr=debug)
File "/home/xxxx/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 325, in run
raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.9/site-packages/tqdm/contrib/logging.py", line 28, in emit
msg = self.format(record)
File "/usr/lib/python3.9/logging/init.py", line 927, in format
return fmt.format(record)
File "/usr/lib/python3.9/logging/init.py", line 663, in format
record.message = record.getMessage()
File "/usr/lib/python3.9/logging/init.py", line 367, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/usr/local/bin/hikload", line 11, in
load_entry_point('hikload==1.1.2', 'console_scripts', 'hikload')()
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/main.py", line 27, in main
run(args)
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 355, in run
download_recordings(server, args, downloadQueue)
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 327, in download_recordings
download_recording(server, args, recordingobj, original_path)
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 308, in download_recording
video_download_from_channel(
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/download.py", line 139, in video_download_from_channel
hikvisionapi.downloadRTSP(
File "/usr/local/lib/python3.9/dist-packages/hikload-1.1.2-py3.9.egg/hikload/hikvisionapi/RTSPutils.py", line 60, in downloadRTSP
logging.error('stderr:', e.stderr.decode('utf8'))
File "/usr/lib/python3.9/logging/init.py", line 2064, in error
root.error(msg, *args, **kwargs)
File "/usr/lib/python3.9/logging/init.py", line 1475, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python3.9/logging/init.py", line 1589, in _log
self.handle(record)
File "/usr/lib/python3.9/logging/init.py", line 1599, in handle
self.callHandlers(record)
File "/usr/lib/python3.9/logging/init.py", line 1661, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.9/logging/init.py", line 952, in handle
self.emit(record)
File "/home/xxxx/.local/lib/python3.9/site-packages/tqdm/contrib/logging.py", line 34, in emit
self.handleError(record)
Message: 'stderr:'
Arguments: ("ffmpeg version N-102995-g694545b6d5 Copyright (c) 2000-2021 the FFmpeg developers\n built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)\n configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64\n libavutil 57. 0.100 / 57. 0.100\n libavcodec 59. 3.101 / 59. 3.101\n libavformat 59. 4.100 / 59. 4.100\n libavdevice 59. 0.100 / 59. 0.100\n libavfilter 8. 0.103 / 8. 0.103\n libswscale 6. 0.100 / 6. 0.100\n libswresample 4. 0.100 / 4. 0.100\nUnrecognized option 'stimeout'.\nError splitting the argument list: Option not found\n",)
ERROR:root:Could not download 20220209065613-101.mkv. Try to remove --fmpeg.
ERROR:root:ffmpeg error (see stderr output for detail)
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 55/55 [00:00<00:00, 77.24it/s]`

from hikload.

XlashDev avatar XlashDev commented on June 26, 2024

And btw based on your test how many mbps can you reach during transfer? with that iVMS 4200 I can reach 45 to 80mbs depending on Camera.

from hikload.

Tedyst avatar Tedyst commented on June 26, 2024

Apparently ffmpeg renamed -stimeout to -timeout and I didn't notice. This should now work as intended.

And btw based on your test how many mbps can you reach during transfer? with that iVMS 4200 I can reach 45 to 80mbs depending on Camera.

Usually I would get around 30-40mbps with HikLoad and with iVMS. I could not find any noticeable difference when not using --ffmpeg. But keep in mind that using ffmpeg is usually very slow, since we need to pretty much rerecord the entire video live. I don't know why sometimes HikLoad can't download directly from ISAPI, maybe HikVision updated the ISAPI and I can't find the newer revision.

from hikload.

XlashDev avatar XlashDev commented on June 26, 2024

Thank you for fixing that issue. ffmpeg can be accelerated when with GPU support. Tried it with Nvidia GPU.

Still freezes at 0%. Let me investigate and get back here in case I find why it is not working on our cameras.

hikload --server 192.168.1.75 --user admin --password Admin12345@ --starttime 2022-02-09T06:00:00 --endtime 2022-02-09T07:00:00 --debug --ffmpeg DEBUG:hikload:http://admin:Admin12345@@192.168.1.75/ISAPI/System/deviceInfo DEBUG:hikload:http://admin:Admin12345@@192.168.1.75/ISAPI/Streaming/channels DEBUG:hikload:Data sent: <?xml version = "1.0" encoding = "UTF-8" ?><CMSearchDescription version="1.0" xmlns="http://www.hikvision.com/ver20/XMLSchema"><searchID>7af3b49b-3bf0-4b5d-bcfd-28c0cd581332</searchID><trackIDList><trackID>101</trackID></trackIDList><timeSpanList><timeSpan><startTime>2022-02-09T06:00:00Z</startTime><endTime>2022-02-09T07:00:00Z</endTime></timeSpan></timeSpanList><maxResults>64</maxResults></CMSearchDescription> DEBUG:hikload:Starting download from: rtsp://admin:Admin12345@@192.168.1.75/ISAPI/Streaming/tracks/101/?starttime=20220209T055611Z&endtime=20220209T060611Z&name=ch01_00000000131000000&size=260046848 0%| | 0/7 [00:00<?, ?it/s]

EDIT:

I let the script running and it downloaded some parts and got some error. I will explore this and the ISAPI hikvision manuals.

Message: 'stderr:' Arguments: ('ffmpeg version N-102995-g694545b6d5 Copyright (c) 2000-2021 the FFmpeg developers\n built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)\n configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64\n libavutil 57. 0.100 / 57. 0.100\n libavcodec 59. 3.101 / 59. 3.101\n libavformat 59. 4.100 / 59. 4.100\n libavdevice 59. 0.100 / 59. 0.100\n libavfilter 8. 0.103 / 8. 0.103\n libswscale 6. 0.100 / 6. 0.100\n libswresample 4. 0.100 / 4. 0.100\n[rtsp @ 0x55e411d943c0] Missing PPS in sprop-parameter-sets, ignoring\n[rtsp @ 0x55e411d943c0] method SETUP failed: 500 Internal Server Error\nrtsp://admin:Admin12345@@192.168.1.75/ISAPI/Streaming/tracks/101/?starttime=20220209T060611Z&endtime=20220209T061611Z&name=ch01_00000000132000000&size=260374528: Server returned 5XX Server Error reply\n',) ERROR:root:Could not download 20220209060611-101.mkv. Try to remove --fmpeg. ERROR:root:ffmpeg error (see stderr output for detail) DEBUG:hikload:Starting download from: rtsp://admin:Admin12345@@192.168.1.75/ISAPI/Streaming/tracks/101/?starttime=20220209T061611Z&endtime=20220209T062611Z&name=ch01_00000000133000000&size=260538368 14%|███████████████████████▊

from hikload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.