Using the live service



About the live service

The live service is a publishing point on Flash Media Server. The following live video sources can publish to the live service:

  • Flash Media Live Encoder, version 2.0 or later

    Note: Only Flash Media Interactive Server and Flash Media Development Server support Flash Media Live Encoder Authentication Add-in.
  • Server-side scripts running on Flash Media Interactive Server and Flash Media Development Server (see Publishing from server to server)

  • A custom-built Flash Player or AIR application

You can use any of the following clients to play video streamed from the live service:

  • Flash Media Server sample video player (RootInstall/samples/videoPlayer)

  • Flash FLVPlayback component (fl.video.FLVPlayback)

  • Flex VideoDisplay component (mx.controls.VideoDisplay)

  • Any custom-built application that runs in Flash Player, AIR, or Flash Lite 3

On Flash Media Streaming Server, the live service cannot record streams. Also, the live service does not support DVR features. Flash Media Interactive Server and Flash Media Development Server support unsigned (user-created) applications. If you're using one of these server editions, you can modify the live service source code to create your own applications that include DVR functionality. You can also modify the live service to allow live stream recording.

Test the live service

Use Flash Media Live Encoder to test the live service

  1. Connect a camera to the computer.

  2. Open Flash Media Live Encoder and click Start.

    By default, Flash Media Live Encoder publishes a stream named livestream to rtmp://localhost/live. Use these settings to connect to the live service if Flash Media Live Encoder is installed on the same computer as the server. If Flash Media Live Encoder is installed on a different computer, replace localhost with the Flash Media Server IP address.

  3. Double-click the RootInstall/samples/videoPlayer/videoplayer.html file to open the sample video player in a browser.

  4. In the sample video player, do one of the following:

    • In the list videos, click “livestream”.

    • Enter rtmp://localhost/live/livestream, check the LIVE checkbox, and click PLAY STREAM.

Use a custom Flash Player application to test the live service

  1. Connect a camera to the computer.

  2. Do one of the following:

    • Choose Start > All Programs > Adobe > Flash Media Server 3.5 > Flash Media Server Start Screen. Click Interactive to open the live video sample.

    • If you installed Apache web server with Flash Media Server, browse to http://localhost/ and click Interactive to open the live video sample.

    • Click Publish.

Duplicate the live service

  1. Duplicate the RootInstall/applications/live folder in the applications folder and give it a new name, for example, live2. In this case, the new live service is located here: RootInstall/applications/live2.

    You can create as many instances of the live service as you need.

  2. Clients can connect to the publishing point at the URL rtmp://flashmediaserver/live2.

Modify the live service

Note: You cannot modify the live service on Flash Media Streaming Server
  1. Create a folder in the RootInstall/applications folder or use the default RootInstall/live folder.

  2. Do one of the following:

    • If you’re using the default applications/live folder, move the main.far file to a safe location. Copy the RootInstall/samples/applications/live main.asc file to the applications/live folder.

    • If you created a folder in step 1, copy the main.asc, Application.xml, allowedHTMLdomains.txt, and allowedSWFdomains.txt files from the RootInstall/samples/applications/live folder to the new folder.

  3. Open the RootInstall/conf/fms.ini file in a text editor and edit the LIVE_DIR parameter to point to the folder you created in step 1.

    To make recordings of live streams available over HTTP or RTMP, set the LIVE_DIR parameter to RootInstall\webroot\live_recorded. Recordings in this folder are available from the following addresses:

    File format

    Address

    F4V

    http://serverName/live_recorded/fileName.f4v

    rtmp://serverName/live/live_recorded/mp4:fileName

    rtmp://serverName/live/live_recorded/mp4:fileName.f4v

    FLV

    http://serverName/live_recorded/fileName.flv

    rtmp://serverName/live/live_recorded/fileName

    rtmp://serverName/live/live_recorded/fileName.flv

    The Application.xml file in the folder you created in step 1 uses the LIVE_DIR parameter in a <Streams> tag. The <Streams> tag specifies a virtual directory mapping for streams.

  4. Restart the server.

Disable live services

 Move any live services folders out of the applications folder.