Skip to content

Commit ba6dfa8

Browse files
committed
📝 Updated application.yml and added README.md for vvd-extractor
Improved the comments in the application.yml file for a clearer understanding of each configuration field, making it easy to configure the application for new users. A README.md file was added to provide detailed information for the Extractor module: its functionalities, prerequisites, and instructions for setting up and running the module. The README also gives an explicit description of the configurations in the application.yml file. This update enhances comprehension and user experience.
1 parent 5699c29 commit ba6dfa8

File tree

2 files changed

+101
-8
lines changed

2 files changed

+101
-8
lines changed

vvd-extractor/README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Extractor
2+
3+
This module, as the final module, mainly takes charge of two things:
4+
5+
1. Extracting and wrapping the audio source from
6+
the downloaded media source from the previous module (`vvd-downloader`).
7+
2. Filling the metadata and embedding the thumbnail of the extracted audio file
8+
with the song information from the `-songInfo` JSON file
9+
10+
The output of this module is only a directory of audio files with metadata and thumbnail embedded.
11+
12+
## Before moving on
13+
14+
If you haven't read the common document yet, please read it first: [Common document](../doc/common%20part.md)
15+
16+
## Additional Prerequisites
17+
18+
Besides the common prerequisites, you also need:
19+
20+
1. Python3 (This module relies on some python codes to perform metadata manipulation)
21+
2. `pip install mutagen` (Run this command to install the mutagen library)
22+
3. FFmpeg (Highly recommended the [yt-dlp's distribution](https://github.com/yt-dlp/FFmpeg-Builds/releases/tag/latest))
23+
4. [MediaInfo CLI](https://mediaarea.net/en/MediaInfo/Download)
24+
25+
## All configurations
26+
27+
All configurations can be found in [`application.yml`](./src/main/resources/application.yml) file.
28+
29+
Below is a copy of the content of the `application.yml` file for your reference. However, make sure to check for any updates to
30+
the file yourself:
31+
32+
```yaml
33+
io: # all fields are required
34+
# this must be pointing to the output directory of the previous module, the task producer module. In another word, the directory specified in the 'io.output-directory' field of the previous module
35+
# can be an absolute path or a relative path from the application current running directory
36+
input-directory:
37+
# the output directory of this module, can be an absolute path or a relative path from the application current running directory
38+
output-directory:
39+
# the error directory of this module, used for reporting errors for debugging, can be an absolute path or a relative path from the application current running directory
40+
error-directory:
41+
42+
config: # configuration
43+
# all fields are required
44+
environment:
45+
# specify the launch CMD of each dependency as a list of string.
46+
# All commands will be executed using the root directory of the project as the current directory
47+
python-launch-cmd:
48+
ffmpeg-launch-cmd:
49+
mediainfo-launch-cmd:
50+
51+
# all fields are required
52+
batch:
53+
# number of files to process in parallel, default is 0 which represents # of cores
54+
batch-size: 0
55+
56+
# all fields are required
57+
process:
58+
# This two fields control the timeout of each process in this module
59+
# Each process in this module should be run in fairly quick time, even a one-hour video should be run in less than 2 minutes
60+
# if you think you need more time, change the setting here
61+
timeout: 5
62+
unit: minutes
63+
64+
# all fields are required
65+
retry:
66+
retry-on-extraction: 2 # number of times to retry on audio extraction error
67+
retry-on-tagging: 2 # number of times to retry on audio file tagging error
68+
69+
# optional fields
70+
current-time:
71+
# The module will modify the last modified time of the audio file to match the order of input tasks.
72+
# Specifically, a task with a smaller order number in the `-task` JSON file will have an earlier last modified time.
73+
# But the module needs a base timestamp to calculate the last modified time of each audio file
74+
# By default, this field is empty means using the time when this app is launched.
75+
# If you want to start from a specific time, change the setting here
76+
# The format is yyyy-MM-dd HH:mm:ss, with the local time zone in this running device
77+
start-from: ""
78+
```

vvd-extractor/src/main/resources/application.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
1-
2-
io: # input, output, and error output dir, can be relative path from the terminal current directory
1+
io: # all fields are required
2+
# this must be pointing to the output directory of the previous module, the task producer module. In another word, the directory specified in the 'io.output-directory' field of the previous module
3+
# can be an absolute path or a relative path from the application current running directory
34
input-directory:
5+
# the output directory of this module, can be an absolute path or a relative path from the application current running directory
46
output-directory:
7+
# the error directory of this module, used for reporting errors for debugging, can be an absolute path or a relative path from the application current running directory
58
error-directory:
69

710
config: # configuration
8-
environment: # all cmd are list of strings, executed with the root directory of the project as the current directory
11+
# all fields are required
12+
environment:
13+
# specify the launch CMD of each dependency as a list of string.
14+
# All commands will be executed using the root directory of the project as the current directory
915
python-launch-cmd:
1016
ffmpeg-launch-cmd:
1117
mediainfo-launch-cmd:
1218

19+
# all fields are required
1320
batch:
14-
batch-size: 0 # number of files to process in parallel, default is 0 which represents # of cores
21+
# number of files to process in parallel, default is 0 which represents # of cores
22+
batch-size: 0
1523

24+
# all fields are required
1625
process:
17-
# each process in this module should be run in fairly quick time, even though for a one-hour video, it should be run in less than 5 minutes
26+
# This two fields control the timeout of each process in this module
27+
# Each process in this module should be run in fairly quick time, even a one-hour video should be run in less than 2 minutes
1828
# if you think you need more time, change the setting here
1929
timeout: 5
2030
unit: minutes
2131

32+
# all fields are required
2233
retry:
2334
retry-on-extraction: 2 # number of times to retry on audio extraction error
2435
retry-on-tagging: 2 # number of times to retry on audio file tagging error
2536

37+
# optional fields
2638
current-time:
27-
# by default, this field is empty means using the time when this app is launched.
28-
# if you want to start from a specific time, change the setting here
29-
# the format is yyyy-MM-dd HH:mm:ss, with your local time zone
39+
# The module will modify the last modified time of the audio file to match the order of input tasks.
40+
# Specifically, a task with a smaller order number in the `-task` JSON file will have an earlier last modified time.
41+
# But the module needs a base timestamp to calculate the last modified time of each audio file
42+
# By default, this field is empty means using the time when this app is launched.
43+
# If you want to start from a specific time, change the setting here
44+
# The format is yyyy-MM-dd HH:mm:ss, with the local time zone in this running device
3045
start-from: ""
3146

3247

0 commit comments

Comments
 (0)