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