π¦ Packagers
Packagers transform transcoded video into streaming formats for delivery to end-users.
Table of contents
- Overview
- Packaging Formats Comparison
- AES Packager
- DASH Packager
- HLS Packager
- Common Operations
- Media Directory Structure
- Segment Management
- Audio Track Configuration
- DRM Best Practices
- Performance Optimization
- Monitoring and Alerts
- Troubleshooting
- Best Practices Summary
- Related Documentation
Overview
Packagers are essential components that convert transcoded video renditions into streaming formats suitable for different devices and platforms. The Encora Stream platform supports three main packaging formats:
- AES Packager: For AES-128 encrypted streaming
- DASH Packager: For MPEG-DASH streaming with optional DRM
- HLS Packager: For HLS (HTTP Live Streaming) with optional DRM
Each packager type generates specific manifest files and media segments optimized for its target protocol and devices.
Packaging Formats Comparison
| Feature | AES | DASH | HLS |
|---|---|---|---|
| Primary Use | Set-top boxes, older devices | Web browsers (Chrome, Edge) | Apple devices (iOS, Safari) |
| Encryption | AES-128 | CENC with DRM | FairPlay DRM |
| File Extension | .m3u8 | .mpd | .m3u8 |
| Segment Format | .ts | .mp4 | .ts |
| DRM Support | Basic encryption | Widevine, PlayReady | FairPlay |
| Browser Support | Limited | Chrome, Edge, Firefox | Safari only |
AES Packager
Overview
AES Packager creates encrypted HLS streams using AES-128 encryption. This format is widely compatible with set-top boxes and media players that support HLS with basic encryption.
Key Features
- AES-128 encryption for content protection
- HLS-compatible .m3u8 playlists
- .ts (Transport Stream) segments
- Compatible with VLC and most set-top boxes
- No DRM server required
Adding an AES Packager
Steps:
- Navigate to AES Packagers from the left sidebar
- Click Add AES Packager button
- Select Input Stream: Choose the source stream
- Select Transcoder: Choose associated transcoder
- Select Server: Choose packaging server
- Select Server Interface: Choose network interface
- Configure Media Directory: Set output path (e.g.,
/opt/es/media/packager) - Configure Segment Duration: Set segment length (typically 4-10 seconds)
- Configure Target Duration: Set playlist target duration
- Configure Buffer Time: Set playback buffer (e.g., 12 seconds)
- Select Audio: Choose audio track(s) from available options
- Enable Packager: Toggle Enable = ON
- Click Save
Configuration Parameters
| Parameter | Description | Typical Value |
|---|---|---|
| Input Stream | Source video stream | Content ID reference |
| Transcoder | Associated transcoder | Selected transcoder |
| Server | Packaging server | packager-server-01 |
| Server Interface | Network interface | eth0 or primary interface |
| Media Directory | Output path | /opt/es/media/packager |
| Segment Duration | Chunk length in seconds | 4-10 seconds |
| Target Duration | Playlist target duration | 10 seconds |
| Buffer Time | Playback buffer | 12 seconds |
| Audio Tracks | Selected audio streams | English, Spanish, etc. |
Testing AES Streams
VLC Player:
File β Open Network Stream β Enter playlist URL
ffplay:
ffplay "http://origin-server/path/to/playlist.m3u8"
Web Browser: Use a web player that supports HLS (limited browser support)
DASH Packager
Overview
DASH (Dynamic Adaptive Streaming over HTTP) Packager creates MPEG-DASH streams suitable for web browsers and Android devices. Supports advanced DRM systems including Widevine and PlayReady.
Key Features
- MPEG-DASH format for broad web compatibility
- .mpd (Media Presentation Description) manifests
- .mp4 segments for efficient streaming
- DRM support via CPIX integration
- Optimized for Chrome, Edge, and Firefox browsers
Adding a DASH Packager
Steps:
- Navigate to DASH Packagers from the left sidebar
- Click Add DASH Packager button
- Select Input Stream: Choose the source stream
- Select Transcoder: Choose associated transcoder
- Select Server: Choose packaging server
- Select Server Interface: Choose network interface
- Configure Media Directory: Set output path
- Configure Segment Duration: Set segment length (typically 4 seconds)
- Configure Min Buffer Time: Set minimum buffer (e.g., 12 seconds)
- Select Audio: Choose audio track(s)
- DRM Configuration (if required):
- Enable DRM toggle
- Enter Tenant ID (from DRM provider)
- Configure CPIX API settings
- Enable Packager: Toggle Enable = ON
- Click Save
Configuration Parameters
| Parameter | Description | Typical Value |
|---|---|---|
| Input Stream | Source video stream | Content ID reference |
| Transcoder | Associated transcoder | Selected transcoder |
| Server | Packaging server | packager-server-01 |
| Server Interface | Network interface | eth0 |
| Media Directory | Output path | /opt/es/media/packager |
| Segment Duration | Chunk length | 4 seconds |
| Min Buffer Time | Minimum buffer | 12 seconds |
| Audio Tracks | Selected audio | Multiple audio tracks |
| Enable DRM | DRM protection toggle | ON/OFF |
| Tenant ID | DRM provider tenant ID | Organization ID |
| CPIX API URL | Key server endpoint | https://cpix-api.example.com |
DRM Configuration
When to Use DRM:
- Premium content requiring protection
- Licensed content with DRM requirements
- Preventing unauthorized redistribution
- Meeting content provider security requirements
DRM Setup:
- Obtain Tenant ID from DRM provider
- Configure CPIX API access
- Test key retrieval before production
- Monitor license server availability
- Implement key rotation policies
Testing DASH Streams
Web Browser (Chrome/Edge): Use DASH.js or Shaka Player in a test page
DASH.js test page:
https://reference.dashif.org/dash.js/
Android Device: Use ExoPlayer-based applications
HLS Packager
Overview
HLS (HTTP Live Streaming) Packager creates Apple HLS streams optimized for iOS, iPadOS, macOS, and Safari browsers. Supports FairPlay DRM for content protection.
Key Features
- Apple HLS format for Apple ecosystem
- .m3u8 master and variant playlists
- .ts segments for compatibility
- FairPlay DRM integration
- Optimized for iOS, Safari, and Apple devices
Adding an HLS Packager
Steps:
- Navigate to HLS Packagers from the left sidebar
- Click Add HLS Packager button
- Select Input Stream: Choose the source stream
- Select Transcoder: Choose associated transcoder
- Select Server: Choose packaging server
- Select Server Interface: Choose network interface
- Configure Media Directory: Set output path
- Configure Segment Duration: Set segment length (typically 6 seconds)
- Configure Target Duration: Set target duration (e.g., 10 seconds)
- Configure Buffer Time: Set buffer time (e.g., 12 seconds)
- Select Audio: Choose audio track(s)
- DRM Configuration (if required):
- Enable DRM toggle
- Enter Tenant ID
- Configure CPIX API settings for FairPlay
- Enable Packager: Toggle Enable = ON
- Click Save
Configuration Parameters
| Parameter | Description | Typical Value |
|---|---|---|
| Input Stream | Source video stream | Content ID reference |
| Transcoder | Associated transcoder | Selected transcoder |
| Server | Packaging server | packager-server-01 |
| Server Interface | Network interface | eth0 |
| Media Directory | Output path | /opt/es/media/packager |
| Segment Duration | Chunk length | 6 seconds |
| Target Duration | Playlist target | 10 seconds |
| Buffer Time | Playback buffer | 12 seconds |
| Audio Tracks | Selected audio | Multiple audio tracks |
| Enable DRM | FairPlay DRM toggle | ON/OFF |
| Tenant ID | DRM provider ID | Organization ID |
Testing HLS Streams
Safari Browser: Native HLS support - paste URL directly
iOS Device: Use Safari or native player apps
macOS: Safari or QuickTime Player
VLC (all platforms):
File β Open Network Stream β Enter playlist URL
Common Operations
Viewing Packager Details
All packager types display similar information:
Basic Info:
- Input Stream reference
- Content ID
- Associated Transcoder
- Server and Interface
- Live Status (RUNNING / STOPPED)
Configuration:
- Media Directory path
- Segment Duration
- Buffer settings
- Audio track configuration
- DRM settings (if enabled)
Timestamps:
- Created At
- Updated At
Editing Packagers
Editable Fields:
- Server assignment
- Network interface
- Media directory
- Segment duration
- Buffer time
- Audio track selection
- DRM configuration
Non-editable:
- Input Stream (must recreate)
- Packager type (must recreate)
Workflow:
- Navigate to packager details
- Click Edit button
- Modify desired settings
- Click Save or Cancel
Enabling / Disabling
Toggle packager state without deleting:
- Navigate to packager list or details
- Click toggle icon or Enable/Disable button
- Confirm the action
- Monitor status change
Deleting Packagers
Warning: Ensure no active viewers before deletion.
Workflow:
- Disable the packager first
- Click Delete (bin) icon
- Confirm deletion
- Verify removal
Media Directory Structure
Directory Organization
Packagers write output to the configured media directory with the following structure:
/opt/es/media/packager/
βββ {content-id}/
β βββ aes/
β β βββ playlist.m3u8
β β βββ segment-001.ts
β β βββ segment-002.ts
β β βββ ...
β βββ dash/
β β βββ manifest.mpd
β β βββ segment-001.mp4
β β βββ segment-002.mp4
β β βββ ...
β βββ hls/
β βββ master.m3u8
β βββ variant-1080p.m3u8
β βββ segment-001.ts
β βββ ...
Directory Requirements
- Writable by packager service
- Sufficient disk space for segments (typically 100+ GB)
- Fast I/O for segment creation and deletion
- Accessible by origin servers for content delivery
- Monitored for disk space usage
Segment Management
Segment Duration Guidelines
AES & HLS:
- Short (4-6 seconds): Lower latency, more segments
- Medium (6-10 seconds): Balanced approach
- Long (10+ seconds): Higher latency, fewer segments
DASH:
- Typical: 4 seconds: Optimized for web delivery
- Low-latency: 2 seconds: Real-time applications
- Standard: 4-6 seconds: Most use cases
Buffer Time Configuration
Playback Buffer:
- Minimum: 8-12 seconds
- Recommended: 12-20 seconds for stability
- High-latency networks: 20-30 seconds
Trade-offs:
- Longer buffer: More stable playback, higher latency
- Shorter buffer: Lower latency, risk of buffering
Audio Track Configuration
Multiple Audio Support
All packager types support multiple audio tracks:
- Multi-language: English, Spanish, French, etc.
- Descriptive Audio: For accessibility
- Multiple Bitrates: Standard and low-bandwidth
Audio Selection
- Review available audio from transcoder output
- Enable required audio tracks in packager configuration
- Verify audio appears in manifest files
- Test playback with different audio selections
Audio Debugging
Issue: No audio in playback
- Check input stream has audio
- Verify transcoder includes audio renditions
- Ensure at least one audio track is selected in packager
- Use ffprobe to verify audio in segments
DRM Best Practices
When to Enable DRM
Use DRM for:
- Premium subscription content
- Licensed movies and TV shows
- Sports events with broadcast rights
- Content requiring robust protection
Skip DRM for:
- Free content
- Public domain material
- Internal corporate communications
- Development and testing
DRM Configuration Checklist
- Obtain Tenant ID from DRM provider
- Configure CPIX API endpoint
- Test key retrieval functionality
- Verify DRM provider availability
- Implement key rotation schedule
- Monitor license server health
- Plan for DRM provider failover
- Document DRM configuration
DRM Troubleshooting
Error: βNo packages found to the Contentβ
This error occurs when packager cannot retrieve encryption keys from CPIX API.
Resolution:
- Verify CPIX API URL is correct
- Check Tenant ID is valid
- Ensure network connectivity to CPIX server
- Verify DRM provider service is operational
- Review packager logs for detailed errors
- Contact DRM provider support if needed
Performance Optimization
Server Resource Planning
Per Packager Requirements:
- CPU: 0.5-1 core per packager
- Memory: 512 MB - 1 GB per packager
- Disk I/O: Fast storage for segment writes
- Network: Sufficient bandwidth for origin delivery
Scaling Guidelines
Single Server Capacity:
- Small deployment: 5-10 packagers
- Medium deployment: 10-20 packagers
- Large deployment: Distribute across servers
Indicators to Scale:
- CPU usage consistently above 70%
- Disk I/O saturation
- Increased segment creation latency
- Origin fetch delays
Monitoring and Alerts
Key Metrics
Monitor these indicators:
- Status: RUNNING vs STOPPED
- Segment Creation Rate: Consistent with segment duration
- Disk Space: Available space in media directory
- CPU Usage: Packager process resources
- Error Logs: Packaging failures
Alert Conditions
Set up alerts for:
- Packager status changes to STOPPED
- Disk space below 10% free
- Missing segments or manifest files
- DRM key retrieval failures
- Unusually high CPU usage
Troubleshooting
Not Streaming
Symptoms:
- Player shows no video
- 404 errors for playlist URLs
- Manifest files not generated
Debug Steps:
- Verify input stream is active
- Check transcoder status is RUNNING
- Confirm packager status is RUNNING
- Test playlist URL accessibility
- Review packager logs for errors
- Check media directory permissions
- Verify disk space availability
Buffering Issues
Symptoms:
- Frequent playback interruptions
- Slow segment loading
- Player shows buffering indicator
Debug Steps:
- Test segment download times in browser network tab
- Check origin server load and bandwidth
- Verify CDN is functioning properly
- Review segment duration configuration
- Increase buffer time if needed
- Monitor packager CPU usage
404 Not Found
Symptoms:
- Playlist or segments return 404 errors
Debug Steps:
- Verify Content ID is correct (case-sensitive)
- Check media directory path exists
- Confirm origin server is serving correct path
- Review web server configuration
- Test direct file access on origin server
Mosaic / Corruption
Symptoms:
- Blocky video artifacts
- Audio/video desync
- Playback freezes
Debug Steps:
- Check input stream quality with ffprobe
- Verify encoder is sending stable stream
- Test transcoder output quality
- Restart transcoder and packager
- Monitor network packet loss
Best Practices Summary
Configuration
β Choose appropriate segment duration for your use case β Configure adequate buffer time for network conditions β Enable only required audio tracks β Use DRM only when necessary β Test configuration before production deployment
Operations
β Monitor packager status continuously β Set up alerts for failures β Maintain sufficient disk space β Rotate logs regularly β Document DRM configurations
Security
β Enable DRM for premium content β Rotate encryption keys regularly β Monitor CPIX API health β Restrict access to media directories β Use HTTPS for all delivery URLs
Performance
β Distribute packagers across servers β Monitor CPU and disk I/O β Use fast storage for media directories β Implement CDN for content delivery β Test under peak load conditions
Related Documentation
- Input Streams - Configure source streams
- Transcoders - Set up transcoding
- Origin Servers - Deploy content delivery
- Troubleshooting - Resolve issues