From Video Analytics to Intelligent Viewer Experiences
Mux is a leading platform for developers building video experiences, providing powerful APIs for vide o streaming and deep analytics on viewer engagement and quality of experience. Understanding metrics like watch time, rebuffering, errors, and which videos are viewed is crucial. But how do you take this rich stream of Mux data and use it to proactively personalize the experience for each individual viewer in real-time?
How do you predict which video a specific user is most likely to watch next based on their unique viewing history captured by Mux? How do you create dynamic "For You" rows or personalized search results within your video platform? This requires transforming Mux's valuable analytical data into predictive AI models, and that's where integrating Mux with Shaped via AWS Kinesis creates a powerful synergy.
Shaped is an AI-native relevance platform designed to ingest real-time event streams, like video view data from Mux, train state-of-the-art machine learning models on this behavior, and serve personalized recommendations and search rankings via simple APIs. This post explains the value of connecting Mux to Shaped and provides a step-by-step guide using the AWS Kinesis integration path.
Why Connect Mux to Shaped? Elevating the Viewer Experience
Sending your Mux video view data directly to Shaped via Kinesis unlocks sophisticated personalization capabilities that go far beyond basic analytics:
- Highly Relevant Video Recommendations: Utilize detailed Mux engagement data to power:
- "What to Watch Next": Predict the most engaging next video based on individual viewing patterns, completion rates, and inferred preferences.
- Personalized "For You" Feeds/Rows: Curate dynamic feeds showcasing videos tailored to each viewer's specific tastes learned from Mux data.
- "Similar Video" Suggestions: Recommend videos based on behavioral similarity (e.g., viewers who watched X also engaged strongly with Y), complementing metadata-based similarity.
- Trending & Popular Content: Surface videos gaining traction based on real-time Mux view signals processed by Shaped.
- Enhanced Video Search: Improve discoverability within your video library:
- Personalized Search Ranking: Rank video search results based on a user's viewing history and predicted engagement, learned from Mux data.
- Engagement-Aware Ranking: Potentially use metrics like average watch time or completion rates (derived from Mux data) as signals in Shaped's ranking models.
- Deeper Viewer & Content Insights: Apply Shaped's ML models to Mux data for advanced analysis:
- Viewer Journey Analysis: Understand sequences of video consumption and predict future viewing behavior.
- Content Embedding Generation: Create vector representations of videos based on viewer engagement patterns for content clustering and analysis.
- Audience Segmentation: Identify viewer cohorts based on their interactions captured in Mux data using Shaped's embedding insights.
- Real-Time Adaptability: Leverage the Kinesis stream to allow Shaped's models to adapt recommendations almost instantly based on viewing activity within the current session.
- Simplified ML Infrastructure: Avoid building complex stream processing pipelines and ML training infrastructure specifically for Mux data; Shaped provides the managed AI layer.
How it Works: Mux -> Kinesis -> Shaped
This integration relies on AWS Kinesis Data Streams as the real-time bridge:
- Shaped Provisions Kinesis: You create a KINESIS type dataset in Shaped, defining a schema suitable for Mux video view events. Shaped automatically provisions a dedicated Kinesis Data Stream for this dataset.
- Shaped Provides Credentials: Shaped gives you the ARN of the Kinesis stream and an IAM Role ARN specifically designed for Mux to use.
- Mux Exports to Kinesis: You configure Mux's Data Export feature to send selected data (specifically "Video Views") to the Kinesis stream provided by Shaped, using the provided IAM Role ARN for secure authentication.
- Shaped Ingests & Learns: Shaped continuously ingests the video view events from the Kinesis stream, trains its AI models, and serves personalized results via its APIs.
Connecting Mux to Shaped via Kinesis

The process involves setting up the endpoint in Shaped first, then configuring the data export in Mux.
Step 1: Create the Shaped Kinesis Dataset
You need a dataset in Shaped ready to receive Mux events with the correct structure.
- Define the Schema (YAML): Create a YAML file defining the dataset. Critically, the column_schema should match the fields you expect from Mux Video View exports. Use the example below as a starting point, adjusting as needed based on the Mux data you intend to use. You also must include your AWS Account ID in tenant_aws_account_id so Mux can assume the role Shaped creates.
- Create the Dataset: Use the Shaped CLI. Provisioning the Kinesis stream takes a few minutes.
- Monitor Status: Wait for the dataset status to become ACTIVE using the Shaped Dashboard or CLI (shaped view-dataset --dataset-name mux_video_views).
Step 2: Retrieve Shaped Kinesis Details
Once the dataset is ACTIVE, Shaped will provide the necessary details for the Mux configuration. You can retrieve these via the CLI, API, or Dashboard:
- Kinesis Stream ARN: The full ARN of the stream Shaped created (e.g., arn:aws:kinesis:us-east-2:11111111111:stream/ShapedDatasetStream-xyz789). You'll need the Stream Name part of this ARN for Mux.
- Kinesis Access Role ARN: The ARN of the IAM Role created by Shaped that Mux needs to assume (e.g., arn:aws:iam::11111111111:role/ShapedDatasetAccessRole-xyz789). You'll need this full ARN for Mux.
Note down the Stream Name and the full Access Role ARN.
Step 3: Configure Mux Data Export
Now, configure Mux to send data to the stream Shaped prepared.
- Log in to your Mux Dashboard.
- Navigate to Settings > Data Export.
- Click to add or configure an export destination. Select Amazon Kinesis Data Streams.
- Enter the following information obtained from Shaped in Step 2:
- AWS Region: Specify the AWS region where Shaped provisioned the Kinesis stream (Shaped will provide this, typically us-east-2 or similar).
- Kinesis Stream Name: Enter the name extracted from the Kinesis Stream ARN (e.g., ShapedDatasetStream-xyz789).
- AWS IAM Role ARN: Enter the full Kinesis Access Role ARN provided by Shaped.
- Select Data Types: Ensure that "Video Views" (or the equivalent data type containing the fields defined in your column_schema) is selected for export. You may choose to export other types, but "Video Views" are typically most relevant for engagement-based personalization.
- Save and Activate: Save the configuration. The export should show as "Active" in Mux.
Refer to the official Mux documentation on Kinesis exports for the most up-to-date UI steps and details within their dashboard.
What Happens Next? Streaming Video Insights to AI Models
With the connection live:
- Mux Sends Events: As viewers watch videos, Mux generates view data and sends it to the configured Kinesis stream using the assumed role.
- Shaped Ingests: Shaped reads the events from the Kinesis stream in near real-time.
- Real-Time Learning: Shaped's AI models process these events, updating understanding of viewer preferences and video engagement almost instantly.
- Personalized API Responses: Shaped's APIs serve recommendations and search rankings reflecting the very latest insights derived from the Mux data stream.
Data Validation & Troubleshooting Tips
- Test Stream: After setup, play a video through your Mux-integrated player to generate test events.
- Check Mux: Ensure the Kinesis export is listed as "Active" in the Mux Data Export settings.
- Check Shaped: Monitor the dataset in the Shaped dashboard. You should see incoming events (there might be a slight delay). Check for any errors reported.
- Verify IAM: Double-check that the correct Role ARN was entered in Mux and that the tenant_aws_account_id in your Shaped dataset config matches the AWS account associated with your Mux setup.
- Contact Support: If issues persist, reach out to Shaped support for assistance.
Conclusion: Intelligent Video Discovery Powered by Mux and Shaped
Your Mux data provides invaluable insights into how viewers engage with your video content. By connecting Mux directly to Shaped via AWS Kinesis, you can transform these analytics into powerful, real-time AI personalization. Deliver hyper-relevant video recommendations, personalize search results, and gain deeper insights into viewer behavior, all powered by a seamless integration that leverages the strengths of both platforms. Elevate your viewer experience from passive watching to intelligent discovery.
Ready to turn your Mux video views into personalized recommendations?
Request a demo of Shaped today to see it in action with your specific use case. Or, start exploring immediately with our free trial sandbox.