|
| 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 | +``` |
0 commit comments