Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
3.33/5 (3 votes)
See more:
i want to develop an window app, where four users or more can be connected through web cam. means every user can see the faces of other users on his window. How to implement that.

when i searched i foud many things, i am in fix, what to use for that. i founded ,xna,direct show,directX and sharpDX.

and now i am familiar with window apps by c#, WPF,Aforge.net.

any sample or links to study will be appreciated.
Thanks.
Posted

This is called Video Conferencing, so when searching for information you should use that term.

There are several parts to a project like this.
1) Capturing raw video from camera and audio from microphone.
2) Compressing the video and audio.
3) Transmitting and receiving video and audio.
4) Decompressing the video and audio.
5) Displaying the video and playing the audio.

Capturing
There are several articles here on Code Project related to capturing video from web cams. I believe most of them use DirectShow.
Chesnokov Yuriy[^] has written excellent articles on video processing, compression and analytics and also has an article on video capturing: Video Preview and Frames Capture to Memory with SampleGrabber in Buffered Mode.[^]
Here is another article, which really is about solving Sudoku puzzles, but he does captures video from a web cam and I think it is worth looking at: Realtime Webcam Sudoku Solver[^]
Here are a couple more articles like that:
An Easy Video-processing Framework by Grabbing Frames as Bitmaps Using DirectShow[^]
Yet another Web Camera control[^]

I don't really have a lot of references for audio capturing, but here is one to get you started: Play or Capture Audio Sound. Send and Receive as Multicast (RTP)[^]

Compressing audio and video
There are so many audio and video CODECs, that it can be difficult to zero in on any specific ones. I will recommend using H.264 for the video and a speech targeted audio compression. I have used Speex[^] in the past, but it looks like that project is end of life.
Overall, I will recommend using the FFmpeg[^] libraries (not FFmpeg itself, but the libavcodec, libavformat, etc. libraries). It can be challenging to get this working, but there is so much functionality that it is worth researching.

Transmitting and Receiving
You do not mention if you want this conferencing to work within an organization or if it is for your friends and family on the Internet, but in order to develop something that will be flexible and work in most environments, you need to settle on standardized protocols (such as RTP) and video formats (such as H.264).
RTP was created for this purpose and is allowed by most organizations IT departments. If you try to make up your own protocol, the traffic will most likely end up getting blocked by some firewalls.
The FFmpeg libraries also has built-in RTP functionality, but I do not know if it is fully extended to support actual video conferencing.

Decompressing audio and video
Again I will point to FFmpeg as full-featured package for decompressing audio and video.

Displaying video and playing audio
If you go through the articles I have linked to here, presentation of the multimedia will be more or less covered as well.


There is a great article here to get you started: Examples to create your Conferencing System in .NET, C# VOIP & Video Conferencing Systems using H.323 and TAPI 3[^].

ConferenceXP[^] is a Video Conferencing project originally started by Microsoft and later open-sourced. I don't know if it is still being actively developed, but it is a fairly large project, so there is a lot to study.

The author of the first article link I gave also wrote an article about utilizing the ConferenceXP API to build your own system: How to use the managed RTP API classes in .NET to create your multicasting systems[^]


Best of luck to you.
Soren Madsen
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 26-Oct-12 16:03pm    
Nice links, a 5.
--SA
SoMad 26-Oct-12 16:07pm    
Thanks Sergey. I just updated the answer with more information related to capturing and compressing the multimedia.

Soren Madsen
Sergey Alexandrovich Kryukov 26-Oct-12 17:19pm    
Another 5 :-)
--SA
mobeen.ahmed11 27-Jan-16 13:24pm    
Hi, did the FFmpeg support the audio capturing facility? or any other help on capturing audio files is highly appreciated.. thanks
SoMad 30-Jan-16 23:53pm    
Hello. Yes, FFmpeg supports audio capturing. It is difficult to help you when you don't mention anything about what you want to do or how.
I know you said you want to capture audio files, but do you need to record short files when you press a button or does the recording have to run for days, weeks, months?
Have you already settled on your programming language, the Operating System it has to run on, etc?

Even though you are "only" interested in capturing audio and not video, you still have about 5 parts as I mentioned at the beginning of my answer. In your case you want to store the audio in files, so part 3) would be file management rather than network transmission, but don't underestimate the complexity of that.

Soren
As SoMad said, this is called Video Conferencing. We use a commercial SDK (which is leadtools) that helped us to do this in easy way, since we are not familiar with the DirectShow SDK. Since leadtools uses the DirectShow filters, it was easy to create our application. I know that there are sample demos shipped with it for the video conferencing (both server and client). you can check this help topic for information:
Video Streaming
If you need further information, contact their support team.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900