A powerful desktop application for converting media files (video, audio, images) and documents (PDF, Word, Excel, PowerPoint) with a modern, user-friendly interface.
Unicon uses a hybrid Electron + Python architecture:
- Frontend: React + TypeScript + TailwindCSS + Zustand
- Desktop Framework: Electron
- Backend: Python Flask server with FFmpeg
- Conversion Engine: FFmpeg (media) + document libraries (PyPDF2, python-docx, etc.)
┌─────────────────────────────────────────────────────┐
│ Electron Main Process │
│ - Window Management │
│ - Launches Python Server on startup │
│ - IPC Handler (forwards to Python HTTP API) │
└───────────────────┬─────────────────────────────────┘
│
┌───────────┼───────────┐
│ │
▼ ▼
┌──────────────┐ ┌─────────────────────┐
│ Renderer │ │ Python Server │
│ (React) │◄────►│ (Flask) │
│ │ HTTP │ │
│ - Drag/Drop │ │ - /convert │
│ - Progress │◄────►│ - /batch_convert │
│ - History │ SSE │ - /formats │
│ - Settings │ │ - /progress (SSE) │
└──────────────┘ └─────┬───────────────┘
│
┌───────┼───────┐
▼ ▼
┌────────────┐ ┌──────────────┐
│ FFmpeg │ │ Conversion │
│ (bundled) │ │ Libraries │
│ │ │ - PyPDF2 │
└────────────┘ │ - python-docx│
│ - openpyxl │
└──────────────┘
- Video: MP4, AVI, MKV, MOV, WebM
- Audio: MP3, WAV, OGG, FLAC, M4A
- Images: JPG, PNG, GIF, BMP, WebP
- Special conversions:
- Audio → PNG (waveform visualization)
- Video → PNG (first frame extraction)
- PDF → DOCX, TXT
- Word (DOCX) → PDF, TXT
- Excel (XLSX) → CSV, PDF
- PowerPoint (PPTX) → PDF
- Text → PDF, DOCX
- Modern, intuitive interface with TailwindCSS
- Drag-and-drop file upload
- Real-time progress tracking with Server-Sent Events
- Batch folder conversion
- Output path selection
- Conversion history
- Settings panel
Before you begin, ensure you have the following installed:
- Node.js 14.x or higher (Download)
- Python 3.6+ (Download)
- FFmpeg (Download)
- Windows: Download from gyan.dev or use
winget install FFmpeg - macOS:
brew install ffmpeg - Linux:
sudo apt-get install ffmpegorsudo yum install ffmpeg
- Windows: Download from gyan.dev or use
- LibreOffice (for DOCX/XLSX/PPTX → PDF conversion)
- Download from libreoffice.org
git clone https://github.com/Novapool/unicon.git
cd uniconnpm installpip install -r requirements.txtOr create a virtual environment (recommended):
# Create virtual environment
python -m venv venv
# Activate it
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtStart the Electron app (this will also start the Python server):
npm startThe application will:
- Start the Python Flask server on
http://localhost:5000 - Launch the Electron window with hot-reload enabled
- Connect the frontend to the backend via HTTP/SSE
First, bundle the Python server with PyInstaller:
cd conversion_functions
# Windows:
build_server.bat
# macOS/Linux:
chmod +x build_server.sh
./build_server.shThis creates conversion_functions/dist/unicon-server/ with the bundled Python executable.
You need to include FFmpeg binaries for all platforms you're building for:
# Create ffmpeg directory in project root
mkdir -p ffmpeg
# Download static FFmpeg builds:
# Windows: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
# macOS: https://evermeet.cx/ffmpeg/
# Linux: https://johnvansickle.com/ffmpeg/Extract the ffmpeg executable (and ffmpeg.exe for Windows) into the ffmpeg/ folder.
npm run packageThis will:
- Build the TypeScript main and renderer processes
- Bundle the Python server from
conversion_functions/dist/ - Include FFmpeg binaries from
ffmpeg/ - Create platform-specific installers in
release/build/
# Build for current platform
npm run package
# Build for specific platform (requires platform-specific tools)
npm run package -- --mac
npm run package -- --win
npm run package -- --linuxunicon/
├── src/
│ ├── main/ # Electron main process
│ │ ├── main.ts # Main process entry, Flask server launcher
│ │ ├── preload.ts # IPC bridge with typed API
│ │ └── menu.ts # Application menu
│ ├── renderer/ # React frontend
│ │ ├── App.tsx # Main app component
│ │ ├── store/ # Zustand state management
│ │ │ └── conversionStore.ts
│ │ └── styles/ # Global styles with Tailwind
│ │ └── global.css
│ └── types/ # TypeScript type definitions
│ └── ipc.ts # IPC interface types
│
├── conversion_functions/ # Python backend
│ ├── server.py # Flask API server
│ ├── media_conversion.py # FFmpeg-based media conversion
│ ├── document_conversion.py # Document conversion logic
│ ├── server.spec # PyInstaller configuration
│ ├── build_server.sh # Build script (macOS/Linux)
│ └── build_server.bat # Build script (Windows)
│
├── tests/ # Python tests
│ └── test_conversion_functions.py
│
├── requirements.txt # Python dependencies
├── package.json # Node.js dependencies & scripts
├── tailwind.config.js # TailwindCSS configuration
├── postcss.config.js # PostCSS configuration
└── README.md # This file
FFMPEG_PATH: Path to FFmpeg binary (auto-detected if in PATH)UNICON_PORT: Port for Python Flask server (default: 5000)
See package.json → build section for electron-builder settings.
Key configuration:
extraResources: Bundles Python server and FFmpeg binaries- Platform-specific settings for macOS, Windows, Linux
npm test# Requires FFmpeg installed
pytest
# Run specific test file
pytest tests/test_conversion_functions.py
# Run with verbose output
pytest -vIssue: Application shows "Server Error" dialog on startup.
Solutions:
- Check Python is installed:
python --versionorpython3 --version - Verify dependencies:
pip install -r requirements.txt - Check logs in Electron console (Ctrl+Shift+I)
Issue: Conversions fail with "FFmpeg not found" error.
Solutions:
- Install FFmpeg: See Prerequisites
- Verify installation:
ffmpeg -version - If bundled FFmpeg not working, set
FFMPEG_PATHenvironment variable
Issue: DOCX/XLSX/PPTX → PDF conversion fails.
Solutions:
- Install LibreOffice (required for Office → PDF)
- Some document conversions require
docx2pdflibrary which depends on Microsoft Word (Windows) or LibreOffice (Linux/Mac)
Issue: npm run package fails.
Solutions:
- Ensure Python server is built first:
cd conversion_functions && ./build_server.sh - Ensure FFmpeg binaries are in
ffmpeg/folder - Check
conversion_functions/dist/unicon-server/exists with compiled Python server - Run
npm run buildfirst to check for TypeScript errors
The development environment supports hot reload for both frontend and backend:
- Frontend: Webpack Dev Server with React Fast Refresh
- Backend: Restart the Python server manually or use
electronmon
Frontend:
- Open DevTools: Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (Mac)
- React DevTools extension is automatically installed in development
Backend:
- Python logs are visible in Electron main process console
- Add
logging.info()statements in Python code - Check Flask server logs:
conversion_functions/server.log
Main Process:
- Use
console.log()orelectron-logfor logging - Logs visible in terminal where you ran
npm start
- Media formats: Add to
get_possible_formats()inmedia_conversion.py - Document formats: Add converter function in
document_conversion.pyand updateconversion_map - Update types: Add format to TypeScript interfaces in
src/types/ipc.ts
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes and test thoroughly
- Run linting:
npm run lint:fix - Run tests:
npm testandpytest - Commit with descriptive messages
- Push and create a Pull Request
MIT License - see LICENSE file for details.
- Built with Electron React Boilerplate
- FFmpeg for media conversion
- Flask for Python backend
- TailwindCSS for UI styling
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: laitho4325@gmail.com
Made with ❤️ by Laith Assaf