modules.addons.convert
Audio File Converter using FFmpeg
A flexible audio conversion tool that supports multiple input formats and provides various conversion options including output format selection, metadata preservation, bitrate adjustment, and bit depth selection.
Functions
|
Main function for the audio converter. |
Parse command line arguments. |
Classes
|
Audio file converter using FFmpeg to convert between various audio formats with options for metadata preservation, bitrate, bit depth, and other settings. |
- class modules.addons.convert.AudioConverter(options: Dict[str, Any])[source]
Bases:
object
Audio file converter using FFmpeg to convert between various audio formats with options for metadata preservation, bitrate, bit depth, and other settings.
Initialize the AudioConverter with the specified options.
- Parameters:
options (dict) – Dictionary of conversion options
- __init__(options: Dict[str, Any])[source]
Initialize the AudioConverter with the specified options.
- Parameters:
options (dict) – Dictionary of conversion options
- get_file_info(filepath: str) Dict[str, Any] [source]
Get detailed information about an audio file using FFprobe.
- display_file_info(filepath: str)[source]
Display detailed information about an audio file.
- Parameters:
filepath (str) – Path to the audio file
- build_ffmpeg_command(input_file: str, output_file: str) List[str] [source]
Build the FFmpeg command for audio conversion based on the options.
- convert_file(input_file: str, output_dir: str | None = None) bool [source]
Convert a single audio file to the specified format.