mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-08 21:24:57 -05:00
add shell-based transcode script
This commit is contained in:
29
contrib/mt-daapd-ssc.sh
Executable file
29
contrib/mt-daapd-ssc.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# script to facilitate server-side transcoding of ogg files
|
||||
# Ron Pedde (ron@pedde.com)
|
||||
#
|
||||
# Usage: mt-daapd-ssc.sh <filename> <offset>
|
||||
#
|
||||
# This is not as flexible as Timo's transcoding script, but it works
|
||||
# without perl, making it more suitable for the NSLU2.
|
||||
#
|
||||
|
||||
ogg_file() {
|
||||
oggdec --quiet -o - $1 | dd bs=1 ibs=1024 obs=1024 skip=$OFFSET 2>/dev/null
|
||||
}
|
||||
|
||||
|
||||
OFFSET=0
|
||||
|
||||
if [ "$2" == "" ]; then
|
||||
OFFSET=0
|
||||
else
|
||||
OFFSET=$2
|
||||
fi
|
||||
|
||||
|
||||
if ( echo $1 | grep -i "\.ogg$" > /dev/null 2>&1 ); then
|
||||
ogg_file $1 $OFFSET
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user