Mux logo - video home
Docs
  • Introduction to Data
  • Track your video engagement and performance
  • Make API requests
  • Set up alerts
  • Make your data actionable with metadata
  • Track autoplaying videos
  • Extend Data with custom metadata
  • Track CDN for request metrics
  • See how many people are watching
  • Build a custom integration
  • Understand metric definitions
  • Export raw video view data
    • Amazon Kinesis Data Streams
    • Google Cloud Pub/Sub
  • Ensure privacy compliance
  • Mux Data FAQs
Mux.comLog in
Mux logo - video home
Docs
GuidesAPI ReferenceChangelog

Export video views to a Google Cloud Pub/Sub topic

Learn how to send video view data from Mux to Google Cloud Pub/Sub.

In this guide:

1

Add a new streaming export

1

Add a new streaming export

Add a new streaming export from your Mux dashboard.

2

Set up a topic in Google Cloud Pub/Sub

2

Set up a topic in Google Cloud Pub/Sub

Create a Pub/Sub topic in your Google Cloud account and give Mux permissions to publish to it.

3

Finish setup in Mux

3

Finish setup in Mux

Enable your export in Mux.

Process video view messages

Process video view messages

Streaming Exports are only available on Mux Data Media plans.

In order to publish Mux Data video views to a Pub/Sub topic, you'll need to set up a topic in your Google Cloud account. Mux will write data to the topic as it becomes available. Currently, streaming exports to Google Pub/Sub are available at no charge for customers on a Media plan, but this may change in the future.

1Add a new streaming export

To add a new streaming export, go to Settings > Streaming Exports in your Mux dashboard. From that tab, click New streaming export to open the configuration modal.

Select the environment you want to send views from, and select Google Cloud Pub/Sub as the service.

2Set up a topic in Google Cloud Pub/Sub

You'll need to complete the following setup in your Google Cloud account before you can create a new streaming export in Mux:

  1. (Optional) If you want to use a schema with your Pub/Sub topic, you can create one using our Protobuf spec for video views, which is available in the mux-protobuf repository.
  2. Create a Pub/Sub topic. If you're creating a topic with a schema, set the message encoding to Binary.
  3. Add the Mux service account to the topic as a Principal with the Pub/Sub Publisher role. The Mux service account is shown in the configuration modal.

3Finish setup in Mux

In the configuration modal, provide the Pub/Sub topic name. This should be the full topic name, including the project ID, and match the format projects/{project-id}/topics/{topic-id}.

Click Enable export, and your streaming export will be activated immediately. We will start streaming views as soon as they're completed.

Process video view messages

With your export set up, you can begin consuming incoming messages. For more information on the message format and processing video views, see the main Export raw video view data guide.

Was this page helpful?