A professional, enterprise-grade live streaming encoder with SCTE-35 ad marker and scheduler support, inspired by AWS Elemental MediaLive. Built with Next.js 15, TypeScript, and featuring a stunning orange/dark gradient theme.
- Live Streaming Encoder: Professional-grade video encoding with multiple input/output support
- SCTE-35 Integration: Complete ad marker and scheduling system
- Multi-format Support: RTMP, SRT, NDI, UDP, and DeckLink input sources
- Real-time Monitoring: System health, channel status, and performance metrics
- Channel Management: Create, configure, and manage multiple streaming channels
- Encoding Profiles: Advanced video/audio encoding presets and configurations
- Event Scheduling: Automated ad break scheduling and triggering
- Professional UI: AWS Elemental MediaLive-inspired dark theme with orange accents
- Next.js 15: Latest Next.js with App Router and server components
- TypeScript: Full type safety throughout the application
- Tailwind CSS 4: Modern utility-first CSS framework
- shadcn/ui: Professional UI component library
- Prisma ORM: Database management with SQLite
- Docker Support: Containerized deployment ready
- WebSocket Support: Real-time updates and notifications
- REST API: Complete backend API for all operations
- AWS Elemental MediaLive Theme: Professional dark theme with orange gradients
- Responsive Design: Mobile, tablet, and desktop optimized
- Real-time Updates: Live status updates and monitoring
- Professional Navigation: Multi-level sidebar with collapsible sections
- Interactive Dashboard: Comprehensive system overview and metrics
- Advanced Filtering: Search and filter capabilities across all sections
- Accessibility: WCAG compliant with proper contrast and navigation
- Node.js 18+
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/yourusername/medialive-encoder.git cd medialive-encoder
-
Install dependencies
npm install # or yarn install
-
Set up the database
npm run db:push
-
Start the development server
npm run dev # or yarn dev
-
Open your browser Navigate to http://localhost:3000
medialive-encoder/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ api/ # API routes
β β β βββ streams/ # Stream management API
β β β βββ adbreaks/ # Ad break management API
β β β βββ encoding/ # Encoding session API
β β βββ channels/ # Channel management page
β β βββ dashboard/ # Main dashboard
β β βββ inputs/ # Input sources management
β β βββ profiles/ # Encoding profiles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page (redirect)
β βββ components/ # Reusable components
β β βββ layout/ # Layout components
β β β βββ sidebar.tsx # Navigation sidebar
β β β βββ header.tsx # Page header
β β βββ theme-toggle.tsx # Theme toggle
β β βββ ui/ # shadcn/ui components
β βββ lib/ # Utility libraries
β β βββ db.ts # Database client
β β βββ socket.ts # WebSocket logic
β β βββ utils.ts # Utility functions
β βββ app/
β βββ globals.css # Global styles and AWS theme
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ docker-compose.yml # Docker configuration
βββ Dockerfile # Docker image
βββ .gitignore # Git ignore rules
βββ package.json # Project dependencies
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
The application features a professional dark theme inspired by AWS Elemental MediaLive:
- Primary Orange:
#ff9900
(AWS brand color) - Dark Background:
#0f1419
(Deep space gray) - Card Background:
#1a1f36
(Dark blue-gray) - Text Primary:
#ffffff
(White) - Text Secondary:
#d1d5db
(Light gray)
.aws-gradient
: Main orange gradient for branding.aws-gradient-dark
: Dark background gradients.aws-metric-card
: Professional metric card styling.aws-button-gradient
: Orange gradient buttons.aws-progress-bar
: Orange gradient progress indicators.aws-scrollbar
: Custom orange-themed scrollbars
- Glass Morphism: Backdrop blur effects on cards
- Smooth Animations: Hover transitions and pulsing indicators
- Professional Gradients: Multi-layer gradient backgrounds
- Glow Effects: Subtle glow on important elements
GET /api/streams
- Get all streamsPOST /api/streams
- Create new streamGET /api/streams/[id]
- Get specific streamPUT /api/streams/[id]
- Update streamDELETE /api/streams/[id]
- Delete stream
GET /api/adbreaks
- Get all ad breaksPOST /api/adbreaks
- Create new ad breakGET /api/adbreaks/[id]
- Get specific ad breakPUT /api/adbreaks/[id]
- Update ad breakDELETE /api/adbreaks/[id]
- Delete ad break
GET /api/encoding
- Get all encoding sessionsPOST /api/encoding
- Start encoding session
Create a .env.local
file in the root directory:
# Database
DATABASE_URL="file:./dev.db"
# Application
NEXT_PUBLIC_APP_NAME="MediaLive Encoder"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# FFmpeg Configuration
FFMPEG_PATH="/usr/local/bin/ffmpeg"
FFMPEG_LOG_LEVEL="info"
# SCTE-35 Configuration
SCTE35_ENABLED=true
SCTE35_PROVIDER="YourProvider"
SCTE35_PROVIDER_ID="0x1"
# HLS Configuration
HLS_SEGMENT_DURATION=6
HLS_PLAYLIST_SIZE=5
HLS_OUTPUT_DIR="/var/www/hls"
The application uses Prisma ORM with SQLite. The main entities include:
- Streams: Live streaming channel configurations
- EncodingSessions: Active encoding session tracking
- AdBreaks: SCTE-35 ad break scheduling and management
- SystemSettings: Application-wide configuration
- SystemLogs: Application logging and auditing
docker build -t medialive-encoder .
docker-compose up -d
version: '3.8'
services:
app:
build: .
ports:
- "3000:3000"
environment:
- DATABASE_URL=file:./data/app.db
volumes:
- ./data:/app/data
- ./logs:/app/logs
restart: unless-stopped
-
Connect to Vercel
npm i -g vercel vercel login
-
Deploy
vercel
-
Build the image
docker build -t medialive-encoder:latest .
-
Run the container
docker run -p 3000:3000 medialive-encoder:latest
-
Build the application
npm run build
-
Start the production server
npm start
- CPU Usage: Real-time CPU utilization tracking
- Memory Usage: Memory consumption monitoring
- Disk Usage: Storage space monitoring
- Network I/O: Network traffic monitoring
- System Logs: Application-level logging
- Error Tracking: Error and exception logging
- Performance Metrics: Request timing and performance data
- Audit Logs: User actions and system changes
- WebSocket Support: Live status updates
- Event Notifications: Real-time alert system
- Health Checks: System health monitoring
- Metrics Dashboard: Comprehensive performance metrics
- Session Management: Secure user sessions
- Role-based Access: User permission management
- API Key Management: Secure API key generation and management
- Audit Logging: Complete audit trail of user actions
- Input Validation: Comprehensive input sanitization
- SQL Injection Prevention: Parameterized queries with Prisma
- XSS Protection: Content Security Policy implementation
- CSRF Protection: Cross-site request forgery prevention
- HTTPS Support: SSL/TLS encryption
- CORS Configuration: Cross-origin resource sharing setup
- Rate Limiting: API request rate limiting
- Security Headers: Comprehensive security header implementation
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests if applicable
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- TypeScript: Strict TypeScript mode enabled
- ESLint: Code linting with Next.js rules
- Prettier: Code formatting (if configured)
- Conventional Commits: Commit message formatting
This project is licensed under the MIT License - see the LICENSE file for details.
- AWS Elemental MediaLive: Inspiration for the UI/UX design
- Next.js Team: For the excellent React framework
- shadcn/ui: For the beautiful UI components
- Tailwind CSS: For the utility-first CSS framework
- Prisma: For the excellent ORM
- SuperKabuki: For the SCTE-35 libraries and tools
If you encounter any issues or have questions:
- Check the documentation: Review this README and inline code comments
- Search existing issues: Check GitHub Issues for similar problems
- Create a new issue: Provide detailed information about your problem
- Join discussions: Participate in GitHub Discussions
- β Core Architecture: Next.js 15 with App Router
- β Database Layer: Prisma ORM with SQLite
- β API Layer: RESTful API endpoints
- β UI Components: Professional interface with AWS theme
- β Real-time Features: WebSocket support
- β Docker Support: Containerization ready
- π§ Advanced Features: Additional encoding profiles and monitoring
- π§ Testing: Comprehensive test suite
- π§ Documentation: Extended API documentation
Built with β€οΈ using Next.js, TypeScript, and inspired by AWS Elemental MediaLive