Hello everyone! I have such a question. I've been using Microsoft Expression Encoder for broadcasting video from videofile. I do not understand how the output link is formed?
PullBroadcastPublishFormat format = new PullBroadcastPublishFormat ();
It turns out that he takes the address of the machine where I start the broadcast? Can I change this address?
And next question, I have the link:
http: // localhost: 8080
I try use VLC player and this link does not work.
Apparently it is necessary to form something like -
http: //192.х.х.х/video.cgi"
The second link captures the video in the VLC player.
If I use MediaElement in WPF http: // localhost: 8080 works great.
<MediaElement Name="VideoControl" LoadedBehavior="Play" Source="http://localhost:8080" MediaEnded="Media_Ended"/>
What I have tried:
_job = new LiveJob();
try
{
_fileSource = _job.AddFileSource(@"PATH");
_job.ActivateSource(_fileSource);
_job.ApplyPreset(LivePresets.VC1HighSpeedBroadband4x3);
PullBroadcastPublishFormat format = new PullBroadcastPublishFormat();
format.BroadcastPort = Int32.Parse(broadcastPort);
format.MaximumNumberOfConnections = 2;
_job.PublishFormats.Add(format);
_job.StartEncoding();
foreach (var clients in _job.ConnectedClients)
{
Debug.WriteLine($"Clients quantity: {clients}");
}
}
catch (Exception e)
{
Debug.WriteLine($"Error: {e.Message}");
}