--- name: Convert Audio description: Convert audio files between formats through av-club, preserving tags. Works on one file or a whole folder. category: Audio version: 1 mode: script language: typescript inline: ask args: - file_path inputs: file_path: type: string description: An audio file, or a folder to convert recursively. target_format: type: string default: mp3 options: [mp3, m4a, flac, wav, ogg, opus] description: Format to convert to. delete_source: type: boolean default: false description: Delete each source file once its conversion has been written. trigger: - type: file extensions: [mp3, flac, wav, ogg, oga, wma, aac, m4a, opus, aiff, aif, ape, wv, alac, dsf, dff] - type: directory --- # Convert Audio Writes the result **beside the original** — `song.flac` becomes `song.mp3` in the same folder. The original is never modified, and is only deleted if you tick the box. Quality is chosen for the format rather than for size: 320k for mp3, 256k for m4a, 192k for opus, q6 for ogg, and lossless for flac and wav. Tags are carried across. Two things it will not do, both deliberate: - **A file already in the target format is skipped.** Re-encoding mp3 to mp3 loses quality for nothing. - **An existing output is never overwritten.** If `song.mp3` is already there, the file is skipped and said so — you may have edited that one. The work happens in the av-club plugin, so the conversion rules live in one place rather than in this script. Run it inline for a few files, or as a job for a discography.