Connect a camera to the computer.
To complete this tutorial, install the following software:
Flash Media Live Encoder captures live audio and video, encodes it, and streams it to Adobe Media Server. Flash Media Live Encoder is free so it’s a good idea to download the latest version.
You can use any edition of Adobe Media Server to stream live media, including the free developer edition. For information about installing the server, see Installing the server.
This tutorial uses a video player that requires Flash Player 10.
For more information, see Supported clients, encoders, codecs, and file formats and Pre-built media players.
Publish a live stream to Adobe Media Server
Connect a camera to the computer.
Open Flash Media Live Encoder and do the following in the Encoding Options panel:
From the Preset menu, choose High Bandwidth (300 Kbps) - H.264.
You can choose any of the single stream options (not Multi Bitrate) from the Preset menu. The information on the left side of the panel is filled in when you choose a preset.
Select Stream to Adobe Media Server.
For AMS URL, enter rtmp://localhost/live.
Use localhost for testing when Flash Media Live Encoder and Adobe Media Server are on the same computer. In a production environment, use the domain name or IP address of the computer hosting Adobe Media Server, for example, rtmp://ams.mycompany.com/live.
If you’re using a Adobe Media Server hosting provider, they can give you the domain name or IP address of the server.
You must use the name live in the AMS URL unless you duplicate and rename the live service. The live service is a pre-built application on Adobe Media Server installed to rootinstall/applications/live. For more information, see Duplicate the live service.
For Stream, enter livestream.
To save a recording of the stream on your hard drive, select Save to File, click Browse, and choose a location. If you chose an H.264 preset, use an .f4v filename extension. If you chose a VP6 preset, use an .flv filename extension.
Note that the server is not recording the file; Flash Media Live Encoder is recording the file. To serve the file on-demand when the live event is over, copy the file to the local disk of the server. For more information, see Stream on-demand media (RTMP).
To play an F4V file recorded by Flash Media Live Encoder without streaming it from the server, use the F4V Flattener tool to flatten the file. You can play FLV files without flattening them.
Click Start to connect to the server and start streaming.
Use the Adobe Media Server sample player to play a live stream
Double-click the rootinstall/samples/videoPlayer/videoplayer.html file to open the sample video player in a browser.
Substitute the Adobe Media Server installation directory for rootinstall.
In the sample video player, do one of the following:
In the list of videos, click “livestream”.
Enter rtmp://localhost/live/livestream, check the LIVE checkbox, and click PLAY STREAM.
If the media player isn’t on the same computer as Adobe Media Server, replace localhost with the domain name or IP address of the computer hosting Adobe Media Server.
Use this URL to play this stream from any compatible video player, including Flash Media Playback and Strobe Media Playback. For more information about the sample video player and other video players, see Pre-built media players.
Use Flash Media Playback to play a live stream
Load the Flash Media Playback Setup page in a web browser.
Enter the Video Source:
You can replace localhost with the domain name or IP address of the server.
Click Preview to update the embed code.
Click Play to test the code.
To use the player in your own HTML page, copy the embed code and paste it into your page. Flash Media Playback is a compiled SWF file hosted by Adobe.
Use the following values to publish a single live stream to Adobe Media Server for streaming over RTMP:
AMS URL: rtmp://ams-ip-or-dns/live
Use the following URL to play a live stream:
You can create as many instances of the live service as you need.
Create a folder in the rootinstall/applications folder, for example, rootinstall/applications/live2
Copy the main.far, Application.xml, allowedHTMLdomains.txt, and allowedSWFdomains.txt files from the rootinstall/applications/live folder to the live2 folder.
Open the ams.ini file (located in rootinstall/conf) and add a parameter to set the content path for the new service, for example:LIVE2_DIR = C:\Program Files\Adobe\Adobe Media Server 5\applications\live2
LIVE2_DIR = C:\Program Files\Adobe\Adobe Media Server 5\applications\live2
Open the Application.xml file in the rootinstall/applications/live2 folder and edit the virtual directory to the following:
Restart the server.
Clients can connect to the new publishing point at the URL:
You cannot modify server-side code in the live service on Adobe Media Server Standard.
Remove the rootinstall/applications/live/main.far file and replace it with the rootinstall/samples/applications/live/main.asc file.
Move any live services folders out of the applications folder.