First you need an extra tab on the site, this can be done either in the local_conf.py in the following section: ____________________________________________________________________________________________________________________________________________________________ Integrate personal web pages into the web server PERSONAL_WWW_PAGE = [ ('LiveTV', 'Warch live TV', 'test.rpy') ] ____________________________________________________________________________________________________________________________________________________________ or edit the file web_types.py, look for: ____________________________________________________________________________________________________________________________________________________________ (_('Search'),_('Advanced Search Page'),'%ssearch.rpy' % str(strprefix)), (_('Help'),_('View Online Help and Documentation'),'%shelp/' % str(strprefix))] # maybe also a personal web pages ____________________________________________________________________________________________________________________________________________________________ and add (_('LiveTV'),_('Watch live TV'),'%stest.rpy' % str(strprefix))] so: ____________________________________________________________________________________________________________________________________________________________ (_('Search'),_('Advanced Search Page'),'%ssearch.rpy' % str(strprefix)), (_('Help'),_('View Online Help and Documentation'),'%shelp/' % str(strprefix)), (_('LiveTV'),_('Watch live TV'),'%stest.rpy' % str(strprefix))] # maybe also a personal web pages ____________________________________________________________________________________________________________________________________________________________ ok now there should be an extra tab called 'LiveTV' now we need the test.rpy, mine looks like this: ____________________________________________________________________________________________________________________________________________________________ #!/usr/bin/python # ----------------------------------------------------------------------- # Freevo - A Home Theater PC framework # Copyright (C) 2002 Krister Lagerstrom, et al. # Please see the file freevo/Docs/CREDITS for a complete list of authors. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MER- # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ----------------------------------------------------------------------- import sys import os from www.web_types import HTMLResource, FreevoResource class TestResource(FreevoResource): def _render(self, request): fv = HTMLResource() fv.printHeader(_('LiveTV'), 'styles/main.css',selected=_('Test')) form = request.args fv.res += "To start the stream server click here. To stop the stream-server clickhere. To switch to the channel you can simply click on the channel you want to watch. A new window will pop up and close itself automatically, then the channel should be changed." fv.res += "MTV TMF National Geographic Discovery Channel CNN BBC1 BBC2 Net5 sbs6 Veronica talpa rtl4 rtl5 rtl7 een Euronews ARD ZDF WDR TV Gelderland Nederland 1 Nederland 2 Nederland 3 Ketnet/Canvas Lokaal Plus UpcInfo TRTint Rai Uno Eurosport Nick/Comedy Central TellSell TV5 cam" fv.res += "
" return String( fv.res ) resource = TestResource() ____________________________________________________________________________________________________________________________________________________________ the test.rpy first gives you a link to start and stop a vlc stream, which are actually two streams at ones, one is a http stream the other a mms stream next to it there are links to e.g. MTV.rpy which enables you to switch the channel from the current one to (in this example) MTV withouth interupting the stream, when clicked on the link MTV.rpy another window pops up, execute the channel switching command and closes afterwards below the links there is an embedded mediaplayer for internet explorer and should also work in firefox in which you should be able to view the stream, alternatively the stream can also be opened in vlc via the http stream, using e.g. http://your_ip:port the port settings depend on what you set when the vlc stream command is executed, this happens in the file 'startstream.rpy' which is shown below: ____________________________________________________________________________________________________________________________________________________________ #!/usr/bin/python # ----------------------------------------------------------------------- # Freevo - A Home Theater PC framework # Copyright (C) 2002 Krister Lagerstrom, et al. # Please see the file freevo/Docs/CREDITS for a complete list of authors. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MER- # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ----------------------------------------------------------------------- import sys import os from www.web_types import HTMLResource, FreevoResource class TestResource(FreevoResource): def _render(self, request): fv = HTMLResource() fv.printHeader(_('LiveTV'), 'styles/main.css',selected=_('Test')) form = request.args command = "vlc v4l:/dev/video0:norm=pal:frequency=767250:size=320x240:channel=0:adev=/dev/dsp:audio=0 --sout \'#transcode{vcodec=DIV3,vb=3000,scale=1,acodec=mp3,ab=256,channels=2}:duplicate{dst=std{access=http,mux=ts,url=your_ip:port},dst=std{access=mmsh,mux=asfh,dst=:port}}\' -I dummy&" os.system(command) fv.res += "" return String( fv.res ) resource = TestResource() ____________________________________________________________________________________________________________________________________________________________ the script above starts the vlc stream, when clicked on the link a window will pop up and close itself afterwards, here you should set your ip and port 'url=your_ip:port' and 'dst=:port' now for the channel/station links *.rpy i will continue with the MTV.rpy example: ____________________________________________________________________________________________________________________________________________________________ #!/usr/bin/python # ----------------------------------------------------------------------- # Freevo - A Home Theater PC framework # Copyright (C) 2002 Krister Lagerstrom, et al. # Please see the file freevo/Docs/CREDITS for a complete list of authors. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MER- # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ----------------------------------------------------------------------- import sys import os from www.web_types import HTMLResource, FreevoResource class TestResource(FreevoResource): def _render(self, request): fv = HTMLResource() fv.printHeader(_('LiveTV'), 'styles/main.css',selected=_('Test')) form = request.args command = "v4lctl setstation MTV" os.system(command) fv.res += "" return String( fv.res ) resource = TestResource() ____________________________________________________________________________________________________________________________________________________________ when clicked on the link a window pops up and executes the command 'v4lctl setstation MTV' switching the current channel to MTV and closes the window again in order for 'v4lctl setstation TMF' to work you need to have a working .xawtv config file, because the channel names have to be identical with what has been specified in that file in order for 'v4lctl' to work, usually the file is located at: /home/user/.xawtv mine looks like this: ____________________________________________________________________________________________________________________________________________________________ [global] ratio = 4:3 freqtab = europe-west pixsize = 128 x 96 pixcols = 1 jpeg-quality = 75 keypad-ntsc = no keypad-partial = yes osd = yes osd-position = 30 , 20 use-wm-fullscreen = yes # [Station name] # capture = overlay | grabdisplay | on | off # input = Television | Composite1 | S-Video | ... # norm = PAL | NTSC | SECAM | ... # channel = # # fine = # (-128..+127) # key = keysym | modifier+keysym # color = # # bright = # # hue = # # contrast = # [defaults] group = main norm = PAL input = Television capture = over color = 74% [MTV] channel = 58 capture = on [TellSell] channel = 29 capture = on fine = +9 [Discovery Channel] channel = 62 capture = on [TMF] channel = 33 capture = on [CNN] channel = 56 [TV5] channel = SE19 capture = on ____________________________________________________________________________________________________________________________________________________________ and so on the important thing here are the station names in the '[blabla]' brackets these we need for the 'v4lctl' command to work properly you need to create for each channel, which you want to be able to switch and appear as a link, a rpy file like the MTV one so MTV.rpy, TMF.rpy, CNN.rpy and so on, with the same content just the 'v4lctl setstation MTV' has to be adjusted to the channel name according to the .xawtv file next is the vlc stop stream command, this one pops up a new window kills all vlc process on your server and closes the window again, this is called stopstream.rpy: ____________________________________________________________________________________________________________________________________________________________ #!/usr/bin/python # ----------------------------------------------------------------------- # Freevo - A Home Theater PC framework # Copyright (C) 2002 Krister Lagerstrom, et al. # Please see the file freevo/Docs/CREDITS for a complete list of authors. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MER- # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ----------------------------------------------------------------------- import sys import os from www.web_types import HTMLResource, FreevoResource class TestResource(FreevoResource): def _render(self, request): fv = HTMLResource() fv.printHeader(_('LiveTV'), 'styles/main.css',selected=_('Test')) form = request.args command = "killall vlc" os.system(command) fv.res += "Streamserver is shutdown." return String( fv.res ) resource = TestResource() ____________________________________________________________________________________________________________________________________________________________ i have a button to start and stop the vlc stream server cuz my pc is slow and takes up too much cpu when not used... and also it is important that the user who starts the webserver has permissions to use your /dev/video or /dev/video0 and /dev/dsp so sound and video the *.rpy files should all be put where also the other (index.rpy, guide.rpy...) *.rpy's are should be in a directory like 'share/freevo/htdocs' then you have to restart everything and it should work, it does here :)