Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?

C#
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.
HTML
<MediaElement Name="VideoControl" LoadedBehavior="Play" Source="http://localhost:8080" MediaEnded="Media_Ended"/>


What I have tried:

C#
_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}");
			}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900