Cutinplace.sh
Aus VDR Wiki
(Unterschied zwischen Versionen)
K |
|||
Zeile 2: | Zeile 2: | ||
#!/bin/sh | #!/bin/sh | ||
# | # | ||
− | # cutinplace.sh | + | # cutinplace.sh |
# | # | ||
− | # | + | # Required: at, cutinplace |
# | # | ||
# add this lines to your reccmds.conf: | # add this lines to your reccmds.conf: | ||
Zeile 25: | Zeile 25: | ||
case "$1" in | case "$1" in | ||
− | + | -at) | |
at now <<EOF | at now <<EOF | ||
− | svdrpsend.pl MESG "Editing process started" | + | svdrpsend.pl MESG "Editing process started" >/dev/null |
− | cutinplace "$2" | + | cutinplace "$2" >/dev/null |
− | svdrpsend.pl MESG "Editing process finished" | + | svdrpsend.pl MESG "Editing process finished" >/dev/null |
EOF | EOF | ||
;; | ;; | ||
− | + | -start) | |
VAR=$(($(find "$2" -printf %k+)0)) | VAR=$(($(find "$2" -printf %k+)0)) | ||
if [ "$((VAR/1024))" -gt "$MAX_IN_MB" ] ; then | if [ "$((VAR/1024))" -gt "$MAX_IN_MB" ] ; then |
Version vom 30. März 2005, 11:21 Uhr
#!/bin/sh # # cutinplace.sh # # Required: at, cutinplace # # add this lines to your reccmds.conf: # folgende zeilen in die reccmds.conf eintragen: # # cutinplace (at) : /usr/local/bin/cutinplace.sh -at # cutinplace : /usr/local/bin/cutinplace.sh -start # CONFIG START MAX_IN_MB="600" # max size -> cut without at MESSAGE="You need to set the Maximum recording size to 100MB or something small anyway in Recordings menu to fully enjoy faster cutting times." # CONFIG END PATH=$PATH:/usr/local/bin MAXFILESIZE=`grep -s ^MaxVideoFileSize $VDR_CONFIG/setup.conf | cut -d' ' -f3` VAR=${MAXFILESIZE##*[^0-9]*} eval ${VAR:+test $MAXFILESIZE -gt 100 && echo $MESSAGE} case "$1" in -at) at now <<EOF svdrpsend.pl MESG "Editing process started" >/dev/null cutinplace "$2" >/dev/null svdrpsend.pl MESG "Editing process finished" >/dev/null EOF ;; -start) VAR=$(($(find "$2" -printf %k+)0)) if [ "$((VAR/1024))" -gt "$MAX_IN_MB" ] ; then echo "Record to large ($((VAR/1024))Mb -gt ${MAX_IN_MB}Mb), use better at..." else cutinplace "$2" fi ;; esac