Imported from personamanagmentlayer/pcl (
stdlib/tools/video-streaming-expert/SKILL.md). Install upstream withnpx skills add personamanagmentlayer/pcl --skill video-streaming-expert. Copyright stays with the author.
Video Streaming Expert
Core Concepts
Streaming Protocols
- HLS - HTTP Live Streaming (Apple)
- DASH - Dynamic Adaptive Streaming over HTTP
- RTMP - Real-Time Messaging Protocol (legacy)
- WebRTC - Real-time peer-to-peer
- SRT - Secure Reliable Transport
- RTSP - Real-Time Streaming Protocol
Adaptive Bitrate Streaming
- Multi-Bitrate - Multiple quality levels
- Manifest Files - Playlist/MPD files
- Segments - Small video chunks (2-10 seconds)
- Quality Switching - Dynamic adaptation
- Buffer Management - Smooth playback
- Bandwidth Detection - Network monitoring
Key Components
- Encoder - Video compression (H.264, H.265, VP9, AV1)
- Transcoder - Format conversion
- Packager - Create streaming formats
- CDN - Content delivery network
- Player - Video playback (HLS.js, Dash.js, Video.js)
- DRM - Digital rights management
Best Practices
Encoding
- Use modern codecs (H.265, VP9, AV1)
- Implement adaptive bitrate ladder
- Optimize keyframe intervals
- Use constant quality mode (CRF)
- Test across devices
- Monitor encoding costs
Delivery
- Use CDN for distribution
- Implement proper caching
- Enable CORS headers
- Support range requests
- Optimize segment size
- Monitor bandwidth costs
Player
- Implement quality switching
- Handle network errors
- Support offline playback
- Optimize buffer management
- Provide accessibility features
- Track analytics
Security
- Implement DRM when needed
- Use signed URLs
- Enable HTTPS
- Validate tokens
- Rate limit requests
- Monitor for piracy
Anti-Patterns
Common Mistakes
- Single bitrate streaming
- Large segment sizes
- Missing error recovery
- No buffer management
- Hard-coded CDN URLs
- Ignoring mobile constraints
Performance Issues
- Excessive buffering
- Poor quality ladder
- Missing CDN
- Inefficient encoding
- No cache headers
- Synchronous transcoding
Security Problems
- Unprotected content
- Missing token validation
- Weak DRM implementation
- Exposed API keys
- No rate limiting
- Missing CORS configuration
Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- Implementation Examples — FFmpeg Video Transcoding, Node.js Streaming Server, HLS Player (React), DASH Streaming Configuration, DRM Integration (Widevine)
Resources
Official Documentation
- HLS Specification - Apple HLS
- DASH Industry Forum - DASH standard
- FFmpeg Documentation - Video processing
- Shaka Player - DRM player
Learning Resources
- Video Encoding Basics - Apple guide
- Adaptive Streaming - Comprehensive guide
- Video Compression - Best practices
- YouTube Engineering - Talks
Tools & Services
- FFmpeg - Video processing
- Cloudflare Stream - Streaming service
- AWS MediaConvert - Cloud transcoding
- Mux - Video infrastructure
Community Resources
- Video Dev Slack - Community
- r/VideoEditing - Reddit
- Stack Overflow - Q&A
- Streaming Media - Industry news