如何从Microsoft表达式播放流视频以及如何生成广播链接? [英] How can I play stream video from Microsoft expression and how generate broadcast link?

查看:64
本文介绍了如何从Microsoft表达式播放流视频以及如何生成广播链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!我有这样一个问题。我一直在使用Microsoft Expression Encoder来播放来自videofile的视频。我不明白输出链接是如何形成的?



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 ();





事实证明他拿到了我开始播放的机器的地址?我可以更改这个地址吗?

接下来的问题,我有链接:

http:// localhost:8080



我尝试使用VLC播放器,此链接不起作用。



显然有必要形成类似的东西 -

http ://192.х.х.х/video.cgi

第二个链接捕获VLC播放器中的视频。



如果我在WPF中使用MediaElement http:// localhost:8080效果很好。



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}");
			}

推荐答案

客户数量:{clients});
}

}

catch (例外e)
{
Debug.WriteLine(
"Clients quantity: {clients}"); } } catch (Exception e) { Debug.WriteLine(


错误:{e.Message});
}
"Error: {e.Message}"); }


这篇关于如何从Microsoft表达式播放流视频以及如何生成广播链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆