I have been using kplayer and kaffeine for watching dvb-s programming, but recently I switched to a simpler system using mplayer, dvbstream, and shell scripts. I have a shell script for watching, and another for recording, for each channel. Icons on the desktop point to the folders containing the watch and record shell scripts, which are arranged in folders by satellite. Clicking on a shell script icon will tune in that channel.
A shell script for watching a channel looks like this:
#!/bin/sh
mplayer dvb://PBS-SD04-World -dvbin timeout=10 -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb
And a shell script for recording a channel looks like this:
#!/bin/sh
dvbstream -f 12180 -p v -s 30000 -v 225 -a 228 -o | tee /mnt/sda2/$(date +%Y%m%d%H%M%S).ts | mplayer -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb -
Since I didn't want to have to manually code shell scripts for watching and recording 200+ channels on 14 satellites, I wrote shell scripts to generate the watch and record scripts from configuration data produced by the scan utility.
Here is the shell script to generate the "watch" scripts:
#!/bin/sh
channelname="`cat < /mnt/a1/etc/Franz/dvb/channels/$1`"
for i in $channelname
do
name=`echo $i|awk -F: '{print $1}'`
echo -e "#!/bin/sh\n\nmplayer dvb://$name -dvbin timeout=10 -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb" | tee /mnt/a1/etc/Franz/dvb/dvbwatch/$1/$name.sh
done
And here is the shell script to generate the "record" scripts:
#!/bin/sh
channelname="`cat < /mnt/a1/etc/Franz/dvb/channels/$1`"
for i in $channelname
do
name=`echo $i|awk -F: '{print $1}'`
freq=`echo $i|awk -F: '{print $2}'`
pole=`echo $i|awk -F: '{print $3}'`
symb=`echo $i|awk -F: '{print $5}'`
vpid=`echo $i|awk -F: '{print $6}'`
apid=`echo $i|awk -F: '{print $7}'`
echo -e "#!/bin/sh\n\ndvbstream -f $freq -p $pole -s $symb -v $vpid -a $apid -o | tee /mnt/sda2/\$(date +%Y%m%d%H%M%S).ts | mplayer -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb -" | tee /mnt/a1/etc/Franz/dvb/dvbrecord/$1/$name.sh
done
I hope this will be useful.
A shell script for watching a channel looks like this:
#!/bin/sh
mplayer dvb://PBS-SD04-World -dvbin timeout=10 -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb
And a shell script for recording a channel looks like this:
#!/bin/sh
dvbstream -f 12180 -p v -s 30000 -v 225 -a 228 -o | tee /mnt/sda2/$(date +%Y%m%d%H%M%S).ts | mplayer -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb -
Since I didn't want to have to manually code shell scripts for watching and recording 200+ channels on 14 satellites, I wrote shell scripts to generate the watch and record scripts from configuration data produced by the scan utility.
Here is the shell script to generate the "watch" scripts:
#!/bin/sh
channelname="`cat < /mnt/a1/etc/Franz/dvb/channels/$1`"
for i in $channelname
do
name=`echo $i|awk -F: '{print $1}'`
echo -e "#!/bin/sh\n\nmplayer dvb://$name -dvbin timeout=10 -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb" | tee /mnt/a1/etc/Franz/dvb/dvbwatch/$1/$name.sh
done
And here is the shell script to generate the "record" scripts:
#!/bin/sh
channelname="`cat < /mnt/a1/etc/Franz/dvb/channels/$1`"
for i in $channelname
do
name=`echo $i|awk -F: '{print $1}'`
freq=`echo $i|awk -F: '{print $2}'`
pole=`echo $i|awk -F: '{print $3}'`
symb=`echo $i|awk -F: '{print $5}'`
vpid=`echo $i|awk -F: '{print $6}'`
apid=`echo $i|awk -F: '{print $7}'`
echo -e "#!/bin/sh\n\ndvbstream -f $freq -p $pole -s $symb -v $vpid -a $apid -o | tee /mnt/sda2/\$(date +%Y%m%d%H%M%S).ts | mplayer -ao alsa -vo xv -fs -vf scale=720:540,crop=720:448:0:48,pp=lb -" | tee /mnt/a1/etc/Franz/dvb/dvbrecord/$1/$name.sh
done
I hope this will be useful.
Last edited: