Type Definitions
ConvertAudioOptions
Options for configuring the audio conversion.
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
inputOptions |
Array.<string> |
<optional> |
[] | The input options for the conversion. |
outputOptions |
Array.<string> |
<optional> |
[] | The output options for the conversion. |
format |
string |
<optional> |
'mp3' | The desired output format (e.g., |
bitrate |
string | number |
<optional> |
128 | The audio bitrate (e.g., |
frequency |
number |
<optional> |
44100 | The audio sampling frequency in Hz. |
codec |
string |
<optional> |
'libmp3lame' | The audio codec to use (e.g., |
channels |
number |
<optional> |
2 | The number of audio channels ( |
deleteOld |
boolean |
<optional> |
false | Whether to delete the original file after conversion. |
quiet |
boolean |
<optional> |
false | Whether to suppress the conversion progress and error message or not. |
- Since:
- 1.0.0
- Source:
- See:
DownloadOptions
An object to configure the download process on
and singleDownload
functions.batchDownload
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
cwd |
string |
<optional> |
'.' | The current working directory. If not specified, defaults to the current directory. |
outDir |
string |
<optional> |
'.' | The output directory where downloaded files will be saved. If not specified, defaults to the current directory. |
convertAudio |
boolean |
<optional> |
true | Whether to convert the downloaded audio to a specified
format. Defaults to |
converterOptions |
ConvertAudioOptions |
<optional> |
audiconv.defaultOptions | Options for the audio converter. If not specified, defaults to |
quiet |
boolean |
<optional> |
false | Whether to suppress console output. Defaults to |
YTMP3Config
A typedef representating the configuration object containing options to configure the both download and audio conversion process.
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
downloadOptions |
DownloadOptions | Options related to the download process. |
|
audioConverterOptions |
ConvertAudioOptions |
<optional> |
Options related to the audio conversion process, if not defined in
|