summaryrefslogtreecommitdiffstats
path: root/bin/ringtone
blob: 19dddb6099cadcf490b7bd821a83d4b6d85a2620 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
set -eu
set -o pipefail

if [ $# -lt 3 ]; then
    echo "usage: ringtone <input> <output> <fake_video_file>"
    echo "note: fake_video_file is unused, but must be valid"
    echo "      and at least the length of the output"
    exit 1
fi

mencoder \
    -ovc frameno \
    -oac mp3lame \
    -lameopts cbr:br=64 \
    -of rawaudio \
    -o "$2" \
    -audiofile "$1" \
    -endpos 256kb \
    "$3"