Skip to content

A sample application for Google Cloud Functions to use Dolby.io's Media APIs to automatically transcode any new files uploaded to a Cloud Storage Bucket.

License

Notifications You must be signed in to change notification settings

dolbyio-samples/media-sample-python-gcp-media-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Blog Picture

Google Cloud Storage Auto Transcode with Dolby.io

This repository will follow this blog to automate media workflows using Google Cloud Functions.

Overview

A sample application for Google Cloud Functions to use Dolby.io's Media APIs to automatically transcode any new files uploaded to a Cloud Storage Bucket.

Requirements

To begin, there should be a familiarity with web development and JavaScript. An active Dolby.io account to access the Dolby.io Media Processing APIs as well as a Google Cloud Platform (GCP) account and project with the appropriate permissions.

Getting Started

You will need to use your own Google Cloud project as the basis of this automation.

Ensure that in configuring the automation, the Trigger type is set to Cloud Storage and Event type is set to Finalize/Create.

You will also want to ensure your requirements.txt contains the required packages.

This application was made using the Python 3.9 runtime. All other versions have not been tested for compatibility.

File Structure

The code used for the Google Cloud Function lives in the cloud-function folder.

  • main.py: The main file used to call the Dolby.io API
  • signedUrls.py: A helper file containing code to create Presigned URLs to read and write the files from
  • requirements.txt: The list of Python packages Cloud Functions needs to install for the run to be successful.

Additional Notes

Upon execution, the function will log a job id that will contain the status. To see the job's status, use the get status endpoint.

Logic to ensure no post-processed files are ran through the pipeline is necessary to prevent infinite loops. Depending on your workflow, modify the logic to exit on a processed file, whether that be by file extension, name or other methods.

Report a Bug

In the case any bugs occur, report it using Github issues, and we will see to it.

Forking

We welcome your interest in trying to experiment with our repos.

Feedback

If there are any suggestions or if you would like to deliver any positive notes, feel free to open an issue and let us know!

Learn More

For a deeper dive, we welcome you to review the following:

About Dolby.io

Using decades of Dolby's research in sight and sound technology, Dolby.io provides APIs to integrate real-time streaming, voice & video communications, and file-based media processing into your applications. Sign up for a free account to get started building the next generation of immersive, interactive, and social apps.

           
      Dolby.io on YouTube       Dolby.io on Twitter       Dolby.io on LinkedIn

About

A sample application for Google Cloud Functions to use Dolby.io's Media APIs to automatically transcode any new files uploaded to a Cloud Storage Bucket.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages