Saving to Google Cloud Platform
Introduction
This tutorial focuses on guiding you through the process of saving files to Google Cloud Storage using its interoperability mode, which allows for S3-compatible interactions.
By the end of this tutorial, you'll be able to set up a destination object for saving files to Google Cloud Storage in interoperability mode, understanding the URL structure, and setting up necessary credentials.
Supported Protocols
Protocol | Description |
---|---|
s3:// | S3 Protocol |
1Enabling Interoperable Access
- Log into your Google Cloud Storage account.
- Choose Settings from the left menu.
- Navigate to the Interoperability tab.
- Enable Interoperable Access, if it's not already enabled.
2Creating a Bucket in Google Cloud Storage
- Log into your account on the Google Cloud Console.
- Choose the ‘Cloud Storage’ section from the available options.
- In the Cloud Storage area, start the process of creating a new bucket.
- Define your bucket’s settings, including its name, location, access permissions, and storage class.
- Complete the setup to create the bucket,
3Finding Your Google Cloud Storage
- Click Create a Key to generate an access/secret key pair.
See Google Cloud Storage documentation for more details.
4Saving Output to GCP
In order to save your outputs to your GCP Storage, define your destination object using the following structure.
Destination Object Structure
"destination": {
"url": "s3://storage.googleapis.com/bucket/path",
"key": "your_access_key",
"secret": "your_secret_key",
"permissions": "permissions"
}
Attributes of GCP Destination Object
Attribute | Description |
---|---|
url | Your GCP Destination URL. Includes the bucket and path. |
key | Your Google Cloud Storage access key. |
secret | Your Google Cloud Storage secret key. |
permissions | Specifies object access permissions. The default value is ‘private’ meaning the object is not publicly accessible with its URL. In case you want your objects to be accessed publicly, specify ‘public-read’ as a value for permissions. |
URL Structure for GCP
The url used for your GSP Storage destination object consists of bucket and path. Check the examples for single file and ABR formats like HLS and DASH below:
s3://storage.googleapis.com/[bucket]/[path]
When saving ABR outputs like HLS or DASH, please specify the path to a folder where the contents of the HLS or DASH stream should be located:
s3://storage.googleapis.com/[bucket]/folder
Components of URL
bucket | The bucket of the destination you want to use. |
path | The complete path of the output, including the filename. |
Destination Object Example
"destination": {
"url": "s3://storage.googleapis.com/my-bucket/folder/output.mp4",
"key": "myAccessKey",
"secret": "mySecretKey",
"permissions": "public-read"
}
When saving ABR outputs like HLS or DASH, please specify the path to a folder where the contents of the HLS or DASH stream should be located:
"destination": {
"url": "s3://storage.googleapis.com/my-bucket/folder",
"key": "myAccessKey",
"secret": "mySecretKey",
"permissions": "public-read"
}
Considerations
- Interoperability Activation: Ensure that interoperability mode is enabled for your account.
- Access and Secret Keys: Securely manage your generated access and secret keys.
- Configuration Issues: Verify that interoperability mode is enabled and that the bucket name and path are correct.
- Authentication Errors: Double-check the accuracy of your access key and secret key.
- Explore advanced features of Google Cloud Storage, such as object lifecycle management and fine-grained access controls.