updated readme and move of "crop-detect"

This commit is contained in:
2025-07-20 10:05:20 +02:00
parent 33767e1f54
commit a71a07e2d2
2 changed files with 10 additions and 11 deletions

View File

@@ -16,31 +16,30 @@ Ensure the following command-line tools are installed and available in your syst
The scripts are designed to be run in sequence. They create and use local directories (`cuts`, `segments`, `temp`) to store intermediate files. The scripts are designed to be run in sequence. They create and use local directories (`cuts`, `segments`, `temp`) to store intermediate files.
### 1. (Optional) Detect Crop ### 1. Cut Video into Scenes
If your video has black bars, you can use `cropdetect.py` to find the correct crop values.
```bash
python cropdetect.py "path/to/your/video.mkv"
```
### 2. Cut Video into Scenes
Use [`scene_cutter.py`](scene_cutter.py) to analyze the video, detect scene changes, and split the source into lossless segments in the `cuts/` directory. Use [`scene_cutter.py`](scene_cutter.py) to analyze the video, detect scene changes, and split the source into lossless segments in the `cuts/` directory.
```bash ```bash
python scene_cutter.py "path/to/your/video.mkv" python scene_cutter.py "path/to/your/video.mkv"
``` ```
### 3. Encode Segments If your video has black bars, you can use the `--autocrop` flag to automatically detect and apply the correct crop values during this process.
```bash
python scene_cutter.py "path/to/your/video.mkv" --autocrop
```
### 2. Encode Segments
Use [`static_encoder.py`](static_encoder.py) to encode all segments from the `cuts/` directory with a single, fixed CRF value. Encoded files will be placed in the `segments/` directory. Use [`static_encoder.py`](static_encoder.py) to encode all segments from the `cuts/` directory with a single, fixed CRF value. Encoded files will be placed in the `segments/` directory.
```bash ```bash
python static_encoder.py --crf 27 python static_encoder.py --crf 27
``` ```
### 4. Mux Final Video ### 3. Mux Final Video
Use [`segment_muxer.py`](segment_muxer.py) to combine all the encoded `.mkv` files from the `segments/` directory into a single output file. Use [`segment_muxer.py`](segment_muxer.py) to combine all the encoded `.mkv` files from the `segments/` directory into a single output file.
```bash ```bash
python segment_muxer.py --cleanup python segment_muxer.py --cleanup
``` ```
Using the `--cleanup` flag will automatically remove the `cuts/` and `segments/` directories Using the `--cleanup` flag will automatically remove the `cuts/` and `segments/` directories upon successful completion of the muxing process.