Skip to content

Commit 3faf30e

Browse files
updated Readme
1 parent 6323e54 commit 3faf30e

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Audio-In-Video-Detector AIVD
22

3-
> Developed by [Davis_Software](https://github.com/Davis-Software) © 2023
3+
> Developed by [Davis_Software](https://github.com/Davis-Software) © 2024
44
55
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Davis-Software/aivd?style=for-the-badge)
66
![GitHub issues](https://img.shields.io/github/issues-raw/Davis-Software/aivd?style=for-the-badge)
@@ -22,14 +22,44 @@ Thus, it can for example be used to find the intro of a tv show in its episodes.
2222

2323
### Usage
2424
```shell
25-
main.py [-h] --find-offset-of <audio file> [--within <folder>]
25+
aivd [OPTIONS] INPUT_FILE DIRECTORY
26+
27+
Find the INPUT_FILE audio file in the specified video or audio files in a
28+
folder and return the time index.
29+
30+
INPUT_FILE: The audio file to search for.
31+
DIRECTORY: The directory with the video or audio files to search in.
32+
```
33+
34+
| Option | Data Type | Description | Default |
35+
|---------------------|----------------------|-------------------------------------------------------------------------------------|------------------------------------------------|
36+
| `-r`, `--recursive` | flag | Search recursively in the specified directory. | |
37+
| `-e`, `--extension` | `string` | The extension of the video/audio files to search in. Can be a comma separated list. | `mp4,mkv,avi,mov,wmv,mp3,wav,flac,ogg,m4a,wma` |
38+
| `-x`, `--exclude` | `string` | Exclude the specified extension from the search. Can be a comma separated list. | `""` |
39+
| `-t`, `--time` | `integer` | How many seconds of the input audio file to search for. | `-1` (meaning the entire file) |
40+
| `-w`, `--window` | `integer` | The window size in seconds to search for the audio file. | `60` |
41+
| `-f`, `--format` | `json \| txt \| raw` | The output format. | `"txt"` |
42+
| `-c`, `--threads` | `integer` | The number of CPU threads to use. | half of system cpu threads |
43+
| `--ffmpeg` | `string` | The path to the ffmpeg executable. | from system path |
44+
| `--no-clean` | flag | Do not clean up temporary files. | |
45+
| `--silent` | flag | Do not print anything but the final output to the console. | |
46+
| `--debug` | flag | Print debug information to the console. | |
47+
| `--dry-run` | flag | Do not run the program, just print the parameters. | |
48+
| `--version` | flag | Print the version number and exit. | |
49+
| `--legacy` | flag | Use the legacy cli. | |
50+
| `--help` | flag | Show help message and exit. | |
51+
52+
### Legacy CLI
53+
```shell
54+
aivd --legacy [-h] --find-offset-of <audio file> [--within <folder>]
2655
[--extension <file extension>] [--recursive <boolean>]
2756
[--extension-skip <file extension>] [--window <seconds>]
2857
[--log-level <level>] [--raw <boolean>] [--ffmpeg <path>]
2958
```
3059

3160
| Option | Type | Description | Default | Required |
3261
|------------------------------------|-----------|-------------------------------------------------|---------------------|----------|
62+
| `--legacy` | flag | Needed to use the legacy cli | | yes |
3363
| `-h` or `--help` | flag | Display the help dialog | | no |
3464
| `--find-offset-of <audio file>` | `string` | Audio file to search for | | yes |
3565
| `--within <folder>` | `string` | Folder path with video files to search in | `"."` | no |

main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from utils import os_helpers
1010
from utils.logger import Logger
1111

12-
__version__ = "0.1.0"
12+
__version__ = "2.1.3"
1313

1414
_PERMITTED_EXTENSIONS = ["mp4", "mkv", "avi", "mov", "wmv", "mp3", "wav", "flac", "ogg", "m4a", "wma"]
1515

@@ -38,8 +38,8 @@ def load_legacy(ctx, _param, value):
3838
f"Default is '{','.join(_PERMITTED_EXTENSIONS)}'. Can be a comma separated list.")
3939
@click.option("-x", "--exclude", type=str, default="", help="Exclude the specified extension from the search. "
4040
"Default is no exclusions. Can be a comma separated list.")
41-
@click.option("-t", "--time", "time_", type=int, default=-1, help="How many seconds of the input audio file"
42-
"to search for. Default is the whole audio file.")
41+
@click.option("-t", "--time", "time_", type=int, default=-1, help="How many seconds of the input audio file "
42+
"to search for. Default is the whole audio file.")
4343
@click.option("-w", "--window", type=int, default=60, help="The window size in seconds to search for the audio file. "
4444
"Default is 60 seconds.")
4545
@click.option("-f", "--format", "format_", type=click.Choice(["json", "txt", "raw"]), default="txt",

0 commit comments

Comments
 (0)