rvi / onvifcamera Goto Github PK
View Code? Open in Web Editor NEWPod and example on how to connect to an ONVIF camera
License: MIT License
Pod and example on how to connect to an ONVIF camera
License: MIT License
Details
I try to connect to Hikvision Camera. I get this problem:
Can't connect to the camera for an unknow reason. Status code: 500
SOAP REQUEST: Optional("http://www.onvif.org/ver20/media/wsdl/GetProfiles")
response: Optional([AnyHashable("Body"): {
Fault = {
Code = {
Subcode = {
Subcode = {
Value = {
attributes = {
};
value = "ter:InvalidOperation";
};
attributes = {
};
};
Value = {
attributes = {
};
value = "ter:ActionNotSupported";
};
attributes = {
};
};
Value = {
attributes = {
};
value = "env:Receiver";
};
attributes = {
};
};
Reason = {
Text = {
attributes = {
lang = en;
};
value = "Optional Action Not Implemented";
};
attributes = {
};
};
attributes = {
};
};
attributes = {
};
}])
Plz help me. Thanks
Hi,
there is a problem with soap authentication despite I insert the right username e password. The soap response is that I'm not authorized. I suspect that the latest ONVIF specs have changed the authentication type so not plain text. Any suggestion ?
thanks
Leo
Hi, would it be possible to add usernameToken to the header of the XML/SOAP envelope for the onvif client library? it would really help us.
Please add Package.swift
how a i can get SOAPEngine licence key.
Hello. Im using OnVif to get local camera stream uri
First sorry for my silly question. but i dont know why I can not get streamUri for profile. First i got 3 profile like below:
[ONVIFCamera.ONVIFCamera.Profile(name: "MediaProfile_Channel1_MainStream", token: "MediaProfile000"), ONVIFCamera.ONVIFCamera.Profile(name: "MediaProfile_Channel1_SubStream1", token: "MediaProfile001"), ONVIFCamera.ONVIFCamera.Profile(name: "mcMediaProfile", token: "mcMediaProfile")]
But none of these can used to get streamUri, here is the log:
getStreamURI: ["Body": {
Fault = {
Code = {
Value = "s:Sender";
};
Reason = {
Text = "Unknown Error";
};
};
}]
Then here is code to get streamURI:
let params = ["Protocol": "RTSP", "ProfileToken": token]
performRequest(request: CameraRequest.getStreamURI(params: params), response: { (result) in
print("getStreamURI: \(result)")
guard let body = result["Body"] as? [String: Any],
let response = body["GetStreamUriResponse"] as? [String: Any],
let mediaReceived = response["MediaUri"] as? [String: Any],
let uriReceived = mediaReceived["Uri"] as? String else {
uri(nil)
return
}
self.streamURI = self.appendCredentialsToStreamURI(uri: uriReceived)
self.state = .ReadyToPlay
uri(uriReceived)
})
Unable to install it.
I'm trying to use this pod in an Objective C project that covers tvOS and iPadOS, however I can't seem to figure out how to import the correct headers. After configuring the Pod I then try to import the headers:
These are the only 2 it offers, and even after importing both, I still cannot use the "ONVIFCamera" type.
Once I can overcome this I'm reasonably sure I can translate the Swift example in to objective C, I just can't seem to get over the first hurdle.
Do you have an Objective C sample project you could add, or give me some pointers as to how I can import the pod so its usable?
Many Thanks
Plasma
Hi,
If i tried to integrate ONVIF Camera library in my iOS project, then is it mandatory to use SOAP License key for connecting the ip camera with my iOS app ?
If it is mandatory, then is it free or paid ?
Thanks
Rahul Chopra
I am getting an error which says:
ld: library not found for -lstdc++
what am I doing wrong?
Hello,
I was able to stream my camera locally successfully .
Now , how can I stream it remotely when I am not connected to local network ?
I tried few tutorials but no luck .
Note: I would like to stream through owned server or bought server but can you suggest camera which is compatible with the library!!
Many thanks.
Hi , I am trying to stream ip camera of HIKVISION brand - having user name and password in my iOS app (ONVIFCamera_Example - sample app) but it gives me below error
3 ONVIFCamera 0x0000000103c4c46d $s11ONVIFCamera14RealmRetrieverV4post33_DE5EB60F985AC4C6AD2B2B3032CD348ELL9urlStringSSSgSS_tF + 893
4 ONVIFCamera 0x0000000103c4c0e8 $s11ONVIFCamera14RealmRetrieverV5realm3forSSSgSS_tF + 40
5 ONVIFCamera 0x0000000103c472da $s11ONVIFCameraAAC14performRequest33_34D2AA8442435CFEE8408E0CFD5F02EFLL7request8response5erroryAA06CameraC0O_ySDySSypGcySScSgtFyycfU_ + 1354
6 ONVIFCamera 0x0000000103c48fd8 $sIeg_IeyB_TR + 40
7 libdispatch.dylib 0x0000000103ddfd18 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x0000000103de0f5b _dispatch_client_callout + 8
9 libdispatch.dylib 0x0000000103de3a28 _dispatch_queue_override_invoke + 1488
10 libdispatch.dylib 0x0000000103df5e77 _dispatch_root_queue_drain + 414
11 libdispatch.dylib 0x0000000103df6b17 _dispatch_worker_thread2 + 278
12 libsystem_pthread.dylib 0x00007ff836172c9d _pthread_wqthread + 256
13 libsystem_pthread.dylib 0x00007ff836171c67 start_wqthread + 15
2023-04-14 12:00:22.679073+0530 ONVIFCamera_Example[6703:151525] Connection 2: received failure notification
2023-04-14 12:00:22.679238+0530 ONVIFCamera_Example[6703:151525] Connection 2: failed to connect 12:8, reason -1
2023-04-14 12:00:22.679358+0530 ONVIFCamera_Example[6703:151525] Connection 2: encountered error(12:8)
2023-04-14 12:00:22.680313+0530 ONVIFCamera_Example[6703:151525] Task <04E3D680-E56D-4937-BC2A-E759F648EAFF>.<0> HTTP load failed, 0/0 bytes (error code: -1003 [12:8])
2023-04-14 12:00:22.680478+0530 ONVIFCamera_Example[6703:151527] NSURLConnection finished with error - code -1003
2023-04-14 12:00:22.680827+0530 ONVIFCamera_Example[6703:151526] SOAPEngine connection fail! - A server with the specified hostname could not be found. http://rtsp://10.1.5/Streaming/Channels/102/?transportmode=unicast/onvif/device_service
Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x6000011406c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://rtsp://10.1./Streaming/Channels/102/?transportmode=unicast/onvif/device_service, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSErrorFailingURLKey=http://rtsp://10.1.5/Streaming/Channels/102/?transportmode=unicast/onvif/device_service, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11]}}, NSErrorFailingURLStringKey=http://rtsp://10.1.5/Streaming/Channels/102/?transportmode=unicast/onvif/device_service, NSErrorFailingURLKey=http://rtsp://10.1.5/Streaming/Channels/102/?transportmode=unicast/onvif/device_service, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}
SOAP REQUEST: http://www.onvif.org/ver10/device/wsdl/GetServices
I tried replacing with YouTube live video link but its also not working - so I guess the issue might be because - WE DONT HAVE LICENSED SOAP ENGINE KEY.
So please let me know if we buy the key - will it work OR can you provide some sample key to atleast work in simulator ?
I get an error "soapengine.h" file not found and Could not build Objective-C module 'ONVIFCamera'.
Please suggest solution for this using Xcode 11.2
hello. can you update library for xCode 10 and swift 4.2? THanks
Dear author,
I'd like to use ONVIFCamera for my study but I'm encountering a problem of SOAPEngine licence key on my real iPhone. How can I bypass this? Or please instruct me parse the XML yourself like it has been done on the Android project. on iOS
I dont know what the meaning of parse the XML in this context.
Thank you very much
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.