Creating a Media Server Using the ltmsServer Object

Perform the following steps to create a media server using the Media Streaming Server object:  

  1. Set up a folder containing the source media files.

  2. Make sure you have applied your license to the library. See Setting a Runtime License for details.

  3. Create an instance of the Server Object. All properties are set to default values.

  4. (Optional) Set up logging by providing your implementation of an ILogHandler interface.

  5. (Optional) Set up the server configuration by calling ImportConfigFile ImportConfigString, or setting the Server properties individually.

  6. Call Start to run the server.

  7. (Optional) Add Live Server sources. A new live source can be added by using the following steps for each:

    • Get the list of current live sources in the server by calling GetLiveStream
    • Create a new live stream through CreateLiveStream
    • Get the device configuration for the newly created stream by calling DeviceConfig
    • Lock the available devices to prevent modifications while setting up the new stream by calling LockDevices
    • Set the server URL to access the stream via Path
    • Get the list of audio or video devices through AudioDevices and VideoDevices respectively and set the preferred input.
    • (Optional) Set additional properties such as the audio type, video size, video frame rate, or whether to use hardware compression. For more information, see LiveStream class.
    • Add the new configuration to the existing list of streams through AddLiveStream
    • Update the server configuration with the list of live streams by calling SetLiveStreams
    • Release the available devices by calling UnlockDevices
  8. Stream video from the server using browsers or media players.

  9. Call Stop when finished.

Help Version 21.0.2021.6.30
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.