Skip to content

Commit a9ca90b

Browse files
committed
added readme
1 parent fa69937 commit a9ca90b

File tree

5 files changed

+84
-84
lines changed

5 files changed

+84
-84
lines changed

README.md

+84-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,90 @@
1-
# sqs-comms-transcoding
21

3-
To install dependencies:
2+
# Video Transcoding Pipeline
43

5-
```bash
6-
bun install
7-
```
4+
A highly efficient and cost-effective video transcoding pipeline leveraging AWS services. This repository simplifies the video transcoding workflow by running containers directly on the same EC2 instance as the code, avoiding ECS costs. The pipeline is designed to handle video transcoding tasks using AWS SQS for communication and scheduling.
5+
6+
## Features
7+
8+
- **AWS SQS Integration**: Easily manage message queues for video transcoding tasks.
9+
- **Efficient Resource Usage**: Containers are spawned directly on the EC2 instance, reducing costs by avoiding ECS.
10+
- **Customizable**: Adapt the pipeline to fit your transcoding needs and system requirements.
11+
12+
## Prerequisites
13+
14+
- AWS account with the following configured:
15+
- SQS Queue
16+
- EC2 instance
17+
- S3 buckets
18+
- Docker installed on your EC2 instance
19+
20+
## Installation
21+
22+
1. Clone this repository:
23+
24+
```bash
25+
git clone https://github.com/unlux/video-transcoding-pipeline.git
26+
cd video-transcoding-pipeline
27+
```
28+
29+
2. Install dependencies:
30+
31+
```bash
32+
npm install
33+
```
34+
35+
3. Set up your AWS credentials and configuration:
36+
37+
- Add your AWS access key, secret key, and region to the environment variables as needed.
838

9-
To run:
39+
4. Configure the pipeline settings in the provided configuration file (e.g., `config.json` or `.env`).
1040

11-
```bash
12-
bun run index.ts
41+
## Usage
42+
43+
1. Start the consumer:
44+
45+
46+
2. Send a video transcoding input bucket, it will generate anSQS queue. The message should be like:
47+
48+
```json
49+
{
50+
"input": "s3://your-bucket/input-video.mp4",
51+
"output": "s3://your-bucket/output-video.mp4",
52+
"settings": {
53+
"resolution": "1080p",
54+
"codec": "h264",
55+
"bitrate": "4000k"
56+
}
57+
}
58+
```
59+
60+
3. check the output bucket:
61+
62+
63+
## Configuration
64+
65+
- **SQS Queue**: Update the SQS queue URL in the configuration file.
66+
- **Docker Settings**: Ensure Docker is configured to run the required containers.
67+
68+
## Directory Structure
1369
```
70+
video-transcoding-pipeline
71+
├── bun.lockb
72+
├── container
73+
│   ├── Dockerfile
74+
│   ├── index.js
75+
│   ├── package.json
76+
│   └── package-lock.json
77+
├── package.json
78+
├── package-lock.json
79+
├── README.md
80+
├── src
81+
│   ├── docker.ts
82+
│   └── index.ts
83+
└── tsconfig.json
84+
```
85+
86+
## Acknowledgments
1487

15-
This project was created using `bun init` in bun v1.1.27. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
88+
- [AWS SQS](https://aws.amazon.com/sqs/) for reliable message queuing.
89+
- [Docker](https://www.docker.com/) for containerized transcoding.
90+
- [NixOS](https://nixos.org/) for its reproducible development environment.

tester/bun.lockb

-53.4 KB
Binary file not shown.

tester/index.js

-61
This file was deleted.

tester/package.json

-14
This file was deleted.

tester/transcoded/video-720p.mp4

-1.15 MB
Binary file not shown.

0 commit comments

Comments
 (0)