Add USAGE.md explaining how to use the script
This commit is contained in:
77
USAGE.md
Normal file
77
USAGE.md
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# How to Use the Video Converter (Current State)
|
||||||
|
|
||||||
|
This document outlines the steps required to set up and run the Video Converter script in its current development state.
|
||||||
|
|
||||||
|
## 1. Prerequisites
|
||||||
|
|
||||||
|
Before running the script, ensure you have the following installed on your **Arch Linux / CachyOS** system:
|
||||||
|
|
||||||
|
* **Python 3:** The script is written in Python 3.
|
||||||
|
* **`ffmpeg-full`:** A version of `ffmpeg` compiled with DNxHD/HR support.
|
||||||
|
* Install from AUR: `yay -S ffmpeg-full` (or your preferred AUR helper).
|
||||||
|
* **Note:** If you use OBS Studio, refer to the [README.md](README.md) for potential dependency workarounds.
|
||||||
|
|
||||||
|
## 2. Setup
|
||||||
|
|
||||||
|
1. **Clone the Repository:**
|
||||||
|
```bash
|
||||||
|
git clone https://gitea.ramforth.net/ramforth/video-converter.git
|
||||||
|
cd video-converter
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Create and Activate a Python Virtual Environment:**
|
||||||
|
It's highly recommended to use a virtual environment to manage Python dependencies.
|
||||||
|
```bash
|
||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Install Python Dependencies:**
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. Running the Converter
|
||||||
|
|
||||||
|
Once the setup is complete, you can run the converter script.
|
||||||
|
|
||||||
|
### Basic Usage
|
||||||
|
|
||||||
|
The script takes an input video file and an optional output directory.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m src.main <path_to_your_input_video_file> [-o <path_to_output_directory>]
|
||||||
|
```
|
||||||
|
|
||||||
|
* Replace `<path_to_your_input_video_file>` with the absolute or relative path to the video file you want to convert.
|
||||||
|
* Replace `<path_to_output_directory>` with the desired directory for the converted file. If omitted, the converted file will be saved in the same directory as the input file.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Convert a video and save it in the same directory
|
||||||
|
python -m src.main /home/user/Videos/my_original_video.mp4
|
||||||
|
|
||||||
|
# Convert a video and save it to a specific output directory
|
||||||
|
python -m src.main /home/user/Videos/my_original_video.mp4 -o /home/user/ConvertedVideos
|
||||||
|
```
|
||||||
|
|
||||||
|
### Output File Naming
|
||||||
|
|
||||||
|
* If an output directory is specified, the converted file will be named `my_original_video_DR_compatible.mov`.
|
||||||
|
* If no output directory is specified (i.e., the output is in the same directory as the input), the converted file will be named `recoded_my_original_video_DR_compatible.mov`.
|
||||||
|
|
||||||
|
## 4. What it Does
|
||||||
|
|
||||||
|
The script converts your input video into a DaVinci Resolve-compatible format using `ffmpeg`:
|
||||||
|
|
||||||
|
* **Video Codec:** `dnxhd` (DNxHD/HR)
|
||||||
|
* **1080p (<=1080 height):** `dnxhr_sq` (Standard Quality)
|
||||||
|
* **1440p (>1080 height):** `dnxhr_hq` (High Quality)
|
||||||
|
* **Audio Codec:** `pcm_s16le` (Linear PCM)
|
||||||
|
* **Container:** `.mov` (QuickTime)
|
||||||
|
|
||||||
|
This ensures optimal compatibility and performance for editing in DaVinci Resolve (Free Linux version).
|
||||||
|
|
||||||
|
---
|
||||||
|
*Document generated by Gemini CLI Agent.*
|
||||||
Reference in New Issue
Block a user