Sorry for the rather late, > > Probably the easiest (best?) way is to wrap the command line application > in a python class and use that to control the tuner(s). As for streaming, > it's really simple: > > --- python example --- > > import socket, sys, time > > seconds=60*60 # time > filename = 'test.avi' # filename > host='192.168.1.1' # destination host > port=1234 # any udp port > tuner=0 # 0 or 1 > id=0xffffffff # broadcast id, can be a hex id of indiviual hdhomerun > > s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > s.bind(('',port)) > os.system('hdhomerun_config %x set /tuner%d/channel %s' % (id, tuner, > '8vsb:4')) > os.system('hdhomerun_config %x set /tuner%d/program %s' % (id, tuner, > '1')) > os.system('hdhomerun_config %x set /tuner%d/target %s:%d' % (id, > tuner,host,port)) > > start = time.time() > outfile = open(filename, 'wb') > > while time.time() - start < seconds: > data,addr = s.recvfrom(64<<10) > outfile.write(data) > > os.system('hdhomerun_config %x set /tuner%d/target none' % (id, tuner)) > s.close() > > --- python example ---
Great example what I need, definitely the simplest options as there will be no need to update the python module if the protocol changes. > TV_CHANNELS = [ > ('4 KVOADT', 'KVOADT', '8vsb 4.1'), > ('6 KUATDT', 'KUATDT', '8vsb 6.1'), > ('6 KUATDT2', 'KUATDT2', '8vsb 6.1'), > ('6 KUATDT3', 'KUATDT3', '8vsb 6.1'), > ('11 KUATDT4', 'KUATDT4', '8vsb 11.1'), > ('18 KTTUDT', 'KTTUDT', '8vsb 18.1'), > ('27 KUASDT', 'KUASDT', '8vsb 27.1'), > ('46 KUASDT', 'KUASDT', '8vsb 46.1'), > ('58 KWBADT', 'KWBADT', '8vsb 58.1'), > ('58 KWBADT2', 'KWBADT2', '8vsb 58.2'), > ] > > VCR_CMD = ('/u/tv/bin/tvrec ' + > 'channel=%(channel)s ' + > 'length=%(seconds)s ' + > 'filename=%(filename)s') > > I created a test script: > > #!/bin/sh > echo "$*" >>~/.tvrec/log > > And when I record a show and get this: > > channel=4 length=3590 filename=/media/tv/10-05_19_00_Deal_or_No_Deal.avi > > I thought it should be 'channel=8vsb 4.1'. > > Any ideas to what I'm doing wrong? Hopefully you got this working, but if you haven't I suspect it is to do with the fact that you have spaces in your channel names, so they are being split into separate arguments when your script is called. On the live pause plugin side of things, I've got pause working with DVBStreamer again (haven't check CPU usage yet) but there are still a few kinks to work out. This time I am going to try and support Mplayer, Xine and VLC (as this hopefully will allow SVG to be used to render the OSD). Cheers Adam ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users