Register
It is currently Thu Oct 02, 2014 12:22 am

Schedule stream recording


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Mon Oct 04, 2010 3:37 am   

Joined: Mon Oct 04, 2010 3:20 am
Posts: 1
I've searched the forums without any luck so I'll just get right to it.

I would like to record streams from my Dreambox to my server at a time which I specify using a menu.
Currently I have a crude but working script for zapping channel and then download the stream but I have to do it right before the show. I was thinking of using the 'at' command but I have no idea on how to implement it.
I want something like this:

Quote:
Menu
------
1) Channel
2) Channel2
3) Channel3
4) List schedule
5) Quit

Submenu1
-----------
Enter starttime (YYMMDDHHmm):

Submenu2
------------
Enter stoptime (YYMMDDHHmm):

<after success go back to Menu>



My current newbiescript is:

Code:
#!/bin/bash

showMenu () {
        echo "1) SVT1"
        echo "2) TV4 Sport"
        echo "3) Quit"
        echo ""
}

while [ 1 ]
do
        showMenu
        read CHOICE
        case "$CHOICE" in
                "1")
                        echo "### Changing channel ###"
                        wget -q http://192.168.6.10:80/web/zap?sRef=1:0:1:449:2D:A027:FFFF0000:0:0:0:
                        wait
                        rm zap*
                        echo "### Downloading stream ###"
                        wait
                        wget -b http://192.168.6.10:8001/1:0:1:449:2D:A027:FFFF0000:0:0:0: -O svt1-`eval date +%Y-%m-%d_%H.%M.%S`.ts
                        ;;
                "2")
                        echo "### Changing channel ###"
                        wget -q http://192.168.6.10:80/web/zap?sRef=1:0:1:3F7:1E:A027:FFFF0000:0:0:0
                        wait
                        rm zap*
                        echo "### Downloading stream ###"
                        wait
                        wget -b http://192.168.6.10:8001/1:0:1:3F7:1E:A027:FFFF0000:0:0:0 -O tv4sport-`eval date +%Y-%m-%d_%H.%M.%S`.ts
                        ;;
                "3")
                        rm wget-log*
                        wait
                        killall wget
                        wait
                        exit
                        ;;
        esac

done


Hopefully one of you helpful souls can help me.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP