Hallo Leute!
Ich habe eine analoge TV-Karte, die prima mit XdTV oder Tvtime läuft. Nun möchte ich mir gerne programmgesteuert im Hintergrund Sendungen aufnehmen, möglichst ressourcenschonend.
Ich habe herausgefunden, dass Mencoder auch TV aufzeichnen kann, man könnte das über Cron-jobs laufen lassen. Kann mir jemand mal ein Beispiel geben? Gibt es da irgenwo schon Scripte für?
MythTV scheint mir ziemlich umfangreich zu sein, außerdem habe ich ein paarmal gelesen "habe ich nicht konfiguriert bekommen."
Gibt es andere Lösungen? Plugins für XdTV oder sowas?
Gruss,
DS
Fernsehen programmgesteuert aufnehmen im Hintergrund
-
- Beiträge: 30
- Registriert: 27.11.2006 11:51:22
-
- Beiträge: 30
- Registriert: 27.11.2006 11:51:22
-
- Beiträge: 465
- Registriert: 18.01.2005 02:11:40
- Lizenz eigener Beiträge: GNU Free Documentation License
- Wohnort: Schweiz - Kanton St. Gallen
-
Kontaktdaten:
Myhtv ist echt cool! Aber die Konfiguration ist etwas triki... Gibt aber eine gute Doku auf der Homepage und es gibt auch sonst div. Howtos...
Bevor ich mythtv verwendete hab ich mal ein paar shell-skripts geschrieben, die genau das machen was du willst:
dvb-record-at:
dvb-record-compress:
Beide Skripts müssen in $PATH sein... Aufgenommen wird z.B. mit: dvb-record-at ZDF "05/10/02 15:00" "05/10/02 18:00" Der Zeitsyntax ist der von at (man at). dvb-record-compress rekomprimirt die Filme während dem aufnehmen... Falls das nicht gewünst ist, einfach anpassen!
Die Kanalconfig befindet sich in .mplayer/channels.conf.ter Viel spass!
Wie immer, keine Garantie auf funktionieren oder nicht gelöschte Festplatte
Ich hab damit diverse Filme erfolgreich aufgenommen...
Bevor ich mythtv verwendete hab ich mal ein paar shell-skripts geschrieben, die genau das machen was du willst:
dvb-record-at:
Code: Alles auswählen
#! /bin/sh
# Copyright © 2006 Hannes Diethelm
# Distributable under the terms of the GNU GPL version 2.
PID_FILE=/tmp/mencoder.pid
#Input test------------
if [ $# != 4 ]; then
echo "Usage: dvd-record-at programm file start-time end-time"
exit 1
fi
#Stop sequence-------
STOP_SCRIPT='
kill $(cat '$PID_FILE') \n
echo "Recording of '$1' to '$2' stopped at $(date)" \n
rm '$PID_FILE' \n
'
#echo -e $STOP_SCRIPT
STOP_OUT=$(echo -e $STOP_SCRIPT | at $4 2>&1)
STOP_STATUS=$?
STOP_JOB=$(echo -n $STOP_OUT | awk '{ while ( x++ < NF) if($x == "job") print $(x+1) }' )
if [ $STOP_STATUS != 0 ]; then
echo "Stop setup failed!"
echo $STOP_OUT
exit 1
else
echo "Recording stop-job: $STOP_JOB"
echo $STOP_OUT | awk '{do_print=0; while ( x++ < NF) { if($x == "/bin/sh") do_print=1; if(do_print==1) printf $(x+1) " " } printf "\n"}'
fi
#---------------------
echo
#Start sequence-------
START_SCRIPT='
if [ -e '$PID_FILE' ]; then \n
echo "Another record already running, cant start!" \n
echo "Removing stop-job '$STOP_JOB'" \n
atrm '$STOP_JOB' \n
exit 1 \n
fi \n
echo "Recording of '$1' to '$2' started at $(date)" \n
dvb-record-compress '$1' '$2' & \n
echo $! > '$PID_FILE' \n
'
#echo -e $START_SCRIPT
START_OUT=$(echo -e $START_SCRIPT | at $3 2>&1)
START_STATUS=$?
START_JOB=$(echo -n $START_OUT | awk '{ while ( x++ < NF) if($x == "job") print $(x+1) }' )
if [ $START_STATUS != 0 ]; then
echo "Start setup failed! Deleting stop job: Nr. $STOP_JOB"
atrm $STOP_JOB
echo $START_OUT
exit 1
else
echo "Recording start-job: $START_JOB"
echo -n $START_OUT | awk '{do_print=0; while ( x++ < NF) { if($x == "/bin/sh") do_print=1; if(do_print==1) printf $(x+1) " " } printf "\n"}'
fi
Code: Alles auswählen
#! /bin/sh
# Copyright © 2006 Hannes Diethelm
# Distributable under the terms of the GNU GPL version 2.
mencoder dvb://$1 -o $2 -forceidx -vf crop=690:572:14:4 -oac mp3lame -lameopts preset=standard -ovc lavc -lavcopts vbitrate=1600 &
PID=$!
echo PID=$PID
trap "echo Trapped TERM/INT; kill $PID; sleep 2; exit 0" TERM INT
while true; do
sleep 1
done
Die Kanalconfig befindet sich in .mplayer/channels.conf.ter Viel spass!

Wie immer, keine Garantie auf funktionieren oder nicht gelöschte Festplatte
