Installscript-recording-cmds
Aus VDR Wiki
(Unterschied zwischen Versionen)
(M) |
(→Bsp ({edited,before,after}-userdev.cmd): M) |
||
(21 dazwischenliegende Versionen von 8 Benutzern werden nicht angezeigt) | |||
Zeile 4: | Zeile 4: | ||
Format (Datei): | Format (Datei): | ||
− | after-'''<NAME>'''. | + | after-'''<NAME>'''.cmd |
− | before-'''<NAME>'''. | + | before-'''<NAME>'''.cmd |
− | edited-'''<NAME>'''. | + | edited-'''<NAME>'''.cmd |
Format (Head): | Format (Head): | ||
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 20: | Zeile 24: | ||
Alles weitere sollte im '''syslog''' ersichtlich sein. (vorrausgesetzt '''$VDR_LOG -gt 0''') | Alles weitere sollte im '''syslog''' ersichtlich sein. (vorrausgesetzt '''$VDR_LOG -gt 0''') | ||
− | START='0' -> ../recording-cmds/before-clipinc. | + | START='0' -> ../recording-cmds/before-clipinc.cmd |
− | + | START='2' -> ../recording-cmds/before-sharemarks.cmd | |
− | START='2' -> ../recording-cmds/before-sharemarks. | + | |
==Bsp ([[noad]])== | ==Bsp ([[noad]])== | ||
Zeile 28: | Zeile 31: | ||
'''2''' = Online mode | '''2''' = Online mode | ||
− | {{Box Datei| ../recording-cmds/{after,before}-noad. | + | {{Box Datei| ../recording-cmds/{after,before}-noad.cmd | |
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
Zeile 41: | Zeile 44: | ||
# 1 means online for live-recording only | # 1 means online for live-recording only | ||
# 2 means online for every recording | # 2 means online for every recording | ||
− | ONLINEMODE=" | + | ONLINEMODE="1" |
# 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 | ||
*before-*) | *before-*) | ||
case $START in | case $START in | ||
− | 2) logit $0 "EXEC -> $CHECK $1 $ | + | 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" |
− | noad $1 | + | ulimit -v $MAXSIZE |
+ | noad $1 $ADDOPTS --online=$ONLINEMODE "$2" | ||
;; | ;; | ||
*) logit $0 "OFF -> no online mode" | *) logit $0 "OFF -> no online mode" | ||
Zeile 58: | Zeile 65: | ||
*after-*) | *after-*) | ||
case $START in | case $START in | ||
− | 1) logit $0 "EXEC -> $CHECK $1 | + | 1) logit $0 "EXEC -> $CHECK $1 $ADDOPTS $2" |
− | noad $1 "$2" | + | ulimit -v $MAXSIZE |
+ | noad $1 $ADDOPTS "$2" | ||
;; | ;; | ||
− | 2) logit $0 "EXEC -> $CHECK $1 $ | + | 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" |
− | noad $1 | + | ulimit -v $MAXSIZE |
+ | noad $1 $ADDOPTS --online=$ONLINEMODE "$2" | ||
;; | ;; | ||
esac | esac | ||
;; | ;; | ||
esac | esac | ||
+ | fi | ||
</pre> | </pre> | ||
}} | }} | ||
==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 81: | 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 ( | + | ==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/before- | + | |
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
Zeile 113: | Zeile 108: | ||
START="0" | START="0" | ||
− | ENTRY=$"0,1: | + | ENTRY=$"0,1:User-defined" |
− | CHECK=$( | + | CHECK=$(:) |
− | logit $0 "EXEC -> $ | + | # 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> | </pre> | ||
}} | }} | ||
− | |||
− | |||
− | + | [[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}}}