如何缩放媒体保留单位How to scale media reserved units

媒体服务徽标 v3media services logo v3


本文介绍如何缩放媒体保留单位 (MRS) 以加快编码速度。This article shows you how to scale Media Reserved Units (MRSs) for faster encoding.

必备条件Prerequisites

创建媒体服务帐户Create a Media Services account.

CLICLI

可以在本地安装 CLI。You can install the CLI locally. 有关适用于你的平台的说明,请参阅安装 Azure CLISee Install the Azure CLI for instructions for your platform.

登录Sign in

使用本地安装的 CLI 需要登录到 Azure。Using a local install of the CLI requires signing in to Azure. 使用 az login 命令登录。Sign in with the az login command.

如果 CLI 可以打开默认的浏览器,则它会打开该浏览器并加载登录页。If the CLI can open your default browser, it will do so and load a sign-in page. 否则,你需要打开一个浏览器页面,在浏览器中导航到 https://microsoft.com/deviceloginchina 后,按照有关命令行的说明输入授权代码。Otherwise, you need to open a browser page and follow the instructions on the command line to enter an authorization code after navigating to https://microsoft.com/deviceloginchina in your browser.

指定文件位置Specify location of files

许多媒体服务 CLI 命令允许你通过文件名来传递参数。Many Media Services CLI commands allow you to pass a parameter with a file name.

需要根据所用的 OS 或 Shell(Bash 或 PowerShell)指定文件路径。You need to specify the file path according to the OS or Shell (Bash or PowerShell) that you are using. 下面是一些示例:Below are some examples:

文件(所有 OS)的相对路径Relative path to the file (all OS)

  • @"mytestfile.json"
  • @"../mytestfile.json"

Linux/Mac 和 Windows OS 上的绝对文件路径Absolute file path on Linux/Mac and Windows OS

  • @ "/usr/home/mytestfile.json"
  • @"c:\tmp\user\mytestfile.json"

如果命令要求提供文件路径,请使用 {file}Use {file} if the command is asking for a path to the file. 例如,az ams transform create -a amsaccount -g resourceGroup -n custom --preset .\customPreset.jsonFor example, az ams transform create -a amsaccount -g resourceGroup -n custom --preset .\customPreset.json.
如果命令将加载指定的文件,请使用 @{file}Use @{file} if the command is going to load the specified file. 例如,az ams account-filter create -a amsaccount -g resourceGroup -n filterName --tracks @tracks.jsonFor example, az ams account-filter create -a amsaccount -g resourceGroup -n filterName --tracks @tracks.json.

使用 CLI 缩放媒体预留单位Scale Media Reserved Units with CLI

运行 mru 命令。Run the mru command.

以下 az ams account mru 命令使用 counttype 参数在“amsaccount”帐户上设置媒体预留单位。The following az ams account mru command sets Media Reserved Units on the "amsaccount" account using the count and type parameters.

az ams account mru set -n amsaccount -g amsResourceGroup --count 10 --type S3

计费Billing

根据在帐户中预配的媒体预留单位的分钟数计费。You are charged based on number of minutes the Media Reserved Units are provisioned in your account. 这与帐户中是否有作业运行无关。This occurs independent of whether there are any Jobs running in your account. 有关详细说明,请参阅媒体服务定价页的“常见问题”部分。For a detailed explanation, see the FAQ section of the Media Services pricing page.

另请参阅See also