Deploying Your Media Server

This topic provides information on which DLLs and files to copy to get the Media Server working on another computer. Typically, you perform testing on a development computer and then when you are ready to deploy your server, you move the server files to a live server.

A simple way to install the server on another computer is to run the setup on the target computer and then copy the files you have modified. But seeing which files need to be copied is also useful to understand how the server files and DLLs work together.

In the steps below, we will use the following special strings:

Here is a list of the steps you need to take:

  1. First, make sure you have administrator rights on the target computer because you will need to register DLLs at some point.
  2. Copy the folder containing the server files:
    a. Copy all the files and subfolder from <INSTDIR>\Examples\Multimedia\Ltms\Server to <TARGETDIR>. The simplest way to do this is to copy the whole folder <INSTDIR>\Examples\Multimedia\Ltms\Server to the target computer and then rename "Server" to whatever name you want. For example, let's say you rename it as "MediaServer".
  3. Copy the server EXEs to the target computer. Copy the following files from the <INSTDIR>\Bin\CDLL\Win32 to <TARGETDIR> (from <INSTDIR>\Bin\CDLL\x64 if you are using the 64-bit server):     
    a. ltmsServerSvc_Original.exe  (windows service server EXE)
    b. ltmsLogViewer_Original.exe (log viewer EXE)
    c. ltmsServerMgr_Original.exe (windows service manager)
    d. ltmsServer_Original.exe (standalone server EXE)
  4. Copy the license files from <INSTDIR>\Common\License to <TARGETDIR> (the same place you copied the exes):
  5. After this step, <TARGETDIR> should contain the .LIC file, several .EXEs and 3 subfolders: "config", "Logs" and "media". (To reduce confusion, disable the "Hide extensions for known file types" option in Windows Explorer).
  6. Copy the following DLLs to <TARGETDIR> and register each of them on the target computer. In order to register them, it may be necessary to run cmd as administrator and register the DLLs from this elevated DOS prmpt one by one. For example, to register ltms19.dll type regsvr32 ltms.dll. Make sure you register DSKernel2.dll before the dlls listed below it (so register DSKernel2.dll before LMISODmx.dll). For a 64-bit server, the DLLs are in CDLL\x64 folders and have an extra 'x' in the filename.
    a. <INSTDIR>\Redist\MS\CDLL\Win32\ltms19.dll
    b. <INSTDIR>\Redist\MM\CDLL\Win32\DSKernel2.dll
    c. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LMISODmx.dll
    d. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LMFLVDmx.dll (see Note 5)
    e. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LMMpgDmxT.dll (see Note 6)
    f. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LTranscoderH264.dll
    g. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LTranscoderAAC.dll
  7. If your server implements live streaming, you should copy and register the DLLs required for live streaming (see Note 8):
    a. <INSTDIR>\Redist\MM\CDLL\Win32\LMVYUVxf.dll
    b. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LEncH2644.dll
    c. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LEncAACKrn.dll (copy only, do not try to register this dll)
    d. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LEncAAC.dll
    e. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LMRTSPSrc.dll (if you are restreaming an RTSP stream)
    f. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LMONVIFSrc.dll (if you are restreaming an ONVIF device)
    g. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LDecH2643.dll (only if you are recompressing an H264 stream)
    h. <INSTDIR>\Redist\MM\CDLL\Win32\RequiresLicensing\LDecAAC.dll (only if you are recompressing an AAC stream)
  8. Edit all the .xml files from <TARGETDIR>\config and make sure MediaFolder is set to %ltmsMediaFolder% and LogFolder is set to %ltmsLogFolder%. %ltmsMediaFolder% and %ltmsLogFolder% are predefined values of the folder strings defined by LEADTOOLS. See the ltmsPathResolver Object for more details on these predefined folder strings. These settings should already be like this, but double-check to be sure. So, look and make sure the lines defining <MediaFolder> and <LogFolder> are as follows:
    a. <MediaFolder>%ltmsMediaFolder%</MediaFolder>
    b. <LogFolder>%ltmsLogFolder%</LogFolder>
  9. Register the Windows Service Server by running ltmsServerSvc_Original.exe and clicking the Yes button.
  10. Run the Windows Service Manager (ltmsServerMgr_Original.exe) and
    a. Make sure the folders are correct by clicking the View buttons next to Media Folder and Log Folder. If they are not correct, correct them using the "Network..." and "Logging..." buttons.
  11. Run the Standalone Server (ltmsServer_Original.exe) and
    a. Make sure the folders are correct by clicking the View buttons next to Media Folder and Log Folder. (You might want to clear the Log folder by deleting all the Log files, since some of them are from the old computer. Note that if you try to delete all of the log files, one of them might fail to delete because at this point, the Windows Service server is already running and has a log file open).
  12. At this point, the Windows Service is running, so if you wish to manually edit the .XML file (for example if one of the folders is incorrect), you should stop the Windows Service before changing its ltmsServerSvc.xml file. See Note 1 for more details.
  13. Once both the standalone exe and the windows media service have the correct configurations, you can start the server. For example, run the Windows Service Manager and click the Start button if it is enabled. If the Start button is disabled, the service is already running.
  14. Test that the server is running properly:
    a.  The simplest way to do so is to click the "Browser..." button in the Windows Service manager. This will open the default browser. It will also show you the correct URL to enter in other browsers (eg: If the page is loaded properly and the video is playing in the default browser on the target computer, go to another computer/device and enter the same URL in another browser.
  15. If the server is running properly, you can add more compatible .MP4, .TS, .FLV. .Ogg, .webm or .ISM files to <TARGETDIR>\Media\vod or <TARGETDIR>\Media folders. Here are the steps for testing one such file:
    a. Create a compatible file called "new.mp4" using the Convert to Media Server demo. (Initially, create these files on the computer that has LEADTOOLS Multimedia installed).
    b. Copy it to <TARGETDIR>\Media\vod
    c. Go to the Server or Service manager demo
    d. Click the Browse button to open the default browser. This will play the default sample.mp4 file.
    e. In the File edit box in the browser, change sample.mp4 to new.mp4 and click the Open button.


  1. The Windows Service Manager runs the Windows Service automatically whenever you run ltmsServerMgr_Original.exe. The service reads the configuration .XML file when it starts and rewrites the .XML file when it stops running. If you manually change the XML configuration file while the service is running, the changes will be ignored and will be overwritten when the service is eventually stopped. So if you wish to change the Windows service configurations by editing <TARGETDIR>\config\ltmsServerSvc.xml, be sure to stop the services first. (You can stop a service from Task Manager->Services or by launching Services from Control Panel). This problem does not occur if you change the settings using the Windows Service Manager because it automatically stops and restarts the service whenever settings are changed through its user interface.
  2. If you want to avoid entering the port number in URLs (which is somewhat cumbersome in Android or Apple iPhone/iPad devices), you can make the server listen on port 80. But in that case you should make sure no other executable (like IIS) is already listening on TCP port 80. You can run "netstat /a" or "netstat -anob" from a DOS prompt box to see the list of open ports on your computer.
  3. If you can view the stream from the local computer but you do not see anything from another computer, the most likely cause is that the firewall on the computer hosting the server is blocking incoming connections. So check the firewall settings for the TCP port on the server computer and make sure it is accepting connections on the port used by the server.
  4. These steps are only for copying the files needed for the server. They are not enough to enable the Convert To Media Server demo on the new computer. That demo uses many more files and for that. You will need to copy all the codecs, filters and Multimedia DLLs as described in Multimedia Files You Must Include With Your Application (Redistributables).
  5. LMFLVDmx.dll is needed only if you wish to stream FLV files (.FLV) as Flash (RTMP) or RTSP
  6. LMMpgDmxT.dll is needed only if you wish to stream MPEG2 Transport files (.ts) as Flash (RTMP) or RTSP
  7. You can stream .MP4 files using all the streaming formats. You can stream .FLV, .TS, .Ogg, .webm and .ISM files only with certain streaming formats. See Supported Source File Formats and Players for more details.
  8. There might be many DLLs required for live streaming, depending on the type of the source you are using (webcamera, IP camera, ONVIF devices, etc). You might need to copy other decoders not listed here. Please see Multimedia Files You Must Include With Your Application (Redistributables) for more details.
  9. The Windows 10 Anniversary Update includes changes to Microsoft Edge that affect how Flash content is displayed. If you are enabling Flash with the LEADTOOLS Media Server and testing on Microsoft Edge, refer to Windows 10 Update Effects On Edge.
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Media Streaming C API Help
Click or drag to resize