A full-stack web application for demonstrating lossless multimedia compression and steganography algorithms on digital media. This project is developed using a Single Page Application (SPA) architecture with Next.js as the frontend and FastAPI as the backend.
-
Frontend: https://secure-codec-studio.vercel.app/
-
Backend API: https://secure-codec-studio-production.up.railway.app
Secure Multimedia Codec Studio is a full-stack web application that demonstrates multimedia compression and Least Significant Bit (LSB) steganography across images, audio, and video.
The application supports both Lossless Compression and Lossy Compression, allowing users to understand the fundamental differences between reversible and irreversible compression methods through an interactive web interface and provides performance metrics such as compression ratio, processing time, PSNR, and MSE where applicable.
- 🌐 Live Production Deployment
- 🖼️ Image, Audio & Video Compression
- 🔒 Least Significant Bit (LSB) Steganography
- 📊 Compression Analytics (Ratio, PSNR, MSE)
- ⚡ Built with Next.js + FastAPI
- ☁️ Deployed on Vercel & Railway
- Next.js
- React
- TypeScript
- Tailwind CSS
- Lucide Icons
- FastAPI
- Python
- OpenCV
- FFmpeg (FFV1, H.264)
- Zlib
Secure Multimedia Codec Studio supports multimedia compression and steganography across images, audio, and video through a unified processing workflow.
| Mode | Description | Decompression |
|---|---|---|
| Lossless Compression | Reversible compression that preserves the original data using the Zlib algorithm. | ✅ Supported |
| Lossy Compression | Irreversible compression that reduces file size by sacrificing part of the original information. | ❌ Not Supported |
| Steganography | Hides and extracts secret text messages using the Least Significant Bit (LSB) technique. | N/A |
| Feature | Lossless | Lossy |
|---|---|---|
| Original Data Preserved | ✅ | ❌ |
| Can Be Decompressed | ✅ | ❌ |
| Compression Ratio | Moderate | High |
| Image Quality | Unchanged | Reduced |
| Best Use Case | Archiving & Editing | Distribution & Storage |
| Media | Compression Algorithms | Steganography | Supported Formats | Max File Size |
|---|---|---|---|---|
| Image | Zlib (Lossless), OpenCV JPEG (Lossy) | LSB | PNG, JPG, JPEG, BMP, WebP | 5 MB |
| Audio | Zlib (Lossless), FFmpeg libmp3lame (Lossy) | LSB | WAV, MP3, OGG, M4A, AAC, FLAC | 10 MB |
| Video | Zlib (Lossless), FFmpeg H.264/libx264 (Lossy) | LSB (FFV1) | MP4, AVI, MOV, MKV | 20 MB |
- Lossless Compression with complete data preservation.
- Lossy Compression for efficient multimedia storage.
- Lossless Decompression for restoring compressed media.
- LSB Steganography to embed secret messages.
- Hidden Message Extraction from supported steganographic media.
- Compression Analytics including Compression Ratio, Processing Time, PSNR, and MSE (where applicable).
- Integrated Media Preview for processed images, audio, and video.
All processed files are temporarily stored inside:
backend/tmp/
Temporary files are only used during processing.
Secure-Codec-Studio
│
├── app/
│
├── components/
│ ├── ActionPanel.tsx
│ ├── Header.tsx
│ ├── Footer.tsx
│ ├── UploadDropzone.tsx
│ ├── ModeSelector.tsx
│ ├── ResultCards.tsx
│ └── MediaPreview.tsx
│
├── hooks/
│
├── lib/
│ ├── api.ts
│ └── utils.ts
│
├── backend/
│ ├── app/
│ │
│ ├── algorithms/
│ │ ├── image/
│ │ ├── audio/
│ │ └── video/
│ │
│ ├── services/
│ │
│ ├── routes.py
│ ├── schemas.py
│ ├── utils.py
│ │
│ └── tmp/
│
└── README.md
The backend follows a simple layered architecture.
Client
│
▼
routes.py
│
▼
validator.py
│
▼
service
│
▼
algorithm
│
▼
response
Business logic is placed inside services, while algorithms are isolated inside the algorithms directory.
Upload Image
│
▼
Select Compression Method
│
┌───────────┴───────────┐
│ │
▼ ▼
Lossless Compression Lossy Compression
│ │
▼ ▼
Zlib Algorithm Quality Reduction
│ │
▼ ▼
Codec File (.lossless) Optimized Image
│
▼
Decompression
│
▼
Original Image Restored
Upload Audio
│
▼
Select Compression Method
│
┌───────────┴───────────┐
│ │
▼ ▼
Lossless Compression Lossy Compression
│ │
▼ ▼
Zlib Algorithm FFmpeg libmp3lame
│ │
▼ ▼
Codec File (.lossless) Optimized Audio
│
▼
Decompression
│
▼
Original Audio Restored
POST /process
Multipart Form Data
| Field | Type | Description |
|---|---|---|
| file | File | Uploaded media |
| mode | String | compress / decompress / stego / extract |
| message | String | Secret message (optional) |
{
"status": "success",
"media_type": "image",
"original_size": 102400,
"processed_size": 50231,
"compression_ratio": 50.95,
"processing_time_ms": 135,
"message": "Image compressed successfully"
}Before running this project, ensure you have the following installed on your system:
- Node.js (v18 or higher)
- Python (v3.10 or higher)
- FFmpeg: Must be installed and added to your system's
PATH. This is critically required for Audio and Video processing to work.
git clone https://github.com/zoerlyx/secure-codec-studio.git
cd secure-codec-studioNavigate to the backend directory:
cd backendCreate a virtual environment:
python -m venv .venvActivate the virtual environment.
Windows
.venv\Scripts\activateLinux / macOS
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtRun the FastAPI server:
python run.pyBackend will be available at:
http://127.0.0.1:8000
Return to the project root:
cd ..Install dependencies:
npm installRun the development server:
npm run devFrontend will be available at:
http://localhost:3000
The backend provides an interactive Swagger UI for exploring and testing all available API endpoints.
https://secure-codec-studio-production.up.railway.app/docs
http://127.0.0.1:8000/docs
The API documentation includes:
- File processing endpoint
- Request parameters
- Response schema
- Interactive request testing
- Validation errors
The application is deployed as a decoupled full-stack architecture.
| Service | Platform | URL |
|---|---|---|
| Frontend | Vercel | https://secure-codec-studio.vercel.app/ |
| Backend API | Railway | https://secure-codec-studio-production.up.railway.app |
| API Docs | Railway Swagger | https://secure-codec-studio-production.up.railway.app/docs |
The frontend communicates with the backend through the NEXT_PUBLIC_API_URL environment variable.
- Stereo WAV support
- Advanced lossy image compression
- Better compression ratio for audio
- Progressive processing
- Batch processing
- Download manager
This project is licensed under the MIT License.
See the LICENSE file for details.
Fardho Zurrahman
Muhammad Ridwan Ihsan
Muhammad Wiguna Ilham
Data Science Enthusiast
Built with using Next.js and FastAPI.