Spaces:
Sleeping
Sleeping
title: Media Converter | |
emoji: 📸 | |
colorFrom: pink | |
colorTo: yellow | |
sdk: gradio | |
sdk_version: 5.14.0 | |
app_file: app.py | |
pinned: false | |
license: mit | |
short_description: Convert images and videos to different file formats | |
# Media Converter | |
 | |
<!--  --> | |
A web-based media conversion tool built with Gradio that supports: | |
- PNG to WebP image conversion | |
- MOV to animated WebP conversion | |
## Features | |
- **Image Conversion** | |
- Convert PNG images to WebP format | |
- Preserve transparency (RGBA) | |
- Adjustable quality settings (10-100) | |
- Real-time preview | |
- File size and dimension statistics | |
- **Video Conversion** | |
- Convert MOV videos to animated WebP | |
- Adjustable FPS and quality | |
- Preview of converted animation | |
- Video statistics display | |
# Installation | |
1. Clone the repository | |
```bash | |
git clone https://huggingface.co/spaces/prasanthntu/media-converter | |
cd media-converter | |
``` | |
2. Create and activate virtual environment (Optional, but recommended): | |
```bash | |
# 2.1 Create virtual environment | |
python -m venv media-converter-env | |
# 2.2 Activate virtual environment | |
# For Windows: | |
media-converter-env\Scripts\activate.bat # CMD | |
media-converter-env\Scripts\Activate.ps1 # PowerShell | |
# For Mac/Linux: | |
source media-converter-env/bin/activate | |
``` | |
3. Install dependencies: | |
```bash | |
pip install -r requirements.txt | |
``` | |
# Usage | |
1. Start the application: | |
```bash | |
python app.py | |
``` | |
For interactive development: | |
```bash | |
gradio app.py | |
``` | |
2. Open the provided URL in your web browser (typically http://127.0.0.1:7860) | |
2. Use either tab: | |
- **PNG to WebP**: Upload PNG image and adjust quality | |
- **Video to WebP**: Upload MOV video and adjust FPS/quality | |
# Development | |
- Logs are stored in `image_converter.log` | |
T- emporary files are automatically cleaned up | |
- Built with Gradio for easy UI modifications | |
# Todo | |
## Enhancements | |
- [ ] Support asynchronus processing | |
- [ ] Add more file formats |