aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-31 21:00:46 +0200
committerMattias Andrée <m@maandree.se>2025-03-31 21:00:46 +0200
commit2a7badfc6fd7c4495ce0397e191ee5fd66c8a54d (patch)
tree88bbe702d82ec8fea502f88d9c4a1daf7dc974c8
parentPrefix filenames for ffmpeg/ffprobe with file:, and tell when - is not supported (diff)
downloadffutils-master.tar.gz
ffutils-master.tar.bz2
ffutils-master.tar.xz
Fix previous commitHEAD1.0.3master
Signed-off-by: Mattias Andrée <m@maandree.se>
-rwxr-xr-xffextract-audio4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffextract-audio b/ffextract-audio
index 7af0f43..2611483 100755
--- a/ffextract-audio
+++ b/ffextract-audio
@@ -55,7 +55,7 @@ fi
getext () {
probed_file="$1"
- if test ! "${probed_file}" -; then
+ if test ! "${probed_file}" = -; then
probed_file="file:${probed_file}"
fi
ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 -- "${probed_file}"
@@ -69,7 +69,7 @@ extract () {
printf '\033[1m%s\033[m\n' "Extracting audio track from ${1}" >&2
printf '\033[1m%s\033[m\n' "and storing as ${2}" >&2
in_file_prefixed="${1}"
- if test ! "${in_file_prefixed}" -; then
+ if test ! "${in_file_prefixed}" = -; then
in_file_prefixed="file:${in_file_prefixed}"
fi
if ffmpeg -i "${in_file_prefixed}" -vn -acodec copy ${ffmpeg_flag_y} -- "file:${2}"; then