Stream content from endpoint into download file






















OutputMediaAssets can be named using the assetName attribute. Media Services allows you to cancel running jobs through the CancelJob function.

This call returns a error code if you try to cancel a Job when its state is canceled, canceling, error, or finished. To stream or download an asset, you first need to "publish" it by creating a locator. Locators provide access to files contained in the asset.

Once you create the locators, you can build the URLs that are used to stream or download your files. This section shows how to perform the following tasks necessary to "publish" your assets. Before downloading or streaming any media content, first define an AccessPolicy with read permissions and create the appropriate Locator entity that specifies the type of delivery mechanism you want to enable for your clients.

For more information on the properties available, see AccessPolicy Entity Properties. The following example shows how to specify the AccessPolicy for read permissions for a given Asset. If successful, a success code is returned describing the AccessPolicy entity that you created. You then use the AccessPolicy Id along with the Asset Id of the asset that contains the file you want to deliver such as an output asset to create the Locator entity.

This basic workflow is the same as uploading a file when ingesting an Asset as was discussed earlier in this topic. Also, like uploading files, if you or your clients need to access your files immediately, set your StartTime value to five minutes before the current time. This action is necessary because there may be clock skew between the client and Media Services.

The following code shows how to get a URL that can be used to download a media file created and uploaded previously. If you download storage encrypted content, you must manually decrypt it before rendering it, or use the Storage Decryption MediaProcessor in a processing task to output processed files in the clear to an OutputAsset and then download from that Asset. For example, you cannot reuse the same Locator with an updated StartTime value. If you want to access an asset for download after a Locator has expired, then you must create a new one with a new StartTime.

You must add the file name for the file you want to download to the Locator Path value received in the previous section. As a result of the encoding job that you performed earlier encoding into Adaptive MP4 set , you have multiple MP4 files that you can progressively download.

To stream you video, use Azure Media Services Player. Use the User Voice forum to provide feedback and make suggestions on how to improve Azure Media Services. You also can go directly to one of the following categories:. Skip to main content.

This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Let's write the code for that. First create a read stream to read. As an input, we give the location of our bltadwin. Next we used the bltadwin.

The stream will take care of writing this data to the bltadwin. If you open the bltadwin. By using Media Services adaptive bitrate streaming, you can deliver your videos without storing prepackaged versions of each of these streaming formats. When you create your Media Services account, a default streaming endpoint is added to your account in the Stopped state. To start streaming your content, and to take advantage of dynamic packaging and dynamic encryption, the streaming endpoint from which you want to stream content has to be in the Running state.

To stream videos by using Media Services, you upload the source videos, encode them into multiple bitrates, and then publish the result.

The first step is covered in this section. In the Azure portal , select your Azure Media Services account. Then, select the Upload button. On your computer, go to the video that you want to upload.

Select the video, and then select OK. To take advantage of dynamic packaging, you must encode your source file into a set of multi-bitrate MP4 files. The encoding steps are demonstrated in this section. Select the asset that you want to encode. In the Encode an asset pane, select the Media Encoder Standard processor and a preset. For information about presets, see Auto-generate a bitrate ladder and Task presets for Media Encoder Standard.

It's important to choose the preset that will work best for your input video. To help you manage your resources, you can edit the name of the output asset and the name of the job.



0コメント

  • 1000 / 1000