Hinweis

Auf dieser Seite erfahren Sie, wie Sie ein Google Cloud -Projekt erstellen, die Transcoder API aktivieren, Anmeldedaten erstellen und Ihrem Konto eine oder mehrere IAM-Rollen zuweisen. Auf dieser Seite wird auch gezeigt, wie Sie einen Cloud Storage-Bucket einrichten, um die Ausgabedateien des Transcoder-Jobs zu speichern.

Projekt erstellen

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. Install the Google Cloud CLI.

  3. Wenn Sie einen externen Identitätsanbieter (IdP) verwenden, müssen Sie sich zuerst mit Ihrer föderierten Identität in der gcloud CLI anmelden.

  4. Führen Sie folgenden Befehl aus, um die gcloud CLI zu initialisieren:

    gcloud init
  5. Create or select a Google Cloud project.

    • Create a Google Cloud project:

      gcloud projects create PROJECT_ID

      Replace PROJECT_ID with a name for the Google Cloud project you are creating.

    • Select the Google Cloud project that you created:

      gcloud config set project PROJECT_ID

      Replace PROJECT_ID with your Google Cloud project name.

  6. Make sure that billing is enabled for your Google Cloud project.

  7. Enable the Transcoder API:

    gcloud services enable transcoder.googleapis.com
  8. Create local authentication credentials for your user account:

    gcloud auth application-default login

    If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.

  9. Grant roles to your user account. Run the following command once for each of the following IAM roles: roles/transcoder.admin

    gcloud projects add-iam-policy-binding PROJECT_ID --member="user:USER_IDENTIFIER" --role=ROLE
    • Replace PROJECT_ID with your project ID.
    • Replace USER_IDENTIFIER with the identifier for your user account. For example, user:myemail@example.com.

    • Replace ROLE with each individual role.
  10. Install the Google Cloud CLI.

  11. Wenn Sie einen externen Identitätsanbieter (IdP) verwenden, müssen Sie sich zuerst mit Ihrer föderierten Identität in der gcloud CLI anmelden.

  12. Führen Sie folgenden Befehl aus, um die gcloud CLI zu initialisieren:

    gcloud init
  13. Create or select a Google Cloud project.

    • Create a Google Cloud project:

      gcloud projects create PROJECT_ID

      Replace PROJECT_ID with a name for the Google Cloud project you are creating.

    • Select the Google Cloud project that you created:

      gcloud config set project PROJECT_ID

      Replace PROJECT_ID with your Google Cloud project name.

  14. Make sure that billing is enabled for your Google Cloud project.

  15. Enable the Transcoder API:

    gcloud services enable transcoder.googleapis.com
  16. Create local authentication credentials for your user account:

    gcloud auth application-default login

    If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.

  17. Grant roles to your user account. Run the following command once for each of the following IAM roles: roles/transcoder.admin

    gcloud projects add-iam-policy-binding PROJECT_ID --member="user:USER_IDENTIFIER" --role=ROLE
    • Replace PROJECT_ID with your project ID.
    • Replace USER_IDENTIFIER with the identifier for your user account. For example, user:myemail@example.com.

    • Replace ROLE with each individual role.
  18. Cloud Storage-Bucket erstellen

    Erstellen Sie zum Speichern der Ausgabedateien des Transcoder-Jobs einen Cloud Storage-Bucket am selben Speicherort wie Ihre Transcoder API-Jobs. Weitere Informationen finden Sie auf der Seite „Standorte“ im Abschnitt Media-Assets.

    1. Create a Cloud Storage bucket and configure it as follows:
      • Set the storage class to S (Standard).
      • Legen Sie als Speicherort Folgendes fest: US (USA).
      • Ersetzen Sie BUCKET_NAME durch einen eindeutigen Bucket-Namen. Der Bucket-Name darf keine vertraulichen Informationen enthalten, da der Bucket-Namespace global und öffentlich sichtbar ist.
      • gcloud storage buckets create gs://BUCKET_NAME --default-storage-class STANDARD --location US
      • Klicken Sie auf Ordner erstellen und geben Sie einen Namen ein, um einen Ordner zu erstellen, in dem Sie die codierten Videoausgaben speichern möchten.

    Weitere Informationen

    Pub/Sub-Benachrichtigungen für Jobaktualisierungen von der Transcoder API erhalten