https://github.com/skandergazzah/video-transcoder-service
A scalable video transcoding service built with Go, Gin, and FFmpeg. Supports multiple resolutions (1080p, 720p, 480p, 360p, 240p, 144p) with concurrent processing and Docker integration.
https://github.com/skandergazzah/video-transcoder-service
concurrency docker ffmpeg go mutex semaphore shell-script video-transcoding
Last synced: over 1 year ago
JSON representation
A scalable video transcoding service built with Go, Gin, and FFmpeg. Supports multiple resolutions (1080p, 720p, 480p, 360p, 240p, 144p) with concurrent processing and Docker integration.
- Host: GitHub
- URL: https://github.com/skandergazzah/video-transcoder-service
- Owner: skandergazzah
- Created: 2024-09-13T17:06:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T17:35:28.000Z (almost 2 years ago)
- Last Synced: 2025-03-04T18:22:13.105Z (over 1 year ago)
- Topics: concurrency, docker, ffmpeg, go, mutex, semaphore, shell-script, video-transcoding
- Language: Shell
- Homepage:
- Size: 348 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Video Transcoder Service
A scalable video transcoding service built with Go, Gin, and FFmpeg. This service supports multiple resolutions (1080p, 720p, 480p, 360p, 240p, 144p) with concurrent processing and Docker integration.
## Project Running Example
Here’s a screenshot of the project running:

## Features
- Accepts video file uploads via a POST request.
- Transcodes videos into multiple resolutions: 1080p, 720p, 480p, 360p, 240p, and 144p.
- Utilizes concurrent transcoding with a semaphore to limit the number of simultaneous jobs.
## Project Structure
```
├── controller
│ └── transcode.go # Handles transcoding requests
├── model
│ └── transcode.go # Defines data models for transcoding results
├── service
│ └── transcode.go # Contains the logic for transcoding videos
├── transcode.sh # Shell script for FFmpeg transcoding
├── Dockerfile # Dockerfile for building the application image
├── docker-compose.yml # Docker Compose configuration file
├── main.go # Entry point of the application
└── .gitattributes # Ensures consistent line endings for shell scripts
```
## Prerequisites
- Docker
- Docker Compose
## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/skandergazzah/video-transcoder-service.git
cd video-transcoder-service
```
2. **Build and start the service using Docker Compose:**
```
docker-compose up --build
```
3. **Access the service:**
- The service will be available at http://localhost:9000.
## Usage
1. **Transcoding Endpoint**
- POST /transcode
3. **Request Example using curl:**
```
curl --location 'http://localhost:9000/transcode' --form 'video=@"/C:/Users/Skander/Downloads/surf.mp4"'
```
3. **Response Example:**
```
{
"message": "Transcoding in progress",
"resolutions_in_progress": [
"1080p",
"720p",
"480p",
"360p",
"240p",
"144p"
]
}
```
## Acknowledgments
- Gin - Web framework for Go.
- FFmpeg - Multimedia framework for handling video, audio, and other multimedia files and streams.
## License
[MIT](https://choosealicense.com/licenses/mit/)