Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.44.1
metadata
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
- Clone the repository
git clone https://huggingface.co/spaces/prasanthntu/media-converter
cd media-converter
- Create and activate virtual environment (Optional, but recommended):
# 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
- Install dependencies:
pip install -r requirements.txt
Usage
- Start the application:
python app.py
For interactive development:
gradio app.py
Open the provided URL in your web browser (typically http://127.0.0.1:7860)
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