Installscript-recording-cmds
Aus VDR Wiki
(Unterschied zwischen Versionen)
K (obsolete) |
(→Bsp ({edited,before,after}-userdev.cmd): M) |
||
(5 dazwischenliegende Versionen von 2 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 47: | Zeile 50: | ||
# the maximum amount of virtual memory available to the shell | # the maximum amount of virtual memory available to the shell | ||
− | MAXSIZE=" | + | MAXSIZE="20000" |
case $0 in | case $0 in | ||
Zeile 94: | Zeile 97: | ||
</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 | ||
+ | <pre> | ||
+ | #!/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 | ||
+ | </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}}}