瀏覽代碼

Merge pull request #299 from ath3/ringtone-fixes

Small ringtone plugin fixes
master
Mischievous Meerkat GitHub 5 年之前
父節點
當前提交
169b29029e
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      plugins/ringtone

+ 4
- 4
plugins/ringtone 查看文件

@@ -8,14 +8,14 @@
# Shell: POSIX compliant
# Author: Arun Prakash Jana

if ! [ -z "$1" ]; then
if [ -n "$1" ]; then
echo -n "start (hh:mm:ss): "
read start
st=`date -d "$start" +%s`
st=$(date -d "$start" +%s) || exit 1

echo -n "end (hh:mm:ss): "
read end
et=`date -d "$end" +%s`
et=$(date -d "$end" +%s) || exit 1

if [ $st -ge $et ]; then
echo "error: start >= end"
@@ -24,7 +24,7 @@ if ! [ -z "$1" ]; then

interval=$(( $et - $st ))

outfile=`basename "$1"`
outfile=$(basename "$1")
outfile="${outfile%.*}"_ringtone.mp3

ffmpeg -i "$1" -ss "$start" -t "$interval" -vn -sn -acodec libmp3lame -q:a 2 "$outfile"


Loading…
取消
儲存