Active Topics

 


Reply
Thread Tools
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#1
Some days ago the Italian public national tv changed its streams to the Microsoft Silverlight format. A few days after, a clever penguin published a bash script that extracted the single streams' urls from their xml container to be able to show them without annoying plugins:
http://www.slacky.eu/wikislack/index...za_silverlight

In order to adapt the script to the tablet, the only missing tool was the "dialog" package. Since I was too lazy to setup a scratchbox environment, I extracted the dialog binary and its libncursesw dependency from the debian lenny armel package, then made some minor adaptations to the shell script.

Everything should be in the attached compressed file. Unpack in a directory, copy "dialog" to /usr/bin/dialog and "libncursesw.5.so" to /lib/libncursesw.5.so then start the script with ./tv.sh

You'll get a list of on-air channels and on-demand archived programmes; choose one and the show should start.
I selected "mplayer -cache 1024 -framedrop" as media player program; it seems to show well cartoons, but gets some jerks with other contents.

I hope someone can suggest a more optimized backend, or fiddle with the script, i.e. to port to python.

Non-Italians might need to connect through an Italian proxy server to get the streams because by now the silly policies of rai-tv seem to prevent connections from abroad.

EDIT: upgraded to original version 0.15 (*****s from rai-tv started sending advertisements instead that streams for user agents they disliked)
Attached Files
File Type: gz raitv_0.15.tar.gz (185.7 KB, 440 views)
__________________
Ernesto de Bernardis


Last edited by debernardis; 2009-03-01 at 14:27. Reason: new version 0.15 solves an incompatibility
 

The Following 2 Users Say Thank You to debernardis For This Useful Post:
ciroip's Avatar
Posts: 334 | Thanked: 366 times | Joined on Nov 2008 @ Italy
#2
The script lead to a 650kb XML (SEICENTOCINQUANTA F KB) for mere 25 clips (SonoPazziQuestiItaliani)
I have no experience at all with shell scripts (and just beginned with python) so maybe Im missing something (access to more channels? different lists?) Otherwise I don't think the number of clips I found there deserve all the efforts
anyway the python lines I used to obtain the list are:
Code:
import urllib

raiaddr=   "http://www.rai.tv/dl/RaiTV/videoWall/PublishingBlock-5566288c-3d21-48dc-b3e2-af7fbe3b2af8.xml"
raipage = urllib.urlopen(raiaddr)
#print raipage.read()

for line in raipage:
  if 'mms' in line:
    d=line.split("mms")[-1].split("wmv")[0]
    print "mms"+d+"wmv"
In case someone is really interested calling a player from python is pretty straighforward and adding a bit of interface should not be too hard.
Here the list of clips in case someone wish is to try them and decide if the quality level is enough for more attentions (and if the contents are locked from outside IT)
<url>mms://rntlivewm.rai.it/raidue/storieanimate/storieanimate_avventuremarchesisquaretti.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/alberoazzurro/albero1302_fiaba.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/Hocuslotus/hocuselotus_thedinocrocfish.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/alberoazzurro/albero2202_ricette.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/Lestoriedianna/Anna_Fidanzato.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/UltimodeiMochicani/Mohicani_TestaNera.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/Sissi/Sissi_Gita.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/Scuoladivampiri/Vampiri_SangueFresco.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/ratman/ratman_punt04_ipupacchiotti.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/Accipicchia/accipicchia4_puntiinterrogativi.wmv</url>
<url>mms://rntlivewm.rai.it/raiuno/tilasciounacanzone/tluc_2604_5.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/pippochennedy/pippochennedy1_14.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/pippochennedy/pippochennedy1_11.wmv</url>
<url>mms://rntlivewm.rai.it/raiuno/staserapagoio/staserapagoiocalifano3.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/tuttototo/telecamere.wmv</url>
<url>mms://rntlivewm.rai.it/rai/arbore/Aaltra.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/pippochennedy/pippochennedy1_16.wmv</url>
<url>mms://rntlivewm.rai.it/rai/arbore/Sfracchia.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/pippochennedy/pippochennedy1_9.wmv</url>
<url>mms://rntlivewm.rai.it/raidue/pippochennedy/pippochennedy1_7.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/visioniprivate/visioniprivate_010808.wmv</url>
<url>mms://rntlivewm.rai.it/raiuno/superquark/0309super5.wmv</url>
<url>mms://raimm1w.rai.it/international/focus/focus_scienza/20090214.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/junior/HitScience/Superolly_281006.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/ceraunavolta/ceraunavolta02012008.wmv</url>
<url>mms://rntlivewm.rai.it/raitre/cultbook/CultBook27032008GiulianaBruno.wmv</url>
Buona Settimana
__________________
I can't do it. No one can help.
[SIGPIC][/SIGPIC]

Flip Alarm Clock - 3DMania Theme - Synesthesia - Deluxepain
http://ciroip.blogspot.com/
http://twitter.com/ciroippolito
 
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#3
By extracting only lines containing "mms" you're losing all the "on-air" channels, "in diretta" (rai1, rai2, rai3, rai news 24, rai sport +, rai storia, rai edu 1), and a lot of on-demand programs including parts of the Sanremo Festival ( sorry ), documentaries and so on.
The majority of streams are encoded in the form of "http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=<put here a number>", which in turn links to a mms: stream.
The mms relinked streams urls are changing really fast, so it's no use caching them for more than 10-20 seconds.
Try the shell script and you'll see.
__________________
Ernesto de Bernardis

 

The Following User Says Thank You to debernardis For This Useful Post:
noventa98's Avatar
Posts: 122 | Thanked: 51 times | Joined on Nov 2007 @ Paris, France
#4
Nice find, pity that Italian TV is mosty trash...

Antonio
 

The Following User Says Thank You to noventa98 For This Useful Post:
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#5
There used to be some good nature- and science programs on rai due. The last time I tried to access Italian TV over the internet they blocked non-Italian IP addresses though. However, those mms links above weren't blocked, so maybe I'll look at this again.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:07.