5 # ./record_dvb_to_ts.sh "BBC ONE" eastenders 1800 \
6 # "../scheduled_recordings/eastenders.rtvinfo"
8 # ... will record into a file called eastenders.ts
10 # An optional fifth argument specifies the file extension. Default: .ts
18 if [ "$FILE_EXTENSION" == "" ]; then
25 echo '$ killall mplayer'
28 if [ "$?" == "0" ]; then
35 echo '$ mv "'$INFO_FILENAME'" "'$FILENAME'.rtvinfo"'
36 mv "$INFO_FILENAME" "$FILENAME.rtvinfo"
40 echo '$ mplayer -cache 8192 -dumpstream -dumpfile "'$FILENAME'.'$FILE_EXTENSION'.recording" "dvb://'$CHANNEL'" &'
41 mplayer
-cache 8192 -dumpstream -dumpfile "$FILENAME.$FILE_EXTENSION.recording" "dvb://$CHANNEL" &
45 echo '$ sleep '$LENGTH_SECONDS's'
46 sleep ${LENGTH_SECONDS}s
50 echo '$ kill %mplayer'
56 echo '$ mv "'$FILENAME'.'$FILE_EXTENSION'.recording" "'$FILENAME'.'$FILE_EXTENSION'"'
57 mv "$FILENAME.$FILE_EXTENSION.recording" "$FILENAME.$FILE_EXTENSION"