Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 May 2013, 09:23
All times are UTC - 4
 Forum index » Advanced Topics » Hardware
How to make a DVR using a Hauppauge Nova T-500 tuner?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
Mercedes350se

Joined: 16 Apr 2008
Posts: 477

PostPosted: Fri 10 Feb 2012, 02:06    Post subject:  How to make a DVR using a Hauppauge Nova T-500 tuner?
Subject description: I have it recording to the HDD, how to set the timer?
 

Phase one is complete. I have the above card up and running showing pictures through both xine and gxine on a (Edit: LiveCD) of 4.1.2.

I would like to go to the next phase and actually save the stream to the hard drive using dvbstream 0.6. The closest to success was video but no audio - yes the audio PID was correct.

I have tried various input to dvbstream including this excerpt from a slightly longer script:

dvbstream -bw 7 -f 718500 -v 512 -a 650 -ps -o > $path/$name-$timestamp.mpeg &

Which "should" save the ABC1 stream to the file defined as $name-$timestamp.mpeg to the location defined in $path.

I have tried using the "full Monty" with QAM, FEC, etc defined but I get the message of the sort - cannot find the frequency. I have it running in the background as I type this!!

The correct input command seems to elude me.

Any suggestions very warmly welcomed.

Edit: Using Gtb-DVB, the readme.txt confused me by the last two lines regarding saving.

Start gxine like this:
gxine dvb://DasErste#save:1.wmv

Edit2: A search for DasErste showed it was a TV station, so sharp as a tack, I simply entered:

gxine dvb://ABC1#save:Test.mpeg # There is a . between Test and mpeg!

and it saved.

Now all I need is a script that will set the duration of the save. I have some ideas.

Phase three: What do I need to do so that I can use one of the tuners to save a stream and use the other tuner to view another stream?

Last edited by Mercedes350se on Sat 11 Feb 2012, 01:49; edited 1 time in total
Back to top
View user's profile Send private message 
Mercedes350se

Joined: 16 Apr 2008
Posts: 477

PostPosted: Sat 11 Feb 2012, 01:47    Post subject: Re: How to make a DVR using a Hauppauge Nova T-500 tuner?
Subject description: I have it recording to the HDD, how to set the timer?
 

Mercedes350se wrote:
... Now all I need is a script that will set the duration of the save. I have some ideas.
...


Thinking about this script I have decided that at the end of the save session I want the computer to shut down. As I see it at this stage the script will be:

Start up preamble i.e. channel, duration, etc.
mount the hard drive for the save
Save code here
Umount the hard drive
Shutdown the computer.

Regarding the latter I have had a look at /etc/rc.d/rc.shutdown but it seems way too extensive for my purpose.

Could any one post a simple shut down script remembering I will be using a LiveCD 4.1.2 Puppy with a save file already created?
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 9846
Location: Arizona USA

PostPosted: Sat 11 Feb 2012, 08:50    Post subject:  

For what it's worth, I think if you're running from a CD, with a Save file on a hard disk, the hard disk (and save file) are mounted by Puppy when it boots and remain mounted for the whole session. I could be wrong; for years I've only run Puppy from a multisession DVD without a hard disk at all.
Back to top
View user's profile Send private message 
Mercedes350se

Joined: 16 Apr 2008
Posts: 477

PostPosted: Sat 11 Feb 2012, 21:15    Post subject:  

Thinking about it overnight could I simply call shutdown from inside my script?

NO!! NO!! It simply freezes everything. So what is the "clean" way of shutting down?

Re "Phase three: What do I need to do so that I can use one of the tuners to save a stream and use the other tuner to view/save another stream?"

The answer was right there except I couldn't see it. Referring to

http://linuxtv.org/wiki/index.php/Zap

gives the answers - well most of them!

The method I have tried with success is:

1. In one terminal run

tzap -r -c /your_path/channels.conf "your_channel" # from the channels.conf file

2. In a second terminal run

cp /dev/dvb/adapter0/dvr0 /your_path/your_channel.mpg

Repeat the above two steps (3rd and 4th terminals) to save another channel. Clunky - yes. Works - yes.

I thought I had kicked a goal when I saw this on the above site

usage:
tzap [options] <channel_name> zap to channel channel_name (case insensitive)
-a number : use given adapter (default 0)
-f number : use given frontend (default 0)
-d number : use given demux (default 0)
-c file : read channels list from 'file'
-x : exit after tuning
-r : set up /dev/dvb/adapterX/dvr0 for TS recording
-s : only print summary
-S : run silently (no output)
-F : set up frontend only, don't touch demux
-t number : timeout (seconds)
-o file : output filename (use -o - for stdout)
-h -? : display this help and exit

Unfortunately the tzap file that I am using does not have the -t option (r -x, -s, -S, -F, -o (would be sooo handy!) or -h for that matter) so I cannot do timed saves. Sigh!
Back to top
View user's profile Send private message 
666philb


Joined: 07 Feb 2010
Posts: 1225
Location: wales

PostPosted: Thu 01 Mar 2012, 09:15    Post subject:  

hi Mercedes350se

it might be worth a look at the timer script i used in the getiplayer.pet.

Code:
INPUT=`Xdialog --wrap --stdout --inputbox "program number" 10 40 `
[ ! "$INPUT" ] && exit 0
INPUT2=`Xdialog --wrap --stdout --inputbox "duration eg 1h30m0s or 0h45m15s" 10 40 `
[ ! "$INPUT2" ] && exit 0
INPUT3=`Xdialog --wrap --stdout --inputbox "timer number" 10 40 `
[ ! "$INPUT3" ] && exit 0
echo "#!/bin/sh" > /usr/bin/timer$INPUT3
echo "rxvt -e /root/getiplayer/get_iplayer --type=livetv --get \"$INPUT\" --output=\"/root/getiplayer/recordings/\" &" >> /usr/bin/timer$INPUT3
echo "sleepy \"$INPUT2\"" >> /usr/bin/timer$INPUT3
echo 'Mypid=$!'>> /usr/bin/timer$INPUT3
echo 'kill $Mypid'>> /usr/bin/timer$INPUT3
chmod 0755 /usr/bin/timer$INPUT3
pschedule &
`Xdialog --infobox "timer$INPUT3" 10 40 `
`Xdialog --infobox "timer$INPUT3" 10 40 `

three input boxs for channel/ duration/ and a name for the timer
this creates a script in usr/bin from your inputs, and then opens pshedule. in pshedule you create a new task, and for the command use the name of the timer from input box 3. (note the name is prefixed by timer in my script, eg timereastenders)

this is the script it creates in /usr/bin/ which is used by pshedule
Code:
#!/bin/sh
rxvt -e /root/getiplayer/get_iplayer --type=livetv --get "bbc 2" --output="/root/getiplayer/recordings/" &
sleepy "1h30m12s"
Mypid=$!
kill $Mypid

it uses 'sleepy' for the duration, a pet of which can be found here http://www.murga-linux.com/puppy/viewtopic.php?p=470615

whist not perfect it does work for me. and may give you an idea on how to make yours work

_________________
Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
LÖVE2d, a collection of 27 lua gameshttp://www.murga-linux.com/puppy/viewtopic.php?t=76739
Back to top
View user's profile Send private message 
Mercedes350se

Joined: 16 Apr 2008
Posts: 477

PostPosted: Sun 18 Mar 2012, 20:43    Post subject:  

Thank you for the suggestion.

I have found a pet for "at" which I have installed. There is a lot going on at the moment so I haven't tried it yet - mainly because an early part of my script is not working - so it is still a work in progress.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Hardware
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0750s ][ Queries: 12 (0.0246s) ][ GZIP on ]