Home‎ > ‎

RTMP in Switzerland

Activities

16. June 2011

Reduzent has released another excellent script for watching IPTV in Switzerland. This time it consumes the service of Teleboy. And that is RTMP again...

Make sure you have set your "Title/Anrede" (Herr/Frau) in your Teleboy profile along with your other information before you use reduzent's script. Otherwise no data will be streamed to you. When you try to watch via Teleboy directly in your Browser with Flash, you'll get prompted for the missing profile information before the stream starts there.

16. March 2011

Swisscom buys Wilmaa. Unbelievable...

Fun to read the lower part, where it says "Five deleted comments" and onwards.

~9. March 2011

It is not possible to get the wilmaa streams properly at the moment. Streaming stops after 1.6 - 1.8Mb but more likely it's time driven. More details at reduzent's github project:

https://github.com/reduzent/watchwilmaa/commit/25a82a7d8db77c39d44cadd0185fc6fcc865f489

BTW: There was an article on 20min.ch I wanted to post here for a long time. The first part is not very interesting. But later on it is stated how much companies such as wilmaa or zattoo have to pay to a organization or company called "Schweizerischen Genossenschaft für Urheberrechte an audiovisuellen Werken (Suissimage)" on which base and for what type of user.

I'm hoping that one day distribution of content will be done in a more transparent and less obfuscated way.

August 2010 - February 2011

A lot has changed between August 2010 and February 2011. It seems that wilmaa.com got rid of RTMP which is of course a good sign. They are now streaming via HTTP solely. Now (beginning of March 2011) one could do it this very easy way:

Tele Züri on Linux with mplayer:

mplayer -cache 128 'http://gartenhoflive2-f.akamaihd.net/telezueri_1_800@44503'

Tele Züri on Linux with VLC:

wget -q -O- 'http://gartenhoflive2-f.akamaihd.net/telezueri_1_800@44503' | vlc -

Tele Züri on Windows with mplayer (get mplayer from here. The mplayer.exe is in .7z archive.):

mplayer.exe -cache 128 "http://gartenhoflive2-f.akamaihd.net/telezueri_1_800@44503"

Tele Züri on Windows with VLC:

wget.exe -q -O- "http://gartenhoflive2-f.akamaihd.net/telezueri_1_800@44503" | vlc.exe -


Get wget on Windows from the cygwin project. The one from the gnuwin32 project did not work for me out of the box.

Head over to reduzent's execellent "watchwilmaa" project at github and checkout his "watchwilmaa" bash script to get a full list of supported TV channels.


All this means that this page is quite obsolete unless the RTMP parameters for zattoo.com are known (if they are still using RTMP at all). But I would like to keep this page for historic records as it was a interesting time with wilmaa and RTMP. And my TV manifesto on the very bottom certainly still applies.

wilmaa.com

Site is here:
http://www.wilmaa.com/

wilmaa does geolocation of the client's IP address. Only IP addresses located in Switzerland are allowed.

Advantages of the approach described below are:
  1. No (additional) commercials, banners or advertising while zapping through and watching wilmaa
  2. Save video stream to a file and watch it whenever and how often you want
  3. Use the video player of your choice

On Linux

To find out RTMP related parameters (such as swfurl, play, tcUrl, pageUrl) use the following ngrep command while logging in and beginning to watch wilmaa with your web browser:

ngrep -W byline | grep -Pio '(swfurl\.{2}.*?\.{2})|(\.{2}play.*?\w.*?\.{3})|(tcUrl.*?rtmp://.*?\.{2})|(pageUrl\.{3}.*?\.{2})'

A typical output of ngrep looks like this:

swfUrl..+http://www.wilmaa.com/player/main_v3.76.swf..
pageUrl...http://www.wilmaa.com/..
..play............3wilmaa_015@6810?userID=xxxxxxxxxxxxxx&channelID=SF1B...
..play............3wilmaa_016@6811?userID=
xxxxxxxxxxxxxx&channelID=SF2...
swfUrl..+http://www.wilmaa.com/player/main_v3.76.swf..
pageUrl...http://www.wilmaa.com/..
..play............3wilmaa_016@6811?userID=
xxxxxxxxxxxxxx&channelID=SF2B...


Get the source tarball of rtmpdump and compile it.

In addition to the ngrep command stated above rtmpsuck of the rtmpdump distribution can be used as well to find out RTMP related parameters. Detailed instructions for rtmpsuck and the necessary iptables command are given in the README text file of the rtmpdump distribution.

Make sure a fairly recent version of the VLC media player is available on the system.

Use the following rtmpdump command to watch TV channel "SF1" from wilmaa.com in VLC via a pipe:


swfUrl="http://www.wilmaa.com`wget -qO- http://www.wilmaa.com | grep -Pio '\/.*\.swf'`";rtmpdump --rtmp "rtmp://flash.live.wilmaa.com:1935/live" --tcUrl "rtmp://flash.live.wilmaa.com:1935/live?_fcs_vhost=flash.live.wilmaa.com&ovpfv=2.1.0" --pageUrl "http://www.wilmaa.com/" --swfUrl "$swfUrl" --swfVfy "$swfUrl" --playpath "sf1_800@6810?channelID=SF1" --live --quiet --flv - | vlc -

To dump the RTMP stream into a file and get a bit more output of what rtmpdump is doing:

swfUrl="http://www.wilmaa.com`wget -qO- http://www.wilmaa.com | grep -Pio '\/.*\.swf'`";rtmpdump --rtmp "rtmp://flash.live.wilmaa.com:1935/live" --tcUrl "rtmp://flash.live.wilmaa.com:1935/live?_fcs_vhost=flash.live.wilmaa.com&ovpfv=2.1.0" --pageUrl "http://www.wilmaa.com/" --swfUrl "$swfUrl" --swfVfy "$swfUrl" --playpath "sf1_800@6810?channelID=SF1" --live --flv SF1.flv

Leave the rtmpdump command running and open the file "SF1.flv" with VLC or mplayer.

On Windows

Download the rtmpdump-<version number>-windows.zip-file from rtmpdump.

Extract it to a folder of your choice.

Save mplayer.exe-file from here to the same folder.

Download the openssl-<version number>-mod-<version number>.zip-file from here and extract the libeay32.dll-file to the same folder where mplayer.exe and rtmpdump.exe is located.

Open a Windows command prompt window and change working directory to the folder where mplayer.exe and rtmpdump.exe and libeay32.dll is located.

Enter the following command:

rtmpdump.exe -r "rtmp://flash.live.wilmaa.com:1935/live" -t "rtmp://flash.live.wilmaa.com:1935/live?_fcs_vhost=flash.live.wilmaa.com&ovpfv=2.1.0" -p "http://www.wilmaa.com/" --swfVfy "http://www.wilmaa.com/player/main_v3.176.swf" -y "wilmaa_015@6810?channelID=SF1" --live -q -o - | mplayer.exe -cache 8192 -


Three simultaneous instances of wilmaa in mplayer on Windows

Tuning TV channels

To tune into another TV channel replace the value of the --playpath / -y parameter with one of these:

3sat_800@6796?channelID=3sat
ard_800@6797?channelID=ARD
arte_800@6798?channelID=ARTE_de
bbcworld_800@20977?channelID=BBCWorld
cnn_800@6799?channelID=CNN
dasvierte_800@6818?channelID=DasVierte
dmax_800@6800?channelID=DMAX
eurosport_800@10741?channelID=EUROSPORT
france2_800@20971?channelID=FRANCE2
france3_800@20972?channelID=FRANCE3
france5_800@20973?channelID=FRANCE5
kabel1_800@6801?channelID=Kabel_1
kika_800@6802?channelID=KiKa
m6_800@20976?channelID=M6
mtv_800@6803?channelID=MTV
nick_cc_800@10743?channelID=NICKCC
ntv_800@10744?channelID=n-tv
orf1_800@6804?channelID=ORF1
orf2_800@6805?channelID=ORF2
pro7_800@6806?channelID=Pro7
rsila1_800@10739?channelID=RSILA1
rsila2_800@10740?channelID=RSILA2
rtl2_800@6808?channelID=RTL2
rtl9_800@20974?channelID=RTL9
rtl_800@6807?channelID=RTL
sat1_800@6809?channelID=Sat1
sf1_800@6810?channelID=SF1
sf2_800@6811?channelID=SF2
sfinfo_800@6812?channelID=SFinfo
sixx_800@20978?channelID=SIXX
sport1_800@10742?channelID=DSF
startv_800@16321?channelID=StarTV
superrtl_800@6814?channelID=SuperRTL
tf1_800@20975?channelID=TF1
tsr1_800@10745?channelID=tsr1
tsr2_800@10746?channelID=tsr2
tv5monde_800@6819?channelID=TV5MONDE
viva_800@6815?channelID=NICKVIVA
vox_800@6816?channelID=Vox
zdf_800@6817?channelID=ZDF

For historic records these were the values of the --playpath / -y parameter before ~ end of August 2010:

wilmaa_001@6796?channelID=3sat
wilmaa_002@6797?channelID=ARD
wilmaa_003@6798?channelID=ARTE_de
wilmaa_004@6799?channelID=CNN
wilmaa_005@6800?channelID=DMAX
wilmaa_006@6801?channelID=Kabel_1
wilmaa_007@6802?channelID=KiKa
wilmaa_008@6803?channelID=MTV
wilmaa_009@6804?channelID=ORF1
wilmaa_010@6805?channelID=ORF2
wilmaa_011@6806?channelID=Pro7
wilmaa_012@6807?channelID=RTL
wilmaa_013@6808?channelID=RTL2
wilmaa_014@6809?channelID=Sat1
wilmaa_015@6810?channelID=SF1
wilmaa_016@6811?channelID=SF2

wilmaa_017@6812?channelID=SFinfo
wilmaa_018@6813?channelID=StarTV
wilmaa_019@6814?channelID=SuperRTL
wilmaa_020@6815?channelID=NICKVIVA
wilmaa_021@6816?channelID=Vox
wilmaa_022@6817?channelID=ZDF
wilmaa_023@6818?channelID=DasVierte
wilmaa_024@6819?channelID=TV5MONDE
wilmaa_025@10739?channelID=RSILA1
wilmaa_026@10740?channelID=RSILA2
wilmaa_027@10741?channelID=EUROSPORT
wilmaa_028@10742?channelID=DSFB
wilmaa_029@10743?channelID=NICKCC
wilmaa_030@10744?channelID=n-tv
wilmaa_031@10745?channelID=tsr1
wilmaa_032@10746?channelID=tsr2

Some notes

rtmpdump seems to work fairly stable. I recorded about 2.5GB of RTMP stream. However VLC and mplayer sometimes just stop playing. I have to investigate why this happens.

I still have to figure out how to pipe into mplayer instead of VLC. And how piping in Windows works.

And I wonder what the RTMP parameters of zattoo.com are...

What I want and what I don't want (aka HoppTheBroom's TV manifesto)

I'd like to pay for TV over TCP/IP. I would like to choose my available TV channels via an API of my IP TV provider and pay for them on a monthly base and for single occasions.

Example:
I choose TV channels Pro7, Sat1 and RTL and I pay CHF 3.00/month for each channel.
And I want to watch RTL2 on 9. March 2011 starting from 20:00 for a duration of three hours and I pay CHF 1.00 for this single occasion.
And so on.

And I want to use the video player of my choice (VLC / mplayer) and not some crappy, pseudo-proprietary flash player of my IP TV provider.

And I want to record for what I'm paying for to my hard disk and watch it whenever I want and as often I like.

And I don't want any additional commercials and advertising.

And I don't want an additional physical device in my living room beside my (theoretical) Linux HTPC. All these infamous devices of Swisscom TV and Cablecom/UPC digital tv
  1. do not work at all
  2. look clumsy
  3. consume a lot of power
  4. may have a fan / noisy hard disk
  5. and not to mention the additional remote control...

Until this is fixed, I'm trying to find some detours and workarounds to create a similar situation. And one day we'll get there anyway. Citation allowed.

Links & thanks

Much kudos to Luke Kenneth Casson Leighton, Andrej Stepanchuk, Howard Chu and the Flvstreamer Team.
Comments