This tutorial shows how to configure a Wowza Streaming Engine™ media server application named videochat to illustrate video chat capabilities using Adobe Flash Player. This example requires Wowza Media Server (version 3.1.2 or later) or Wowza Streaming Engine software, and two webcam-equipped client computers (Computer1 and Computer2) running Adobe Flash in a web browser.
Configuring the videochat application and source files
This tutorial uses a web server to make the VideoChat webpage files accessible to both client computers. If you don't want to use a web server, you can copy the contents of the FlashRTMPPlayer folder to a network share or place a copy on each client.
To configure the sample videochat application:
- On the computer running the Wowza media server, navigate to [install-dir]/examples/VideoChat and then click install.bat. This installs a live application named videochat.
Note: The videochat application comes with low-latency streaming enabled as this is beneficial for chat applications. For more information on low-latency applications, see How to set up low latency applications in Wowza Streaming Engine for RTMP streaming.
- Copy the files in [install-dir]/examples/VideoChat/FlashRTMPPlayer to your web server. For this example, place the four files and two folders in a folder in the web root named VideoChat.
Testing videochat playback
The example player.html webpage contains embedded video players that can connect to and preview a computer's webcam feed, stream that video to the Wowza media server, and playback a stream from the media server. Navigate to this webpage on two remote client computers (Computer1 and Computer2) to test the videochat application.
To test the videochat application on two client computers:
- In an Internet browser, navigate to http://[your-web-server]/VideoChat/player.html to open the VideoChat player you moved to your web server.
- If your Wowza media server is on a different computer than Computer 1 or Computer 2, change the Server value on that client to rtmp://[wowza-ip-address]/videochat (where [wowza-ip-address] is the IP address or hostname of the Wowza media server).
- Click Connect. In the Adobe Flash Player Settings dialog box, click Allow to give Adobe Flash Player access to your webcam and microphone. When Flash Player has access, video from your webcam will be displayed in the Sender video section on the left side of the webpage.
- Enter a Stream Name under the Sender video section on each client. The client computers connect to different streams within the same application so make the two names unique. For example:
Computer1 Stream Name: Computer1Stream
Computer2 Stream Name: Computer2Stream
- Click Publish next to the Sender Stream Name on each client. The videochat application is now receiving webcam video from both client computers and can make them available for streaming to video chat participants.
- On each client computer, enter the Stream Name for the opposite client stream in the Receiver video section on the right side of the example webpage. In this example, Computer1 will receive Computer2Stream and Computer2 will receive Computer1Stream.
- Click Play next to the Receiver Stream Name on each client.
- You can configure one client computer to both send and receive the same stream. In this case, you can open [install-dir]/examples/VideoChat/FlashRTMPPlayer/player.html directly and then enter the same Stream Name underneath the Sender and Receiver video sections in the example webpage.
- If your client computers are in the same location, you might need to mute the microphone on one of the computers to prevent audio feedback.
Originally Published: 10-01-2010.
Updated: For Wowza Streaming Engine on 02-11-2014.
If you're having problems or want to discuss this article, post in our forum.