Skip to Content
Mux Docs: Home
Welcome to the new Mux Docs.
The old version is still available here

Export video views to a Google Cloud Pub/Sub topic

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

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?