Vorbis metadata:
* soxi is faster than ogginfo * soxi provides bit-depth (as Precision)
This commit is contained in:
parent
e7a2c00f2b
commit
2dffcdb8b8
9
atom
9
atom
@ -201,11 +201,18 @@ if ! which ogginfo >/dev/null
|
|||||||
then
|
then
|
||||||
echo "[WARNING] Tool ogginfo (from vorbis-tools) is not" \
|
echo "[WARNING] Tool ogginfo (from vorbis-tools) is not" \
|
||||||
"installed or not in PATH
|
"installed or not in PATH
|
||||||
Vorbis metadata disabled
|
|
||||||
WebM metadata disabled" >&2
|
WebM metadata disabled" >&2
|
||||||
disableogginfo=1
|
disableogginfo=1
|
||||||
(( sanitywarn++ ))
|
(( sanitywarn++ ))
|
||||||
fi
|
fi
|
||||||
|
if ! which soxi >/dev/null
|
||||||
|
then
|
||||||
|
echo "[WARNING] Tool soxi (from sox) is not" \
|
||||||
|
"installed or not in PATH
|
||||||
|
Vorbis metadata disabled" >&2
|
||||||
|
disablesoxi=1
|
||||||
|
(( sanitywarn++ ))
|
||||||
|
fi
|
||||||
if (( oggencneeded )) && ! which oggenc >/dev/null
|
if (( oggencneeded )) && ! which oggenc >/dev/null
|
||||||
then
|
then
|
||||||
echo "[WARNING] Tool oggenc (from vorbis-tools) is not" \
|
echo "[WARNING] Tool oggenc (from vorbis-tools) is not" \
|
||||||
|
|||||||
@ -12,8 +12,8 @@ getTags() {
|
|||||||
(( disableopusinfo )) && unset type
|
(( disableopusinfo )) && unset type
|
||||||
;;
|
;;
|
||||||
application/ogg*)
|
application/ogg*)
|
||||||
type=Ogg
|
type=soxi
|
||||||
(( disableogginfo )) && unset type
|
(( disablesoxi )) && unset type
|
||||||
;;
|
;;
|
||||||
audio/x-flac)
|
audio/x-flac)
|
||||||
type=FLAC
|
type=FLAC
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
getInfosOgg_version='Ogg-2'
|
getInfosSoxi_version='soxi-1'
|
||||||
tagreaders+=( "$getInfosOgg_version" )
|
tagreaders+=( "$getInfosSoxi_version" )
|
||||||
getInfos::Ogg() {
|
getInfos::soxi() {
|
||||||
tagreader="$getInfosOgg_version"
|
tagreader="$getInfosSoxi_version"
|
||||||
infos=$(
|
infos=$(
|
||||||
ogginfo "$sourcepath/$filename" \
|
soxi "$sourcepath/$filename"
|
||||||
| sed 's/\t//'
|
|
||||||
)
|
)
|
||||||
albumartist=$(gettag albumartist)
|
albumartist=$(gettag albumartist)
|
||||||
album=$(gettag album)
|
album=$(gettag album)
|
||||||
@ -22,9 +21,10 @@ getInfos::Ogg() {
|
|||||||
tracknum="$tracknum/$tracktotal"
|
tracknum="$tracknum/$tracktotal"
|
||||||
fi
|
fi
|
||||||
year=$(gettag date)
|
year=$(gettag date)
|
||||||
infos="${infos//: /=}"
|
infos="${infos//*( ): /=}"
|
||||||
rate=$(gettag rate|head -n1)
|
rate=$(gettag 'sample rate')
|
||||||
channels=$(gettag channels|head -n1)
|
channels=$(gettag channels)
|
||||||
bitrate=$(gettag 'average bitrate')
|
bitrate=$(gettag 'bit rate')
|
||||||
bitrate=${bitrate%%,*}
|
bitrate=${bitrate%%k}
|
||||||
|
bitdepth=$(gettag precision)
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user