Installscript-recording-cmds
Aus VDR Wiki
(Unterschied zwischen Versionen)
(M) |
(→Bsp ({edited,before,after}-userdev.cmd): M) |
||
(11 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
Zeile 15: | Zeile 15: | ||
Das ganze kann im [[admin-plugin]] eingestellt werden. ('''0 = inactiv, 1 = activ, 2 = + Option''') | Das ganze kann im [[admin-plugin]] eingestellt werden. ('''0 = inactiv, 1 = activ, 2 = + Option''') | ||
+ | |||
+ | ''Oder, auf der Kommandozeile.'' | ||
+ | |||
+ | shell> [[Installscript-dialog.sh|$PREFIX/etc/vdr/admin/dialog.sh]] | ||
[[Bild:installscript-admin-recording-cmds.jpg|thumb|none|''kurze beschreibung'']] | [[Bild:installscript-admin-recording-cmds.jpg|thumb|none|''kurze beschreibung'']] | ||
Zeile 21: | Zeile 25: | ||
START='0' -> ../recording-cmds/before-clipinc.cmd | START='0' -> ../recording-cmds/before-clipinc.cmd | ||
− | |||
START='2' -> ../recording-cmds/before-sharemarks.cmd | START='2' -> ../recording-cmds/before-sharemarks.cmd | ||
Zeile 45: | Zeile 48: | ||
# set additional args for every call here here | # set additional args for every call here here | ||
ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/vdr/noad.log" | ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/vdr/noad.log" | ||
+ | |||
+ | # the maximum amount of virtual memory available to the shell | ||
+ | MAXSIZE="20000" | ||
case $0 in | case $0 in | ||
Zeile 50: | Zeile 56: | ||
case $START in | case $START in | ||
2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" | 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" | ||
+ | ulimit -v $MAXSIZE | ||
noad $1 $ADDOPTS --online=$ONLINEMODE "$2" | noad $1 $ADDOPTS --online=$ONLINEMODE "$2" | ||
;; | ;; | ||
Zeile 59: | Zeile 66: | ||
case $START in | case $START in | ||
1) logit $0 "EXEC -> $CHECK $1 $ADDOPTS $2" | 1) logit $0 "EXEC -> $CHECK $1 $ADDOPTS $2" | ||
+ | ulimit -v $MAXSIZE | ||
noad $1 $ADDOPTS "$2" | noad $1 $ADDOPTS "$2" | ||
;; | ;; | ||
2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" | 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" | ||
+ | ulimit -v $MAXSIZE | ||
noad $1 $ADDOPTS --online=$ONLINEMODE "$2" | noad $1 $ADDOPTS --online=$ONLINEMODE "$2" | ||
;; | ;; | ||
Zeile 67: | Zeile 76: | ||
;; | ;; | ||
esac | esac | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
fi | fi | ||
</pre> | </pre> | ||
Zeile 84: | Zeile 81: | ||
==Bsp ([[sharemarks]])== | ==Bsp ([[sharemarks]])== | ||
− | '''1''' = | + | '''1''' = Upload der Marken nach dem Schnitt |
− | + | ||
− | {{Box Datei| ../recording-cmds/ | + | {{Box Datei| ../recording-cmds/edited-sharemarks.cmd | |
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
Zeile 94: | Zeile 90: | ||
START="0" | START="0" | ||
− | ENTRY=$"0, | + | ENTRY=$"0,1:Sharemarks, upload after cut" |
CHECK=$(which marks2pts) | CHECK=$(which marks2pts) | ||
− | + | logit $0 "EXEC -> $CHECK -upload $1 $2" | |
− | + | marks2pts --non-interactive --upload $1 "$2" | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
}} | }} | ||
+ | ==Bsp ({edited,before,after}-userdev.cmd)== | ||
+ | '''1''' = Führt, Benutzerdefinierte Befehle aus, welche in '''EXEC{B,A,E}''' hinterlegt werden können. | ||
− | + | {{Box Datei| ../recording-cmds/{edited,before,after}-userdev.cmd | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {{Box Datei| ../recording-cmds/after- | + | |
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
Zeile 134: | Zeile 107: | ||
# example wrapper script | # example wrapper script | ||
− | START="1" | + | START="0" |
+ | ENTRY=$"0,1:User-defined" | ||
+ | CHECK=$(:) | ||
− | # | + | # after recording |
− | + | EXECA="" | |
− | # | + | # before recording |
− | # | + | EXECB="" |
+ | # edited recording | ||
+ | EXECE="" | ||
− | case $ | + | case $0 in |
− | + | *after-*) CMD="$EXECA" ;; | |
− | + | *before-*) CMD="$EXECB" ;; | |
− | + | *edited-*) CMD="$EXECE" ;; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
esac | esac | ||
+ | |||
+ | if [ -n "$CMD" ] ; then | ||
+ | logit $0 "EXEC -> $CMD $2" | ||
+ | screen -dm sh -c "$CMD \"$2\"" | ||
+ | fi | ||
</pre> | </pre> | ||
− | }}[[Kategorie:Installscript]] | + | }} |
+ | |||
+ | |||
+ | [[Kategorie:Installscript]] |
Aktuelle Version vom 29. September 2008, 07:37 Uhr
Inhaltsverzeichnis |
[Bearbeiten] Beschreibung
In ../recording-cmds befinden sich Scripte, welche vor / nach / schnitt einer Aufnahme ausgeführt werden.
Format (Datei):
after-<NAME>.cmd before-<NAME>.cmd edited-<NAME>.cmd
Format (Head):
START="0" # 0 = inactiv, 1 = activ, 2 = + Option ENTRY=$"0,2:Bechreibung" # eintrag für das admin-plugin <choices>:<description> CHECK=$(test xxx) # tests
Das ganze kann im admin-plugin eingestellt werden. (0 = inactiv, 1 = activ, 2 = + Option)
Oder, auf der Kommandozeile.
shell> $PREFIX/etc/vdr/admin/dialog.sh
Alles weitere sollte im syslog ersichtlich sein. (vorrausgesetzt $VDR_LOG -gt 0)
START='0' -> ../recording-cmds/before-clipinc.cmd START='2' -> ../recording-cmds/before-sharemarks.cmd
[Bearbeiten] Bsp (noad)
1 = Nach einer Aufnahme 2 = Online mode
#!/bin/sh # # example wrapper script START="0" ENTRY=$"0,2:Noad (0=off,1=on,2=online mode)" CHECK=$(which noad) # set the online-mode here # 1 means online for live-recording only # 2 means online for every recording ONLINEMODE="1" # set additional args for every call here here ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/vdr/noad.log" # the maximum amount of virtual memory available to the shell MAXSIZE="20000" case $0 in *before-*) case $START in 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" ulimit -v $MAXSIZE noad $1 $ADDOPTS --online=$ONLINEMODE "$2" ;; *) logit $0 "OFF -> no online mode" ;; esac ;; *after-*) case $START in 1) logit $0 "EXEC -> $CHECK $1 $ADDOPTS $2" ulimit -v $MAXSIZE noad $1 $ADDOPTS "$2" ;; 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" ulimit -v $MAXSIZE noad $1 $ADDOPTS --online=$ONLINEMODE "$2" ;; esac ;; esac fi
[Bearbeiten]
1 = Upload der Marken nach dem Schnitt
#!/bin/sh # # example wrapper script START="0" ENTRY=$"0,1:Sharemarks, upload after cut" CHECK=$(which marks2pts) logit $0 "EXEC -> $CHECK -upload $1 $2" marks2pts --non-interactive --upload $1 "$2"
[Bearbeiten] Bsp ({edited,before,after}-userdev.cmd)
1 = Führt, Benutzerdefinierte Befehle aus, welche in EXEC{B,A,E} hinterlegt werden können.
../recording-cmds/{edited,before,after}-userdev.cmd
#!/bin/sh # # example wrapper script START="0" ENTRY=$"0,1:User-defined" CHECK=$(:) # after recording EXECA="" # before recording EXECB="" # edited recording EXECE="" case $0 in *after-*) CMD="$EXECA" ;; *before-*) CMD="$EXECB" ;; *edited-*) CMD="$EXECE" ;; esac if [ -n "$CMD" ] ; then logit $0 "EXEC -> $CMD $2" screen -dm sh -c "$CMD \"$2\"" fi
{{{2}}}