<-- Projects  

--- Hacking is not allowed in the Netherlands ---

As everything on my web page this is, of course, just an hypothetical idea and no one ever really did such a thing. And if somebody would try this out he should be aware that it could be illegal in the Federal Republic of Germany (and every other "civilized nation"). I'm still waiting for the day when the Government switches the Code of Laws to a whitelist-system, this means generally prohibiting everything and just explicitly allowing certain things.
No, jokes aside. This ist only a proof-of-concept and is NOT intended for actual using. I myself have only tried this out once (Football World Cup 2006) and never used it again.

--- Hacking is not allowed in the Netherlands ---

Prologue

Well, just imagine you have moved out of your family's House for the first time, e.g. because you go to university. And at your new, small flat just next to the university you've got a really weird landlord who wants to force you to subscribe to a cable TV service and therefore has prohibited the use of sattelite dishes. Of course you would never even think of subscribing to a cable TV service because you think it would be absolutely idiotic to pay for something you can get for free via satelite.
But as time passes by you would notice that you just can't live without e.g. "Richterin Barbera Salesch", "Deutschland sucht den Superstar", the whole program of "9.Live", "HSE.24", "Sonnenklar.TV", "QVC", "RTL-Shop", ...
So, just before going totally mad you remember the Slackware 10.2 VDR recording server at your parents House and think:

Streaming DVB-S via T-DSL

Concept drawing
How it works

It should be possible to stream TV via the 128kbits per second upstream of T-DSL using the following software:

  • - Linux ;-)
  • - szap (tunes the channel on the dvb-s card)
  • - mencoder (recodes the dvb transport stream)
  • - netcat (kicks everything through the internet)
  • - ssh (controls the whole thing)
  • - mplayer (watch it on the other side)
  • Implementation:
    Well it got more complicated then i thought , but it finally works. The whole thing is controlled via ssh remote command execution, so it helps a lot to have thrusted ssh connections for all your machines. If not you will have to enter serveral passwords for the involved machines every time you e.g. change a channel.
    For various reasons i needed to do this via several shell scripts. It is not elegant and very sloppy but i know almost nothing about shell programming :-)
    But now enough blah blah, here are the scrits:
     

    Scripts on the server:

    #!/bin/bash
    #zappi.sh
    screen -d -m szap -r $1
    

    #!/bin/bash
    #catti.sh
    cat test1 | nc hostname_or_ip_or_dyndns_of_the_client 1234
    

     
    You also have to generate a fifo-buffer file called /root/test1 with mkfifo

    Script on the client:

    #!/bin/bash
    #tv.sh
    ssh -l root hostname_or_ip_or_dyndns_of_the_server "killall szap nc mencoder"
    killall mplayer
    nc -l -p 1234 | mplayer -
    ssh -l root hostname_or_ip_or_dyndns_of_the_server "/root/zappi.sh $1"
    ssh -l root hostname_or_ip_or_dyndns_of_the_server "screen -d -m /root/catti.sh"
    ssh -l root hostname_or_ip_or_dyndns_of_the_server "screen -d -m mencoder /dev/dvb/adapter0/dvr0 -vf scale -zoom -xy 320 -af pan=1:0.5:0.5,resample=16000 -srate 16000 -channels 1  -ovc x264 -x264encopts bitrate=80:pass=1 -oac faac -faacopts br=17 -o test1"
    

     
    Now, after copying all these scripts to the server and client you may invoke tv.sh on the client with the exact channel name as statet in your channels.conf on the server, e.g.: tv.sh "Das Erste"
    If you are lucky it will, after about 5 seconds, display Das Erste on your client.
    Switching channels works just the same, just invoke the script with another channel name. Unfortunately this always takes about 5 seconds, but ironically you can actually get such incredibly crappy set top boxes here in Germany which take even longer to switch the channel.
     
    How it looks like:
    Foto vom Monitor mit TVStream
    Foto vom Monitor mit TVStream
     
    Data of the Stream:
    Video: 90 kbps, 320x240, h264 (AKA MPEG 4 AVC)
    Audio: 17 kbps, 16 khz, mono FAAC (Free advanced audio codec)

    Example videos (5 seconds):
    DVB-S Transport stream~2,4 MB
    Ca. 123 kbit/s~101 KB

    Final remarks:

    This is proof of concept, don't expect to get it to work at all. You have to think for yourself, if you just copy-paste it, it surely won't work. There are, for sure, many other and better ways to achieve such a thing. If you don't like it, make it better and let me hear about it.
    If playback is choppy or you have more bandwith available fiddle around with the bitrate. That should be no problem.
    If you have tired to get it to work very hard and it just won't work and you are stuck and you can come up with a reasonable question write me a email. I will be very happy to answer it. However, please only reasonable questions, i will not help with: Configuration of dvb, installation of mplayer, anything that Microsoft Windows is involved. On the first two issues there are tons of wonderful howtos on the net, on the last, well.... Just get a real OS.