Metadata-Version: 2.4
Name: resolveconverter
Version: 1.0.0
Summary: Batch-convert MP4 (H.264/H.265/AAC) to DaVinci Resolve-compatible MOV (MJPEG video + PCM 16-bit audio) for Linux
Author: Shrijan
License-Expression: MIT
Project-URL: Homepage, https://github.com/CloudSnapManage/resolveconverter
Project-URL: Repository, https://github.com/CloudSnapManage/resolveconverter
Keywords: davinci,resolve,video,converter,ffmpeg,pyqt6,mp4,mov,mjpeg,linux,wayland
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Multimedia :: Video :: Conversion
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyQt6>=6.4
Dynamic: license-file

# Resolve Converter

**Batch-convert MP4 → DaVinci Resolve-compatible MOV** — a native PyQt6 desktop
app for Linux that turns standard `H.264/H.265 + AAC` videos into `MJPEG video +
PCM 16-bit audio` inside a QuickTime `.mov` container, so the **free tier of
DaVinci Resolve** can import them.

```bash
ffmpeg -i input.mp4 -c:v mjpeg -q:v 3 -c:a pcm_s16le output.mov
```

| Stream | Codec | Why |
|---|---|---|
| Video | **MJPEG** (`-q:v 3`, near-lossless JPEG) | DaVinci free reads it natively |
| Audio | **PCM s16le** (uncompressed, little-endian) | DaVinci free reads it natively |
| Container | **QuickTime `.mov`** | DaVinci free reads it natively |

> DaVinci Resolve's free version on Linux cannot decode H.264/H.265 — the codecs
> almost every phone / camera / recorder produces. This app removes that friction
> with a folder-drop-and-go batch queue.

## Features

- Add individual `.mp4` files, a whole folder, or just **drag & drop** them in
- Queue table with per-file status and live progress bars
- Runs up to **2 ffmpeg jobs in parallel** without ever freezing the UI
- Global progress weighted by file size, plus a live ffmpeg console pane
- Dark, distraction-free theme that fits Hyprland/Omarchy setups

## Install

```bash
pip install resolve-converter          # or: pipx install resolve-converter
```

**Runtime dependency:** `ffmpeg` and `ffprobe` on your PATH.

```bash
sudo pacman -S ffmpeg                  # Arch / Omarchy
sudo apt install ffmpeg                # Debian / Ubuntu
sudo dnf install ffmpeg                # Fedora
```

### Register with your desktop launcher

```bash
resolve-converter --install-desktop-entry
```

This installs the `.desktop` entry and icon into `~/.local/share/...` and
refreshes the desktop database, so the app shows up in Quickshell, GNOME, KDE,
etc. Re-run it after moving to a different Python environment.

## Usage

1. **＋ Add Files…** or **＋ Add Folder…** (or drag `.mp4`s onto the window)
2. **Output** — leave blank to write each file into a `Converted/` subfolder next
   to its source; or pick one destination folder for everything.
3. **▶ Start Conversion** — up to **2 parallel ffmpeg jobs**; the UI never freezes.
4. **■ Stop** terminates running jobs and marks the rest as cancelled.

Status colors: `Pending` gray · `Processing` cyan · `Completed` green ·
`Failed` red · `Cancelled` amber · `Skipped` dim (when "Overwrite existing
files" is off and the `.mov` already exists).

## Development

```bash
git clone <your-repo-url> && cd resolve-converter
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
python -m unittest discover -s tests
```

## Building & publishing

```bash
pip install build twine
python -m build
python -m twine check dist/*
python -m twine upload --repository testpypi dist/*   # try TestPyPI first
python -m twine upload dist/*                          # then PyPI
```

## Notes & caveats

- **Files get big.** MJPEG is a JPEG per frame and PCM is uncompressed — output
  is typically **5–10× the input size**. This is the price of DaVinci-free
  compatibility; import straight to Resolve, then export your edit.
- Quality of the video pass is set by `-q:v 3` (2 = better, 4+ = smaller).
  Edit `ConvertWorker._convert` in `src/resolve_converter/__init__.py` to change
  it.
- Files whose output already exists are overwritten by default — uncheck
  **Overwrite existing files** to skip instead.

## License

MIT — see [LICENSE](LICENSE).
