Git Product home page Git Product logo

Comments (11)

fnando1995 avatar fnando1995 commented on July 24, 2024 1

I use YOHO_LAB code, maybe will help you

from hikload.

Tedyst avatar Tedyst commented on July 24, 2024

Hi. Do you have by any chance any non-alphabet characters in your password/username that might trigger this bug?
If yes, can you try to escape them with \ and see if this works ?

from hikload.

fnando1995 avatar fnando1995 commented on July 24, 2024

Hello @Tedyst
Actually no, lets say this are my credentials
user: emmanuel
pass: Emmanuel.

from hikload.

Tedyst avatar Tedyst commented on July 24, 2024

I have tried setting the password to my DVR to Emmanuel., but I couldn't reproduce the bug. But I still moved from using my basic http auth to the proper one from the requests package. Can you verify if this is fixed in master?
If not, can you see if http://user:password@NVRAddress/ISAPI/System/capabilities works in the browser?

from hikload.

fnando1995 avatar fnando1995 commented on July 24, 2024

@Tedyst Sorry! it is not "Emmanuel." is just "Emmanuel" XD, that dot failed there hahaha.

I tried the url you mentioned and it works. Any clues?

thanks for your help by the way

from hikload.

Tedyst avatar Tedyst commented on July 24, 2024

You said that you were using this code as base for something. Did you include the username and password in the serverpath or in the auth parameter like here?

HikLoad/main.py

Lines 32 to 33 in b3eb7be

response = requests.post(serverpath, getXmlString(search), headers,
auth=requests.auth.HTTPBasicAuth(getConfig("user"), getConfig("password")))

from hikload.

fnando1995 avatar fnando1995 commented on July 24, 2024

Ok look, i have this:

I have too DVRs, One with IP cameras and other with no IP cameras.

DVR without IP cameras: Still got the unauthorized problem

Trying to download from camera 101
<?xml version="1.0" encoding="UTF-8" ?>
<userCheck>
<statusValue>401</statusValue>
<statusString>Unauthorized</statusString>
</userCheck>

In the DVR the names are "Camera 01", "Camera 02" and so on, maybe thats something to check?

DVR with IP cameras
It give me a response but the .mp4 file is a 0 bytes file...
Cameras here are name like "Cámara IP1" "Cámara IP2" (yes in spanish and with the simbol "á" because I am from Ecuador).

Trying to download from camera 101
<?xml version="1.0" encoding="UTF-8" ?>
<CMSearchResult version="1.0" xmlns="urn:ISAPIlliance-org">
<searchID>{c85ab0c7-f380-0001-e33b-a030eeb671f0}</searchID>
<responseStatus>true</responseStatus>
<responseStatusStrg>OK</responseStatusStrg>
<numOfMatches>1</numOfMatches>
<matchList>
<searchMatchItem>
<sourceID>{00000000-0000-0000-0000-000000000000}</sourceID>
<trackID>101</trackID>
<timeSpan>
<startTime>2020-01-23T10:00:00Z</startTime>
<endTime>2020-01-23T10:10:00Z</endTime>
</timeSpan>
<mediaSegmentDescriptor>
<contentType>video</contentType>
<codecType>H.264-BP</codecType>
<playbackURI>rtsp://xxx.xxx.xxx.xxx/Streaming/tracks/101/?starttime=20200123T100000Z&amp;endtime=20200123T101000Z&amp;name=02000003397000000&amp;size=1064366528</playbackURI>
</mediaSegmentDescriptor>
<metadataMatches>
<metadataDescriptor>recordType.meta.hikvision.com/timing</metadataDescriptor>
</metadataMatches>
</searchMatchItem>
</matchList>
</CMSearchResult>

This is actually pretty unusul i suppose. Especially knowing that i also test datetime.now()-timedelta(days=1) to ensure at leat all the video is save. check also time is 10:00AM-10:10AM in both (today and todays-1).

thanks!

from hikload.

BilalS10 avatar BilalS10 commented on July 24, 2024

Dear friends,

I am struggling to download video from my hikvision camera ( model no : DS-2CD5A26G0-IZS ).
I have kept the camera on continuous recording mode and the video is being stored in the sd card.
Have tried multiple libraries from git but no success.
Was trying your library. I ran the main.py after changing the config file but got the same error ( unauthorized request). Please help me with the same.
My objective is to download the video by giving it start time and end time.

from hikload.

Tedyst avatar Tedyst commented on July 24, 2024

Can somebody verify if digest is the default authentication method for the NVR? This problem may occur because the auth method must be set to digest/basic (because this library does not yet support digest authentication). I will try to add it in the future.

from hikload.

BilalS10 avatar BilalS10 commented on July 24, 2024

Sure..
Already trying with that..
Thank you :)

from hikload.

BilalS10 avatar BilalS10 commented on July 24, 2024

Can somebody verify if digest is the default authentication method for the NVR? This problem may occur because the auth method must be set to digest/basic (because this library does not yet support digest authentication). I will try to add it in the future.

Yep it is the default as it shows the same in the configuration parameters..
Will try after changing it to digest/basic.

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.