Click here to Skip to main content
15,121,414 members
Articles / Desktop Programming / MFC
Posted 17 May 2002


81 bookmarked

Windows Media video chatting tool

Rate me:
Please Sign up or sign in to vote.
3.32/5 (35 votes)
20 Feb 2004Apache1 min read
Videochat app using Windows Media technology.

Sample screenshot

Video chat using Winsock and Windows media

This software allows one to setup a server and engage in video chatting using Windows media technology. It makes use of capability within "Windows Media Format" SDK to capture audio/video, compress it and deliver it to a client via the "Windows Media Encoder". Windows Media itself is better suited for content distribution, not live video chat. Included within the software is a simple text chat client which coordinates text chat between members in a certain chat room. Below is a list of the core classes and a brief description.

Within the client app, which is the CPianChat app is:

class CEncoderImpl

The above class is the utility class, used to manipulate the encoder interface.

static IWMEncoder* pEncoder;//encoder interface

void CreateEnc();           //initializes the encoder interface
void StartEncoder();        //starts the encoder
void StopEncoding();        //stops encoder
void Setport();             //set port that other's should connect to.

This class encapsulates the Windows Media Player control.

 class CMediaPlayer2

void Open(LPCTSTR bstrFileName);
//opens a connect to some chatter at "bstrFileName"

To set up the chat server, you'll need a static address for others to connect to. dns2go has what you need. Download the app, select a server name and publish the address (of course, how you accomplish that is your problem :)) for others to use.

You also need to include the path of the WMSDK include folder to the VC++ 6.0 directory list. Install the Windows Media Encoder. Register the Windows Media Player control (it used to be called wmp.ocx).

With all of the above done, you're ready to video chat. :)

Pump up your app, go to Tools and start the encoder. Find a room or create one. There's a lot of room for improvement and feature additions. Questions are welcome. Jobs too :).


This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


About the Author

Web Developer
United States United States
biography? I am not that old yet.

Comments and Discussions

QuestionFailed3 error Pin
Peter Eugene Coleman14-Feb-13 6:07
MemberPeter Eugene Coleman14-Feb-13 6:07 
GeneralMy vote of 4 Pin
Mahdi Nejadsahebi15-Sep-12 1:05
MemberMahdi Nejadsahebi15-Sep-12 1:05 
GeneralMy vote of 1 Pin
Peter Eugene Coleman7-Jul-12 3:46
MemberPeter Eugene Coleman7-Jul-12 3:46 
GeneralMedia Player Controller can't display Pin
jieqiuming8-May-10 1:12
Memberjieqiuming8-May-10 1:12 
General[My vote of 1] ha ha. Pin
josmoi29-Apr-09 23:34
Memberjosmoi29-Apr-09 23:34 
Questionhow to start with wmp Pin
hariprasada24-Sep-08 21:22
Memberhariprasada24-Sep-08 21:22 
Generaladd video chat to my website Pin
bigphil3-Mar-08 8:39
Memberbigphil3-Mar-08 8:39 
Generaldont run in windowsXP Pin
hanlwang28-Dec-05 23:30
Memberhanlwang28-Dec-05 23:30 
QuestionCan anyone capture a image? Pin
amir mortazavi10-Jun-05 6:49
Memberamir mortazavi10-Jun-05 6:49 
GeneralMedia player control can't play wmv and wma files!!!! Pin
mahila15-Feb-05 21:39
Membermahila15-Feb-05 21:39 
GeneralProblem running on Your sample over internet Pin
vinkal chudgar10-Jan-05 20:48
Membervinkal chudgar10-Jan-05 20:48 
GeneralAbout "Failed3" problem Pin
dlbasin7-May-04 23:26
Memberdlbasin7-May-04 23:26 
GeneralRe: About "Failed3" problem Pin
mystro_AKA_kokie8-May-04 19:47
Membermystro_AKA_kokie8-May-04 19:47 
GeneralRe: About "Failed3" problem Pin
Member 49475724-Jul-04 6:59
MemberMember 49475724-Jul-04 6:59 
GeneralRe: About "Failed3" problem Pin
ead mahmoud28-Oct-04 4:04
Memberead mahmoud28-Oct-04 4:04 
GeneralMemory Problem Pin
Anonymous22-Apr-04 22:34
MemberAnonymous22-Apr-04 22:34 
GeneralRe: Memory Problem (varProfile.vt) Pin
aiagent3-Sep-05 19:06
Memberaiagent3-Sep-05 19:06 
GeneralMemory Problem... NEED HELP Pin
karenwong3-Mar-04 5:44
Memberkarenwong3-Mar-04 5:44 
GeneralRe: Memory Problem... NEED HELP Pin
mystro_AKA_kokie3-Mar-04 13:47
Membermystro_AKA_kokie3-Mar-04 13:47 
GeneralRe: Memory Problem... NEED HELP Pin
karenwong3-Mar-04 15:55
Memberkarenwong3-Mar-04 15:55 
GeneralRe: Memory Problem... NEED HELP Pin
karenwong3-Mar-04 17:46
Memberkarenwong3-Mar-04 17:46 
GeneralRe: Memory Problem... NEED HELP Pin
mystro_AKA_kokie3-Mar-04 18:03
Membermystro_AKA_kokie3-Mar-04 18:03 
GeneralRe: Memory Problem... NEED HELP Pin
karenwong3-Mar-04 18:44
Memberkarenwong3-Mar-04 18:44 
GeneralRe: Memory Problem... NEED HELP Pin
mystro_AKA_kokie4-Mar-04 11:58
Membermystro_AKA_kokie4-Mar-04 11:58 
GeneralRe: Memory Problem... NEED HELP Pin
karenwong8-Mar-04 1:06
Memberkarenwong8-Mar-04 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.