aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-12-02 16:13:58 +0100
committerMattias Andrée <m@maandree.se>2025-12-02 16:13:58 +0100
commit28e601e5a2a647968d77db1bb0144004d1246584 (patch)
tree3f1451aaeb48f13ad92a2ce325ff6944297f567e
parentFix previous commit (diff)
downloadffutils-1.0.4.tar.gz
ffutils-1.0.4.tar.bz2
ffutils-1.0.4.tar.xz
ffextract-audio: use .ogg for vorbis filesHEAD1.0.4master
Signed-off-by: Mattias Andrée <m@maandree.se>
-rwxr-xr-xffextract-audio10
1 files changed, 9 insertions, 1 deletions
diff --git a/ffextract-audio b/ffextract-audio
index 2611483..70ea029 100755
--- a/ffextract-audio
+++ b/ffextract-audio
@@ -53,7 +53,7 @@ else
fi
fi
-getext () {
+getaudioformat () {
probed_file="$1"
if test ! "${probed_file}" = -; then
probed_file="file:${probed_file}"
@@ -61,6 +61,14 @@ getext () {
ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 -- "${probed_file}"
}
+getext () {
+ ext="$(getaudioformat "$@")"
+ if test "${ext}" = "vorbis"; then
+ ext="ogg"
+ fi
+ printf '%s\n' "${ext}"
+}
+
removeext () {
printf '%s\0' "$1" | tr '\0\n' '\n\0' | sed 's/\.[^.]*$//' | tr '\0' '\n'
}