Build Webcam and IP camera solutions efficiently in C#.Net
- Download the SDK
- Copy the C# code example into Visual Studio
- Build your IP Camera project
Did you know?This SDK was used to build:
Ozeki Phone System XE - VoIP PBX Software for Developers Which is a high performance PBX system supporting Mobile and Desktop phones.
It was also used to create Ozeki 3D VoIP softphone. A cool SIP client that allows 3D Video calls.
How to send audio to a camera in C#
This article demonstrates how to send audio to a camera, which is useful when someone would like to speak with the people for example when using an intercom device.
Figure 1 - Structure of two-way audio
Benefits of two-way audio
With two-way audio you not just see and record persons, but you could speak with them. If a visitor wants to enter the building, he or she can just use a door station and speak with the security guard. The guard can accept or deny the entry without leaving the security center. The IP cameras are special equipments because they communicate via Internet. In this case the person who speaks with visitor can be even in an other building. There is an other way for a two-way conversation with someone, the VoIP technology. If the system is capable for it you should just use a VoIP compatible equipment like a smartphone and you will be able to speak with the person anywhere.
How does it work?
The microphone with a preamplifier picks up the audio, then converts the analog signal to digital. Then an audio compressor produces data packets for audio transfer. At the end point the data packets will be decompressed and converted back to analog signal again. This signal is low level, so an amplifier is required to drive it to the speaker. The presented method describe one channel work, for two-way audio two channels are needed. If the end point is a PC, there must be a microphone and a speaker attached to the sound card.
Some cameras have built-in microphones and speakers too. Usually just the microphone is built-in. Most products support two-way audio with external devices (e.g. a speaker). In this case choosing and mounting the microphone and the speaker takes extra time. The benefit of this case is that the user can choose between the different speakers and microphones for the best result. These devices are not fixed, so you can put them whereever you want. Their connectors can differ from each other, most of them uses RCA or 3,5 mm Audio jack.
The 3,5mm connector is usually mono type, which means there are separate connectors for the microphone and the speaker. Please be careful because some products made with stereo 3,5 mm jacks. In this case the directional connection is not automatically resolved and you need an adapter cable. This cable separates the channels for the microphone and the speaker. Before buying an audio device please check the user manual of the camera carefully. The most important part of the manual is the one displaying the speaker and microphone power requirement and impedance. Some cameras are made with amplifiers and preamplifiers, but sometimes they support just line level sources. In this case you will need an active speaker (this includes the amplifier) if the microphone type requires a preamplifier (not in all cases).
Doorway intercom is a good choice, because they include a microphone and a speaker as well. Usually the microphone is directional to minimize the noise and make the conversation clearer. This device is recommended for regularly visited entry places like the main entrance.
Below you can find the answers for the most frequently asked questions related to this topic:
How can I get information about the speaker and the microphone's impedance and power?
Please check the user manual of the camera for this information.
I have an IP camera with built-in microphone and I found a microphone plug on camera. What happens if I connect a microphone to camera?
If there is an external microphone connected the internal microphone will be automatically disabled.
I have an IP camera with built-in microphone and I use an external microphone. Unfortunately works only with the international microphone. Why?
- Maybe the external microphone cable or plug is damaged.
- Please check the user manual of the camera for extra information, because maybe it needs accessories to work.