Zapstream in web-x-tv modification

What is zapstream?
Its purpose is to watch the current channel on your dreambox. Zapstream is a (partial) replacement for streamts in -ts mode. Zapstream automatically notices zaps by listening to /tmp/.listen.camd.socket. By providing vlc with the right pat and pmt, vlc will also notice the zap and shows the correct stream. Additionally zapstream doesn't use the buggy sectionalignment algorithm used in streamts and is optimised for streaming on a dm500. As a result, zapstream is much more stable and allows near perfect streaming on a dm500.

Why use zapstream for web-x-tv?
Some people have complaints about the stability of web-x-tv on a dm500, so I adjusted web-x-tv to use zapstream.

Installation

Zapstream in web-x-tv is only tested on Pli Helenite final on a dm500. It will probably work with other images and other boxes, but this is not tested.
You will need a writable root filesystem for the modification.


- make a backup of webxtvFirefox.tmp and webxtvMSIE.tmp in /share/tuxbox/enigma/templates so you can restore them if this doesn't work for you.
- copy webxtvFirefox.tmp and webxtvMSIE.tmp from the archive into /share/tuxbox/enigma/templates
- you may update the existing /sbin/zapstream with the zapstream provided in the archive. The new version streams all audio channels, the old version only 1. Again be sure to backup the old zapstream first.



Additional steps for non pli helenite final images:

- /sbin/zapstream will not be present, just copy zapstream from the archive to /sbin
- make sure /etc/inetd.conf contains the line
zapstream	stream	tcp	nowait	root	/sbin/zapstream		zapstream -ts
- make sure /etc/services contains the line
zapstream	31344/tcp
- Remember to reboot your box after these changes (or give a "kill -s HUP `pidof inetd`" in telnet)

You can use zapstream directly (without web-x-tv) by opening a network stream to "http://dreambox:31344" in vlc. Make sure the http interface of vlc is turned off. The enigma webinterface does calls to the vlc http interface after zaps, which we don't want.

Another benefit of zapstream is that it allows an easier way of watching your dreambox over the internet. Use the script startvlctranscode on on a pc/server to start vlc (first you have to adjust the ipadres and adjust the settings to match your upload bandwidth (mine is 786kbit/s)). Open a vlc on your pc and connect to the transcoding vlc on port 12345. Notice how zaps in the webinterface directly show up in vlc.
For linux use startvlctranscode.
For windows use startvlctranscode.bat, remember to also adjust the path to the executable.



Happy streaming,
 Sjaaky