media-converter / README.md
prasanthntu's picture
Update code, readme, and add gitignore
357f3f3

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
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

./attachments/demo-animation

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
git clone https://huggingface.co/spaces/prasanthntu/media-converter
cd media-converter
  1. 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
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Start the application:
python app.py

For interactive development:

gradio app.py
  1. 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