Always try ffmpeg on unknown filetypes
This commit is contained in:
parent
5977629cab
commit
b4afedb70f
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
declare soxtaskid
|
||||
decodeFile() {
|
||||
case "$mimetype" in
|
||||
'video/'*)
|
||||
@ -77,7 +78,23 @@ decodeFile() {
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if (( disablevideo ))
|
||||
then
|
||||
decodeSox
|
||||
else
|
||||
extractAudio
|
||||
if (( ${destinationnormalize["$destination"]}))\
|
||||
|| (
|
||||
[ -n "${destinationfrequency["$destination"]}" ]\
|
||||
&& (( ${rate:-0} != ${destinationfrequency["$destination"]}))\
|
||||
) || (
|
||||
[ -n "${destinationchannels["$destination"]}" ]\
|
||||
&& (( ${channels:-0} != ${destinationchannels["$destination"]} ))
|
||||
)
|
||||
then
|
||||
sox_needed=1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
@ -75,4 +75,5 @@ encodeFile::mp3() {
|
||||
EOInsert
|
||||
)
|
||||
progressSpin
|
||||
soxtaskid=''
|
||||
}
|
||||
|
||||
@ -43,4 +43,5 @@ encodeFile::opus() {
|
||||
EOInsert
|
||||
)
|
||||
progressSpin
|
||||
soxtaskid=''
|
||||
}
|
||||
|
||||
@ -39,4 +39,5 @@ encodeFile::vorbis() {
|
||||
EOInsert
|
||||
)
|
||||
progressSpin
|
||||
soxtaskid=''
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
extractAudio() {
|
||||
tmpfile="${fileid}ffmpeg"
|
||||
tmpfile="${fileid}ffmpeg.wav"
|
||||
commandline=(${ionice}ffmpeg -v 0 -vn -y)
|
||||
commandline+=(-i "$sourcepath/$filename" "$tempdir/$tmpfile.wav")
|
||||
commandline+=(-i "$sourcepath/$filename" "$tempdir/$tmpfile")
|
||||
}
|
||||
|
||||
@ -93,6 +93,30 @@ master() {
|
||||
then
|
||||
sleep 0.1
|
||||
continue
|
||||
elif (( active == 0 && ready == 0 ))
|
||||
then
|
||||
dumpfile=tasks-$(date +%Y%m%d%H%M%S).csv
|
||||
cat <<-EOF
|
||||
|
||||
|
||||
$remaining TASKS LEFT, NONE READY!
|
||||
|
||||
Something went wrong, dumping tasks table to $dumpfile
|
||||
EOF
|
||||
cat >&3 <<-EOSQL
|
||||
.mode csv
|
||||
.headers on
|
||||
.output $dumpfile
|
||||
SELECT * from tasks;
|
||||
.mode list
|
||||
.headers off
|
||||
.output stdout
|
||||
EOSQL
|
||||
closeDatabase
|
||||
echo "Waiting for children to come back home..."
|
||||
wait
|
||||
echo $'\nGood luck!'
|
||||
exit 1
|
||||
elif (( ready == 0 ))
|
||||
then
|
||||
sleep 0.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user