How to create a local virtual IP camera that can be accessed from other software - ip

I need to create several local virtual IP Cameras for a project I'm making. I have tried several software, and the closest I have gotten was with magic camera, because it would let me create a virtual camera, but it wont let me assign a source to that camera. I need to assign an IP address and a username with a password, so that I access the IP camera's video and use that virtual camera in a program I'm developing. the thing is that the Camera's brand is not supported by Labview, so I need to use a virtual local camera to use these cameras (3S Vision IP Cameras).
Thanks in advance!

From the National Instruments Support Knowledgebase:
Connecting to an Arbitrary MJPEG IP Camera with IMAQdx Using Third Party Virtual Camera Emulator
http://digital.ni.com/public.nsf/allkb/9446A8C25CC99F7586257A56004D513D

Here are the options for using an IP cameras in LabVIEW as of 2019:
(in case someone like me still need this)
Use Vision Acquisition Software 14.5 (February 2015)
(with LabVIEW 2014 SP1 and Vision Development Module 2014-2017 SP1)
Pros:
Official, native support;
Any # of cameras.
Cons:
You lose all the features introduced in newer versions of LabVIEW;
Cameras must support and be configured to stream in MJPEG over HTTP.
Additional info:
It's the last version to support arbitrary IP cameras. Basler and Axis IP cameras were supported until VAS 19.0.
Cameras in the same subnet should be detected automatically. If cameras are in another network, you can try to add them manually as follows:
Go to the %Public%\Documents\National Instruments\NI-IMAQdx\Data\ folder;
Open or create a file IPCameras.ini in a text editor;
If creating, place an IPCameras section on a first line:
[IPCameras]
Add a line for each camera in a following format:
cameraSerialNumber = IPAddress, MJPEG stream URL, camera brand, camera description
Save your changes and restart NI MAX.
Use DirectShow device (webcam) emulator
NI-IMAQdx driver supports USB 2.0 cameras through the DirectShow interface. By using software which creates such interface for IP cameras, they can be used as regular USB 2.0 cameras.
There are multiple tools available:
IP Video Source
Pros:
Free;
Any # of cameras.
Cons:
Each camera must be added manually through emulator's settings;
Each camera's resolution must be set manually in emulator's settings;
Cameras must support and be configured to stream in MJPEG over HTTP(S);
32/64-bit versions work independently of each other. NI MAX is a 32-bit application, so it won't show cameras emulated by 64-bit tool. However, they are still detected and can be used in LabVIEW with IMAQdx VIs.
Additional info:
Camera's alias displayed in LabVIEW can be changed in a following way:
Go to the %Public%\Documents\National Instruments\NI-IMAQdx\Data\ folder;
Select one of camX.iid files and open it in a text editor;
Find an attribute InterfaceName and set its value to a desired name. See Vendor attribute's value for a name you set to that camera in emulator's settings;
Save your changes and rename this file to the same name;
Restart LabVIEW.
Moonware Universal Source Filter [more info]
Pros:
Supports JPEG/MJPEG/MPEG4/H264 over HTTP/RTSP;
Hardware decoding;
Low latency;
Multiple cameras.
Cons:
32-bit only. 64-bit version is not likely to happen;
Adds a watermark to an image (free version) / Paid: $49 per PC (no watermark);
Each camera must be added manually through emulator's settings.
and more
Use Multimedia for LabVIEW add-on
Pros:
Native interface (LabVIEW API for FFmpeg libraries);
Supports most codecs and protocols;
Any # of cameras;
Full control over data acquisition and processing (down to individual FFmpeg options).
Cons:
Paid: $949 per PC (developer license), $19 per PC (runtime license), 30 days trial;
Lower-level analog of NI-IMAQdx driver (see more complicated).
Use libVLC to receive images from a camera
(or another similar library)
Pros:
Free;
Supports most codecs and protocols;
Possibility of hardware decoding (depends on library usage);
Any # of cameras.
Cons:
You'll have to interface with libVLC library directly through the Call Library function node;
To receive video frame by frame you'll have to write a simple C library which will be called by libVLC to provide a frame (see example below in a linked thread).

Related

Can a GSM network operator access device firmware version?

Can a GSM network operator access the device firmware version?
As far as I know they can read IMSI and IMEI or the extended IMEI namely IMEI-SV which encodes some sort of version numbering (but is not used by all manufacturers.
Can a telecommunication provider by any other means derive the firmware version of the modem or somehow query the devices?
Could AT commandas be used? Can they be executed at scale to query a whole network with millions of devices (if this would give the firmware version number)
Firstly, it's worth saying that most of the discussion below is related to mobile networks in general, rather than just a 'GSM' network.
Most operators have networks that share and mix technology from '2G', '3G' '4G etc networks and even these terms are not strict definitions (see for some more background on the different generation networks and common naming: https://stackoverflow.com/a/25592213/334402 )
3GPP, the standards body behind most mobile networks, has discussed device management and there exist at least some drafts which cover details like firmware and OS version etc - for example:
3GPP TR 32.802 - User Equipment Management (UEM) Feasibility Study https://www.3gpp.org/ftp/tsg_sa/TSG_SA/TSGS_14/Docs/PDF/SP-010652.pdf
The Open Mobile Alliance has also developed a specification for device management and this likely has more traction. You can see that the firmware version is included in the data covered in their specifications:
OMA Device Management Standardized Objects - https://www.openmobilealliance.org/release/DM/V1_2-20070209-A/OMA-TS-DM_StdObj-V1_2-20070209-A.pdf
The term firmware is also a little ambiguous - if what you want is a feel for the OS version of mobile phone and iPads etc connection to the network, you may be able to work at a higher level and look at the headers in HTTP requests from the devices, specifically at the User Agent string. For example, a query from a browser on an iPhone might include:
Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1
(see more examples here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)
For Modems in particular, it is also worth mentioning the TR-069 specification for managing CPE (Customer Premise Equipment). This spec is from the broadband world and driven by ISP and Broadband operators need to manage wireless (and wired) modems in their customers homes and premises. It is also built into some GSM modems so worth being aware of also - spec is here:
https://www.broadband-forum.org/download/TR-069_Amendment-6.pdf
Note, links above are correct at time of writing - if broken just search for the spec numbers.
I'm not aware of any protocol level standard forcing a cellular device (not only a GSM one) to notify its FW version. In fact it has not any role in network registration like, for example, IMEI and IMSI (that are used to guarantee subscriber's and device's identities).
Anyway several operators control FW (and SW) versions of the devices through protocols defined by OMA Alliance:
OMA-DM protocol, which allows the network operator to retrieve (and set!) several settings: not only FW versions (used in order to deploy FW updates) but also SMS mode settings or APN and so on.
For example in specification document OMA-TS-DM_StdObj-V1_2-20070209-A is described DevDetail management object:
DevDetail _____ [...]
|__ DevType
|__ OEM
|__ FwV
|__ Swv
|__ Hwv
|__ [...]
Each information is got/set/executed by providing a CMD URI command such as
GET /DevDetail/FwV
LwM2M protocol (Light Weight Machine To Machine), a more recent standard suitable for low throughput networks (for exemple LTE CAT-M, specific for IoT devices).
In this light protocol, data is exchanged through CoAP over UDP (or its secure dual CoAPs, based on DTLS). Each information is reachable with an URI made up by (up to) four UINT16:
<Obj ID>[/<Obj Instance>[/<Resource ID>[/<ResourceInstance>]]]
For example in specification document LwM2M Specification 1.1 is described Device Object (Obj ID 3):
/3/0/3 : FW version
/3/0/18 : HW version
/3/0/19 : SW version

Camera Streaming through AVshws driver

Recently I have built a virtual camera filter using Vivek's VCam (http://tmhare.mvps.org/downloads.htm) in directshow but it works only in softwares which can show user mode filters. So to make my virtual device available in all softwares I have to built a kernel mode driver.
I have two questions.
Can I somehow overcome this problem with user mode directshow filter?
If not how can I get camera streaming through AVStream avshws driver available in WDK sample drivers or if there is anyother easy solution for it then please suggest?

Any way to distinguish between virtual and physical camera

Using Directshow.NET I have developed an application which grabs some pictures from camera and save it on disk. Everything is going fine but if in case some virtual camera is registered(installed) For eg. Cyberlink YouCam then directshow receiving following frame: (GraphStudio screenshot)
So, to avoid this I want to detect whether video device(s) found by FilterCategory.VideoInputDevice is virtual or physical webcam. Is there any way to distinguish between both?
Physical camera are implemented by WDM Video Capture Filter. Virtual cameras mimic those, some - better and some - worse.
Those virtual cameras implemented without a driver do not typically implement some interfaces of WDM Video Capture Filter. The one implemented via a driver can be filtered out (black listed) by their hardware path. The task is harder with the latter because WDM Video Capture Filter wraps such driver and implements a filter pretty much similar to physical device filter, but hardware path should reveal its virtual nature.
Use the following piece of code while iterating your filterInfo collection:
if(FilterInfo.MonikerString.StartsWith("#device:pnp:\\\\?\\root", StringComparison.OrdinalIgnoreCase))
{
// virtual camera found
}

Enabling two apps to use a single sound device

I have:
USB Sound which is alsa "Device" or "hw:1,0"
Asterisk console configured to use "plughw:1,0"
This works, letting me use the USB Sound for making and receiving voice calls via Asterisk.
I also want to use multimon to decode DTMF tones during the call. If I stop Asterisk I can run "aoss multimon -T DTMF" to decode the tones successfully but in order to do so I had to create an /etc/asoundrc file like so:
pcm.dsp0 { type plug slave.pcm "hw:1,0" }
Starting Asterisk, which grabs the "plughw:1,0" means I get an error trying to run multimon. I believe this is because only one app can access an alsa device at any one time.
I think I need to split the hw:1,0 into two new alsa devices, which I have been trying to do using alsa plugins (dmix/multi) but I'm afraid I can't get my head around how to get these configured!
p.s. I want to use multimon as I also have other use cases for using it on the same setup to decode other tones than just DTMF.
As #CL have pointed, you could use dsnoop for analysing the audio trhough multimon. The following extract has been taken from Basic Virtual PCM Devices for Playback/Capture, ALSA | nairobi-embedded
The dmix[:$CARD...] and dsnoop[:$CARD...] Virtual PCM Devices
A limitation with the hw[:$CARD...] and plughw[$CARD...] virtual PCM devices (on systems with no hardware mixing) is that only one application at a time can access an audio stream. The dmix[:$CARD...] (playback) and dsnoop[:$CARD...] (capture) virtual PCM devices allow mixing or sharing, respectively, of a single stream among several applications without the intervention of a sound server, i.e. these devices use native ALSA library based mechanisms.

Integrate IP cameras to a standalone PC as a security system

I want to integrate quite a few IP Surveillance cameras to a dedicated PC (one that is unused at our office), I have looked at purchasing a NVR but I want to add about 16 overall and not many NVRs are capable to handle this amount if cameras.
Has anyone tried to setup a monitoring unit on a PC with IP cameras, did you use any specific software? How many HDD did you use?
Thanks for any replies
To build an effective IP securitysystem you will need the followings:
1. Broadband Internet connection:
Stable Internet connection is essentially needed.
2. One or more IP camera(s):
According to the specification of the camera you have mentioned, the IP camera you want to use is ONVIF-compliant.
(Quoting from onvif.org, ONVIF, that is Open Network Video Interface Forum, is an IP-based security standard: it is an open industry forum for the development of a global standard for the interface of IP-based physical security products. The ONVIF specification defines a common protocol for the exchange of information between network video devices including automatic device discovery, video streaming and intelligence metadata.)
The ONVIF standard ensures that there are interoperable products on the market, no matter what happens to individual companies. It increases flexibility and gives greater freedom of choices in case of developing an existing or creating a new surveillance system. Integrating a new equipment into the system takes only a little time.
3. PC:
In order to use your IP cameras with your PC you need to connect both of them to the same network. The best way to get the most out of your cameras if you install a camera viewer application or an IP camera device manager on your PC. By using such a device manager (or a simple camera viewer application) you can display the image of your cameras on your dedicated PC - even the image of multiple cameras simultaneously. You can find many device managers on the market that can be used to connect certain amount of cameras into one security system (this capacity depends on the product).
After connecting the cameras to your system, due to the ONVIF specification, you can control your surveillance system with the help of such useful functionalities as automated device discovery, video analytics, web-broadcasting, motion detection, PTZ control, etc.
NVRs vs. video recorder software
If you can not find any NVR on the market that is able to handle as many IP cameras as you want to use, a video recorder application can solve your problem. If you are not averse to C# development, you can take a look at this Codeproject article (How to Create a Video Recording Application (NVR/DVR software) for an ONVIF IP Camera using C#.NET) that demonstrates step-by-step how to implement a video recorder application that can be used on your PC and that is able to record and save camera videos without using any dedicated device. This way you can avoid using any NVR or DVR.
I hope I helped you to get started!

Resources