# aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws architecture

> Architecture diagram of the GitHub repository aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws
- Repository: https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws

## Overview

The product is an AWS-backed live multilingual subtitling system. A live video source enters MediaConnect/MediaLive and MediaPackage for encoding and HLS delivery; a separate UDP audio receiver transcribes and translates speech, stores subtitle segments, and serves them as WebVTT for the player. The README also documents authentication, reset/control, and adaptive playback capabilities. Links between runtime audio ingestion and its deployment, and some frontend API behavior, are not fully visible in sampled source; those uncertain integrations are omitted rather than treated as confirmed calls.

Main entry points: [`lib/udp-audio-receiver-stack.js`](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js) (Subtitle table), [`lib/front-end/video-player/app.js`](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/front-end/video-player/app.js) (Video player), [`lib/lambdas/webvtt-delivery/index.js`](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/webvtt-delivery/index.js) (WebVTT delivery API), [`lib/base-live-streaming-stack.js`](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js) (WebVTT CDN)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_stream["Live video delivery"]
  node_media_input["Live input<br/>[medialive-stack.js]"]
  node_medialive["MediaLive encoding<br/>[medialive-stack.js]"]
  node_mediapackage["MediaPackage HLS"]
  node_hls_cdn["HLS CDN"]
end

subgraph group_subtitle["Subtitle processing"]
  node_audio_receiver["UDP audio receiver"]
  node_transcription["Transcription and translation"]
  node_subtitle_store[("Subtitle table")]
  node_webvtt_api["WebVTT delivery API<br/>[index.js]"]
  node_webvtt_edge["WebVTT augmentation<br/>[index.mjs]"]
  node_webvtt_cdn["WebVTT CDN"]
end

subgraph group_experience["Viewer experience"]
  node_player_host["Player hosting"]
  node_player_app["Video player<br/>[app.js]"]
  node_authentication["Cognito authentication<br/>[cognito-stack.js]"]
end

subgraph group_control["System control"]
  node_reset_lambda["Reset and cleanup<br/>[index.js]"]
  node_receiver_stack["Receiver infrastructure"]
  node_deploy_stack["Player deployment<br/>[deploy-stack.js]"]
end

node_operator(("Stream operator"))
node_viewer(("Viewer"))

node_operator -->|"sends live feed"| node_media_input
node_media_input -->|"ingested by"| node_medialive
node_medialive -->|"packages stream"| node_mediapackage
node_mediapackage -->|"origin delivery"| node_hls_cdn
node_audio_receiver -.->|"feeds audio"| node_transcription
node_transcription -.->|"stores segments"| node_subtitle_store
node_webvtt_api -->|"queries captions"| node_subtitle_store
node_webvtt_api -->|"fetches VTT timing"| node_mediapackage
node_webvtt_cdn -->|"routes VTT requests"| node_webvtt_api
node_webvtt_cdn -->|"invokes at origin"| node_webvtt_edge
node_viewer -->|"opens player"| node_player_host
node_player_app -->|"plays HLS"| node_hls_cdn
node_player_app -->|"loads subtitles"| node_webvtt_cdn
node_player_app -->|"redirects to login"| node_authentication
node_player_host -->|"OAuth callback configured"| node_authentication
node_receiver_stack -->|"creates table"| node_subtitle_store
node_deploy_stack -->|"deploys frontend"| node_player_host
node_reset_lambda -->|"deletes items"| node_subtitle_store

click node_media_input "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/medialive-stack.js"
click node_medialive "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/medialive-stack.js"
click node_mediapackage "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js"
click node_hls_cdn "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js"
click node_audio_receiver "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js"
click node_transcription "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/IBC2025_Subtitle_v3.js"
click node_subtitle_store "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js"
click node_webvtt_api "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/webvtt-delivery/index.js"
click node_webvtt_edge "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/webvtt-edge/index.mjs"
click node_webvtt_cdn "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js"
click node_player_host "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/video-player-stack.js"
click node_player_app "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/front-end/video-player/app.js"
click node_authentication "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/cognito-stack.js"
click node_reset_lambda "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/video-reset/index.js"
click node_receiver_stack "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js"
click node_deploy_stack "https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/deploy-stack.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_media_input,node_medialive,node_mediapackage,node_hls_cdn,node_viewer toneBlue
class node_audio_receiver,node_transcription,node_subtitle_store,node_webvtt_api,node_webvtt_edge,node_webvtt_cdn toneAmber
class node_player_host,node_player_app,node_authentication toneMint
class node_reset_lambda,node_receiver_stack,node_deploy_stack toneRose
class node_operator toneIndigo
```

## Components

### Live video delivery

- [Live input](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/medialive-stack.js): `lib/medialive-stack.js`
- [MediaLive encoding](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/medialive-stack.js): `lib/medialive-stack.js`
- [MediaPackage HLS](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js): `lib/base-live-streaming-stack.js`
- [HLS CDN](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js): `lib/base-live-streaming-stack.js`

### Subtitle processing

- [UDP audio receiver](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js): `lib/udp-audio-receiver-stack.js`
- [Transcription and translation](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/IBC2025_Subtitle_v3.js): `lib/IBC2025_Subtitle_v3.js`
- [Subtitle table](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js): `lib/udp-audio-receiver-stack.js`
- [WebVTT delivery API](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/webvtt-delivery/index.js): `lib/lambdas/webvtt-delivery/index.js`
- [WebVTT augmentation](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/webvtt-edge/index.mjs): `lib/lambdas/webvtt-edge/index.mjs`
- [WebVTT CDN](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/base-live-streaming-stack.js): `lib/base-live-streaming-stack.js`

### Viewer experience

- [Player hosting](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/video-player-stack.js): `lib/video-player-stack.js`
- [Video player](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/front-end/video-player/app.js): `lib/front-end/video-player/app.js`
- [Cognito authentication](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/cognito-stack.js): `lib/cognito-stack.js`

### System control

- [Reset and cleanup](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/lambdas/video-reset/index.js): `lib/lambdas/video-reset/index.js`
- [Receiver infrastructure](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/udp-audio-receiver-stack.js): `lib/udp-audio-receiver-stack.js`
- [Player deployment](https://github.com/aws-solutions-library-samples/guidance-for-real-time-multilingual-subtitling-for-live-video-on-aws/blob/main/lib/deploy-stack.js): `lib/deploy-stack.js`

### Other components

- **Stream operator**
- **Viewer**

## Connections

- Stream operator → Live input: sends live feed (evidence: `README.md`)
- Live input → MediaLive encoding: ingested by (evidence: `README.md`)
- MediaLive encoding → MediaPackage HLS: packages stream (evidence: `lib/medialive-stack.js`)
- MediaPackage HLS → HLS CDN: origin delivery (evidence: `lib/base-live-streaming-stack.js`)
- UDP audio receiver → Transcription and translation: feeds audio
- Transcription and translation → Subtitle table: stores segments
- WebVTT delivery API → Subtitle table: queries captions (evidence: `lib/lambdas/webvtt-delivery/index.js`)
- WebVTT delivery API → MediaPackage HLS: fetches VTT timing (evidence: `lib/lambdas/webvtt-delivery/index.js`)
- WebVTT CDN → WebVTT delivery API: routes VTT requests (evidence: `lib/base-live-streaming-stack.js`)
- WebVTT CDN → WebVTT augmentation: invokes at origin (evidence: `lib/base-live-streaming-stack.js`)
- Viewer → Player hosting: opens player (evidence: `README.md`)
- Video player → HLS CDN: plays HLS (evidence: `README.md`)
- Video player → WebVTT CDN: loads subtitles (evidence: `lib/front-end/video-player/app.js`)
- Video player → Cognito authentication: redirects to login (evidence: `lib/front-end/video-player/app.js`)
- Player hosting → Cognito authentication: OAuth callback configured (evidence: `lib/cognito-stack.js`)
- Receiver infrastructure → Subtitle table: creates table (evidence: `lib/udp-audio-receiver-stack.js`)
- Player deployment → Player hosting: deploys frontend (evidence: `lib/deploy-stack.js`)
- Reset and cleanup → Subtitle table: deletes items (evidence: `lib/lambdas/video-reset/index.js`)
