Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, October 27, 2017 4:35:15 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

The LEADTOOLS Media Server can act as both a file server and a live server. The location of the files is configurable with the "LeadtoolsMediaStreamingServer.xml" and then set using ImportConfigFile() or ImportConfigString() if you do not want to use an XML file.

Configuring live sources can be done using a user interface, but some applications may need to set up new streams dynamically. Perhaps as new source streams available, these need to be configured to be restreamed. A simple walkthrough exists to demonstrate the process in which the LEADTOOLS Media Server can be set up for both file streaming and live streaming. This topic exists here:
Creating a Media Server Using the ltmsServer Object

For those who may need to add streams programmatically, here is some sample code to illustrate how this can be done:
Code:
LiveStreamDevConfig _devconfig;
LiveStreams streams = mediaServer.GetLiveStreams();
LiveStream ls = streams.CreateLiveStream();
_devconfig = ls.DeviceConfig;
_devconfig.LockDevices();

// Configure common settings
ls.Enable = true;
ls.Path = "live/stream1";
ls.ActivateOnDemand = false;
ls.QSVDecoding = true;
ls.CUDADecoding = true;
ls.UseVideoInputSize = true;
ls.UseVideoInputFrameRate = true;
ls.VideoBitRate = 700000;
ls.QSVAcceleration = true;
ls.CUDAAcceleration = true;
ls.MinimumFragmentDuration = 2;

//Add the UDP source filter
ls.VideoDevices["LEAD TCP/UDP/RTP Source"].Selected = true;
ls.VideoDeviceURL = @"udp://127.0.0.1:9005";
streams.AddLiveStream(ls);

mediaServer.SetLiveStreams(streams);

_devconfig.UnlockDevices();

Edited by moderator Wednesday, December 27, 2023 4:41:39 PM(UTC)  | Reason: Updated

Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.046 seconds.