1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Azure Media Services のチュートリアルでストリーミング エンドポイントが開始できなかった

Posted at

結論

CDN を無効化したら解決しました

az ams streaming-endpoint update -n default -a amsaccount -g amsResourceGroup --disable-cdn

stackoverflow の3年前の投稿で解決しました。
初心者に優しくないので、早く修正して欲しい。

Azure media services live streaming endpoint hangs in “starting” status
https://stackoverflow.com/questions/38578026/azure-media-services-live-streaming-endpoint-hangs-in-starting-status

チュートリアルの全体

やってみたチュートリアルはこちら

チュートリアル:リモート ファイルを URL に基づいてエンコードし、ビデオをストリーム配信する - CLI
https://docs.microsoft.com/ja-jp/azure/media-services/latest/stream-files-cli-quickstart

CDN 以外はメディアサービスとストレージのアカウント名を変更するだけで、悩むところはありませんでした。

サブスクリプションを確認する

az account list --output table

リソース グループを作成する

az group create -n amsResourceGroup -l westus2

ストレージ アカウントの作成

az storage account create -n amsstorageaccount --kind StorageV2 --sku Standard_LRS -l westus2 -g amsResourceGroup

Media Services アカウントの作成

az ams account create --n amsaccount -g amsResourceGroup --storage-account amsstorageaccount -l westus2

ストリーミング エンドポイントを開始(問題あり)

az ams streaming-endpoint start  -n default -a amsaccount -g amsResourceGroup

処理が終わらない・・・

az ams streaming-endpoint show -n default -a amsaccount -g amsResourceGroup

ステータスが "starting" から進まない。
15~20分程放置すると異常終了します。

CDN が問題らしくCDN を無効化したら動きました。

az ams streaming-endpoint update -n default -a amsaccount -g amsResourceGroup --disable-cdn

アダプティブ ビットレート エンコードのための変換を作成

az ams transform create --name testEncodingTransform --preset AdaptiveStreaming --description 'a simple Transform for Adaptive Bitrate Encoding' -g amsResourceGroup -a amsaccount

出力アセットを作成

az ams asset create -n testOutputAssetName -a amsaccount -g amsResourceGroup

HTTPS 入力を使用してジョブを開始

az ams job start --name testJob001 --transform-name testEncodingTransform --base-uri 'https://nimbuscdn-nimbuspm.streaming.mediaservices.windows.net/2b533311-b215-4409-80af-529c3e853622/' --files 'Ignite-short.mp4' --output-assets testOutputAssetName= -a amsaccount -g amsResourceGroup

状態の確認

az ams job show -a amsaccount -g amsResourceGroup -t testEncodingTransform -n testJob001

ストリーミング ロケーターを作成し、パスを取得する

az ams streaming-locator create -n testStreamingLocator --asset-name testOutputAssetName --streaming-policy-name Predefined_ClearStreamingOnly  -g amsResourceGroup -a amsaccount

ストリーミング ロケーターのパスを取得する。
HTTP ライブ ストリーミング (HLS) パスをコピーします。

az ams streaming-locator get-paths -a amsaccount -g amsResourceGroup -n testStreamingLocator

ストリーミング エンドポイントのホスト名を取得

チュートリアルのコマンドにある "-n default" パラメータは不要です。

az ams streaming-endpoint list -a amsaccount -g amsResourceGroup

Azure Media Player を使用して再生をテスト

[Setup] の [URL] に"https:// " + + を貼り付けて [Update Player] で再生できました。

補足

CDN プロバイダーを "Verizon" から "Akamai" へ変更しても解決しませんでした。

az ams streaming-endpoint update -n default -a amsaccount -g amsResourceGroup --cdn-provider StandardAkamai
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?