Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menunjukkan cara membuat project Google Cloud , mengaktifkan Transcoder API, membuat kredensial autentikasi, dan memberikan satu atau beberapa peran IAM ke akun Anda. Halaman ini juga menunjukkan cara menyiapkan bucket Cloud Storage untuk menyimpan file output tugas transkoder.
Membuat project
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.
USER_IDENTIFIER: the identifier for your user
account—for example, myemail@example.com.
ROLE: the IAM role that you grant to your user account.
Membuat bucket Cloud Storage
Untuk menyimpan file output tugas transkoder, buat bucket Cloud Storage di lokasi yang sama dengan tugas Transcoder API Anda. Untuk mengetahui informasi selengkapnya, lihat bagian
Aset media di halaman Lokasi.
Create a Cloud Storage bucket and configure it as follows:
Set the storage class to
S (Standar).
Tetapkan lokasi penyimpanan sebagai berikut:
US (Amerika Serikat).
Ganti BUCKET_NAME dengan
nama bucket yang unik. Jangan sertakan informasi sensitif pada
nama bucket karena namespace bucket bersifat global dan dapat dilihat publik.
gcloudstoragebucketscreategs://BUCKET_NAME--default-storage-class STANDARD --locationUS
Klik Buat Folder dan masukkan nama untuk membuat folder tempat
menyimpan output video yang dienkode.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-11 UTC."],[],[],null,["# Before you begin\n\nThis page shows how to create a Google Cloud project, enable the\nTranscoder API, create\n[authentication credentials](/transcoder/docs/authentication), and grant\nyour account one or more\n[IAM roles](/transcoder/docs/access-control#roles). This page also shows how\nto set up a Cloud Storage bucket to save the transcoder job output files.\n\nCreate a project\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n-\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n- If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n- [Create or select a Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n - Create a Google Cloud project:\n\n ```\n gcloud projects create PROJECT_ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with a name for the Google Cloud project you are creating.\n - Select the Google Cloud project that you created:\n\n ```\n gcloud config set project PROJECT_ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your Google Cloud project name.\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Transcoder API:\n\n\n ```bash\n gcloud services enable transcoder.googleapis.com\n ```\n-\n\n Create local authentication credentials for your user account:\n\n ```bash\n gcloud auth application-default login\n ```\n\n\n If an authentication error is returned, and you are using an external identity provider\n (IdP), confirm that you have\n [signed in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n-\n Grant roles to your user account. Run the following command once for each of the following\n IAM roles:\n `roles/transcoder.admin`\n\n ```bash\n gcloud projects add-iam-policy-binding PROJECT_ID --member=\"user:\u003cvar translate=\"no\"\u003eUSER_IDENTIFIER\u003c/var\u003e\" --role=ROLE\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n - \u003cvar translate=\"no\"\u003eUSER_IDENTIFIER\u003c/var\u003e: the identifier for your user account---for example, `myemail@example.com`.\n - \u003cvar translate=\"no\"\u003eROLE\u003c/var\u003e: the IAM role that you grant to your user account.\n\n-\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n- If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n- [Create or select a Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n - Create a Google Cloud project:\n\n ```\n gcloud projects create PROJECT_ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with a name for the Google Cloud project you are creating.\n - Select the Google Cloud project that you created:\n\n ```\n gcloud config set project PROJECT_ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your Google Cloud project name.\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Transcoder API:\n\n\n ```bash\n gcloud services enable transcoder.googleapis.com\n ```\n-\n\n Create local authentication credentials for your user account:\n\n ```bash\n gcloud auth application-default login\n ```\n\n\n If an authentication error is returned, and you are using an external identity provider\n (IdP), confirm that you have\n [signed in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n-\n Grant roles to your user account. Run the following command once for each of the following\n IAM roles:\n `roles/transcoder.admin`\n\n ```bash\n gcloud projects add-iam-policy-binding PROJECT_ID --member=\"user:\u003cvar translate=\"no\"\u003eUSER_IDENTIFIER\u003c/var\u003e\" --role=ROLE\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n - \u003cvar translate=\"no\"\u003eUSER_IDENTIFIER\u003c/var\u003e: the identifier for your user account---for example, `myemail@example.com`.\n - \u003cvar translate=\"no\"\u003eROLE\u003c/var\u003e: the IAM role that you grant to your user account.\n\n\u003cbr /\u003e\n\n| **Note:** Add the IAM role `roles/storage.admin` to your Google account for more control over your project's Cloud Storage buckets.\n\nCreate a Cloud Storage bucket\n-----------------------------\n\nTo save the transcoder job output files, create a Cloud Storage bucket in\nthe same location as your Transcoder API jobs. For more information, see the\n[Media assets](/transcoder/docs/locations#media-assets) section of the Locations\npage.\n\n1. Create a Cloud Storage bucket and configure it as follows:\n - Set the storage class to `S` (Standard).\n - Set the storage location to the following: `US` (United States).\n - Replace \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e with a unique bucket name. Don't include sensitive information in the bucket name because the bucket namespace is global and publicly visible.\n\n ```bash\n gcloud storage buckets create gs://BUCKET_NAME --default-storage-class STANDARD --location US\n ```\n2. Click **Create Folder** and enter a name to create a folder in which to save the encoded video outputs.\n\nMore information\n----------------\n\nReceive [Pub/Sub notifications for job updates](/transcoder/docs/how-to/create-pub-sub)\nfrom the Transcoder API."]]