Metadata-Version: 2.4
Name: resolveconverter
Version: 1.1.0
Summary: Batch-convert MP4 <-> MOV with FFmpeg: MP4 (H.264/H.265/AAC) to DaVinci Resolve-compatible MOV (MJPEG + PCM 16-bit), and back to H.264/AAC MP4 — 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 video both ways between MP4 and MOV** — a native PyQt6 desktop
app for Linux:

- **MP4 → MOV** — turn standard `H.264/H.265 + AAC` videos into DaVinci-safe
  `MJPEG video + PCM 16-bit audio` inside a QuickTime `.mov`, so the **free tier
  of DaVinci Resolve** can import them.
- **MOV → MP4** — convert those DaVinci-safe `.mov`s back into compact, broadly
  playable `H.264 + AAC` `.mp4` files for normal playback and sharing.

```bash
# forward: into DaVinci Resolve
ffmpeg -i input.mp4 -c:v mjpeg -q:v 3 -c:a pcm_s16le output.mov
# reverse: back to a shareable file
ffmpeg -i input.mov -c:v libx264 -crf 18 -c:a aac output.mp4
```

| Direction | Video | Audio | Why |
|---|---|---|---|
| MP4 → MOV | **MJPEG** (`-q:v 3`) | **PCM s16le** | DaVinci free reads both natively |
| MOV → MP4 | **H.264** (`-crf 18`) | **AAC 192k** | compact, plays anywhere |

> DaVinci Resolve's free version on Linux cannot decode H.264/H.265 — the codecs
> almost every phone / camera / recorder produces. Drop in a folder of `.mp4`s to
> get them into Resolve, then send the finished `.mov`s back through the app for
> shareable `.mp4`s again.

## Features

- Add `.mp4` and `.mov` files — batch, individually, or **mixed in one queue**.
  Each file's direction is picked from its own format (`.mp4` → `.mov`,
  `.mov` → `.mp4`), so there's nothing to configure
- Add via buttons, a whole folder, or **drag & drop**
- 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` / `.mov` files onto the
   window) — a mixed list is fine, each file converts to its counterpart.
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 output file 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

- **Forward output is big.** MJPEG is a JPEG per frame and PCM is uncompressed —
  a DaVinci-safe `.mov` is typically **5–10× its `.mp4` source**. Import straight
  to Resolve, edit, then use the **MOV → MP4** pass to get a compact, shareable
  file back.
- **Reverse output is small.** `libx264` + AAC shrink that MJPEG/PCM `.mov`
  dramatically — expect a file close to the original `.mp4`'s size.
- Encoding defaults live in the `RESOLVE_MODE` / `PLAYBACK_MODE` objects
  (`encode_args`) in `src/resolve_converter/__init__.py`. Forward quality is
  `-q:v 3` (2 = better, 4+ = smaller); reverse is libx264 `-crf 18` (lower =
  better quality, larger file) with `-movflags +faststart` for streaming.
- Files whose output already exists are overwritten by default — uncheck
  **Overwrite existing files** to skip instead.

## License

MIT — see [LICENSE](LICENSE).
