简体   繁体   English

如何在Azure媒体服务上流式传输上传的视频

[英]How do I stream an uploaded video on Azure Media Services

I uploaded a video to Azure Media Services, and clicked the "publish" button. 我将视频上传到Azure媒体服务,然后单击“发布”按钮。 That gave me a publish URL. 那给了我一个发布URL。

I then used the Azure Media Player ( http://amp.azure.net/libs/amp/latest/docs/samples.html ) to embed my video content on a page. 然后,我使用Azure Media Player( http://amp.azure.net/libs/amp/latest/docs/samples.html )将我的视频内容嵌入到页面上。

The problem I'm having is that the video is choppy to start. 我遇到的问题是视频开始播放时断断续续。 Perhaps it's the encoding of the video, but I want to make sure, if I want to stream a video, using the media player or anything else, do I just use the "Publish URL"? 也许是视频的编码,但是我想确保,如果我想使用媒体播放器或其他方法流式传输视频,是否只使用“发布URL”? OR is there a different way of requesting video content to "smooth stream"? 还是有其他方法可以请求视频内容“流畅播放”?

I have a series of tutorials on how to do this. 我有一系列有关如何执行此操作的教程。 Start here, Using blob storage with Media Services 从此处开始,在媒体服务中使用Blob存储

Like you mention above, it will give you two different assets: 就像您上面提到的,它将为您提供两种不同的资产:

  1. The blob storage asset Blob存储资产
  2. The Media Services asset 媒体服务资产

I prefer to start uploading my content to blob storage first, so that I can place them into folders and keep them organized . 我更喜欢先开始将内容上传到Blob存储,这样我就可以将它们放到文件夹中并使其井井有条 Then, I hop into Media Services, and have the services point to the file in blob storage. 然后,我跳入媒体服务,并使服务指向Blob存储中的文件。 Much easier to keep things tidy. 使事情保持整齐容易得多。

Moreover, you can now stream either the file in blob as a .mp4, or use media services to encode it to a variety of formats, such as adaptive bitrate, which will return a manifest file. 此外,您现在可以将blob中的文件作为.mp4流式传输,也可以使用媒体服务将其编码为多种格式,例如自适应比特率,这将返回清单文件。

Finally, be sure to start your streaming channel from within the media services portal and keep that on! 最后,请确保从媒体服务门户内部启动流媒体频道,然后继续进行下去! You do not need it for a simple .MP4, but for adaptive bitrate you will need it. 对于简单的.MP4,您不需要它,但是对于自适应比特率,您将需要它。

Yes. 是。 You use the publish URL for VOD and you have a few url parameters to change the type of streaming if needed. 您使用VOD的发布URL,并且有一些url参数可以根据需要更改流式传输的类型。 Default is smooth streaming. 默认设置为流畅流。

Smooth Streaming 流畅串流

{streaming endpoint name-media services account name}.streaming.mediaservices.windows.net/{locator ID}/{filename}.ism/Manifest {streaming端点名称-媒体服务帐户名} .streaming.mediaservices.windows.net / {locator ID} / {filename} .ism / Manifest

HLS Streaming HLS流

{streaming endpoint name-media services account name}.streaming.mediaservices.windows.net/{locator ID}/{filename}.ism/Manifest(format=m3u8-aapl) {streaming端点名称-媒体服务帐户名} .streaming.mediaservices.windows.net / {locator ID} / {filename} .ism / Manifest(格式= m3u8-aapl)

MPEG Dash Streaming MPEG Dash流

{streaming endpoint name-media services account name}.streaming.mediaservices.windows.net/{locator ID}/{filename}.ism/Manifest(format=mpd-time-csf) {streaming端点名称-媒体服务帐户名} .streaming.mediaservices.windows.net / {locator ID} / {filename} .ism / Manifest(格式= mpd-time-csf)

See what works best for you 看看最适合您的

You can also test on this page and try the advanced settings 您也可以在此页面上进行测试并尝试高级设置

http://amsplayer.azurewebsites.net/azuremediaplayer.html http://amsplayer.azurewebsites.net/azuremediaplayer.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM