aboutsummaryrefslogtreecommitdiffstats
path: root/ffget-audio-extension
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xffget-audio-extension12
-rw-r--r--ffget-audio-extension.138
2 files changed, 41 insertions, 9 deletions
diff --git a/ffget-audio-extension b/ffget-audio-extension
index 7f0156f..8feca81 100755
--- a/ffget-audio-extension
+++ b/ffget-audio-extension
@@ -8,16 +8,10 @@ usage () {
exit 1
}
-while test "${1::1}" = '-'; do
- if test "${1}" = '--'; then
- shift
- break
- elif test "${1}" = '-'; then
- break
- else
- usage
- fi
+while getopts '' flag; do
+ usage
done
+shift $(( ${OPTIND} - 1 ))
if test ! $# = 1; then
usage
diff --git a/ffget-audio-extension.1 b/ffget-audio-extension.1
new file mode 100644
index 0000000..1aca821
--- /dev/null
+++ b/ffget-audio-extension.1
@@ -0,0 +1,38 @@
+.TH FFGET-AUDIO-EXTENSION 1 FFUTILS
+.SH NAME
+ffget-audio-extension \- get appropriate filename suffix for a audio track in a video file
+
+.SH SYNOPSIS
+.B ffget-audio-extension
+.I in-file
+
+.SH DESCRIPTION
+.B ffget-audio-extension
+prints to standard output the appropriate filename suffix,
+sans period
+.RB ( . ),
+for the audio track in
+.IR in-file ,
+would the audio track be extracted and saved as an audio file.
+
+.SH OPTIONS
+None.
+
+.SH OPERANDS
+.TP
+.I in-file
+Video file to get the audio tracks file format for.
+
+.SH EXIT VALUE
+.TP
+0
+Successful completely.
+.TP
+1
+An error occurred.
+
+.SH SEE ALSO
+.BR ffprobe (1),
+.BR ffextract-audio (1),
+.BR ffextract-frame (1),
+.BR ffuse-frame (1)