mirror of
https://github.com/tkmxqrdxddd/davinci-video-converter
synced 2026-03-29 15:25:33 +02:00
759d81669cf404863f2e8e46b66d5d91bafa7b9e
DaVinci Video Converter
A command-line video conversion tool optimized for DaVinci Resolve workflows.
Features
- Convert videos using various codecs (H.264, H.265, ProRes)
- Quality presets for different use cases
- CRF-based quality control
- Verbose output for debugging
Development Environment
DevContainer (Podman)
This project includes a DevContainer configuration for use with Podman. To use it:
- Install the Dev Containers extension in VS Code
- Configure VS Code to use Podman:
- Set
remote.containers.defaultDockerCommandtopodmanin VS Code settings
- Set
- Reopen the project in the container (Ctrl+Shift+P → "Dev Containers: Reopen in Container")
The container includes all necessary dependencies (g++, make, ffmpeg).
Nix Shell
For Nix users, enter the development shell:
nix-shell
This provides a development environment with g++, make, and ffmpeg.
Building
Using Make
make
Using build.sh
./build.sh
Clean Build
make clean
Usage
./davinci-video-converter [options] <input> <output>
Options
| Option | Description | Default |
|---|---|---|
-c, --codec <codec> |
Video codec (h264, h265, prores) | h264 |
-q, --quality <qual> |
Quality preset (fast, medium, slow) | medium |
-r, --crf <value> |
CRF value 0-51 | 23 |
-v, --verbose |
Enable verbose output | false |
-h, --help |
Show help message | - |
Examples
Convert with default settings:
./davinci-video-converter input.mp4 output.mp4
Convert with H.265 codec and slow preset:
./davinci-video-converter -c h265 -q slow input.mp4 output.mp4
Convert with custom CRF value:
./davinci-video-converter -r 18 input.mp4 output.mp4
Verbose conversion:
./davinci-video-converter -v input.mp4 output.mp4
Testing
Run the built-in tests:
make test
Installation
sudo make install
Uninstallation
sudo make uninstall
Project Structure
davinci-video-converter/
├── .devcontainer/
│ └── devcontainer.json # DevContainer configuration for Podman
├── src/
│ ├── include/
│ │ ├── config.hpp # Configuration struct definition
│ │ ├── converter.hpp # Converter module interface
│ │ ├── parser.hpp # Argument parser interface
│ │ └── validator.hpp # Validator module interface
│ ├── main.cpp # Main entry point
│ ├── parser.cpp # Argument parsing implementation
│ ├── validator.cpp # Configuration validation
│ └── converter.cpp # FFmpeg command building and execution
├── shell.nix # Nix development environment
├── Makefile # Build configuration
├── build.sh # Build script
└── README.md
License
MIT
Languages
C++
86.1%
Makefile
10.7%
Nix
2.5%
Shell
0.7%