diff options
| author | Anton Bobov <anton@bobov.name> | 2023-08-29 14:44:07 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2023-08-29 14:44:07 +0500 |
| commit | 14325e1964c5939e5139297ce5897f929dc1e025 (patch) | |
| tree | a39db488ee3aef27ca1c07e877fecc302bdf5554 /2flac | |
| parent | 7fb714fadb768401b251a7584d76f216acf5943a (diff) | |
Add scripts
Diffstat (limited to '2flac')
| -rwxr-xr-x | 2flac | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#!/bin/bash +# Convert APE (Monkey Audio Format) to FLAC using ffmpeg. + +set -euo pipefail + +usage() { + echo "Usage: $(basename "$0") [input file]..." + echo "Converts input files into FLAC format." + exit 0 +} + +main() { + if [ $# = 0 ]; then + usage + fi + for input in "$@"; do + if [ -f "$input" ]; then + output="${input%.*}.flac" + ffmpeg -loglevel error -hide_banner -i "$input" -acodec flac "$output" + fi + done +} + +main "$@" |
