Streamer Sandbox is a versatile project designed to handle video streaming and file uploads efficiently. It leverages modern technologies to provide a robust and scalable solution for managing video content.
- Video Streaming: Supports HLS (HTTP Live Streaming) for adaptive bitrate streaming.
- Multiple Packager Options: Choose between FFmpeg or Google's Shaka Packager for HLS content.
- Adaptive Bitrate Streaming: Provides multiple quality levels when using Shaka Packager.
- Quality Selection: Interactive quality selector for videos transcoded with Shaka Packager.
- File Uploads: Handles file uploads with ease, including large files.
- AWS S3 Integration: Utilizes AWS S3 for secure and scalable storage.
- Dockerized Environment: Simplifies development and deployment with Docker.
- TypeScript Support: Ensures type safety and modern JavaScript features.
├── app.ts
├── dev.sh
├── docker-compose.override.yml
├── docker-compose.yml
├── Dockerfile
├── Dockerfile.dev
├── package.json
├── pnpm-lock.yaml
├── prod.sh
├── README.md
├── tsconfig.json
├── controllers/
│ └── upload.Controller.ts
├── lib/
│ ├── environments.ts
│ └── s3client.ts
├── public/
│ └── index.html
├── router/
│ └── index.ts
│
└──
- Node.js
- Docker
- AWS account (for S3 integration)
-
Clone the repository:
git clone https://github.com/your-repo/streamer-sandbox.git
-
Install dependencies:
pnpm install
-
Set up environment variables:
- Create a
.env
file in the root directory. - Add your AWS credentials and other necessary configurations.
- Create a
FFmpeg is used by default to generate HLS content. It produces a basic HLS stream with segments.
Shaka Packager is an advanced media packaging tool that offers:
- Multiple video qualities (low, medium, high)
- Adaptive bitrate streaming
- DASH and HLS support from the same source content
- Interactive quality selection in the player
- Better compatibility with various players and devices
When using Shaka Packager, the system will:
- Create multiple quality renditions of your video
- Generate both DASH and HLS manifests
- Add quality selection controls to the player
- Store packaging metadata for better organization
Run the development server:
./dev.sh
Build and run the production server:
./prod.sh
Build and run the Docker container:
docker-compose up
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.