Hi today I want to tell you about a very interesting script that allows you to follow the live streaming Rai without having to download the novell Moonligth and codecs owners Microsoft.
Create the file. Guardatv inside your home and paste the code found in the appendix inside and make it executable (chmod + x $. Guardatv)
download this file PNG (with transparent background ). Open a terminal and change to the directory where you downloaded the image, and run the following command: # sudo cp
linuxrai48.png / usr / share / pixmaps /
Now add a starter in the panel of your ED: Right click over the panel, add a new element, electric starter. Now put the name and description you want. How to enter command:
. / .guardatv
and choose the icon, give the path where you put the image in the example was:
/ usr/share/pixmaps/linuxrai48.png
put on the check mark "Run in Terminal" , close look at that look great and makes the button to see new programs Rai right in your panel.
There are no special dependencies owners as well as codec and VLC I had to download the package dialog.
looks like on my Linux box
Linkografia
-
http://idl3.wordpress.com/2009/ 09/29/howto-guarda-i-canali-rai-con-gnulinux /
-
http://www.slacky.eu/wikislack/index.php?title=Rai.tv_senza_silverlight
src = "http://pagead2.googlesyndication.com/pagead/show_ads.js">
# / bin / bash #
use, modify, rewrite this script as you like.
# if something bad happens because of this script, #
I was not there, and if I was there I slept, ergo: they are your cabbage.
clear?
# version: 0.2.1
# # USER CONFIGURATION
tries = 5 # Attempts to download any file
timeout = 10 # maximum time to wait for the response
download (seconds)
player = "vlc" # name of the video player.
output = "yes" # send video messages to the player?
(yes / no)
background = "no" # sending the player in the background, so you
available from the terminal?
# to save the stream, use your favorite player.
# mplayer for example, just change the variable "player" to: #
player = "mplayer-dumpfile stream.wmv-dumpstream"
############ REAL PROGRAM # # # # ############
############ NON MODIFICARE! ################
NOTFOUND = ""
for wget command in sed grep awk tail head dialog;
do if [-z "` Which $ command 2> / dev / null `"]; then
NOTFOUND = "` echo "$ NOTFOUND $ command" `" fi
done if [-n "` Which KDialog `"]; then
USEKDIALOG = "true"
else
USEKDIALOG = "false "
fi if [-n" $ NOTFOUND "];
then echo" Comand non trovati: "echo $
NOTFOUND
exit 1 fi
User Agent = 'Mozilla/5.0 (X11, U; Linux i686; it; rv : 1.9.0.6) Gecko/2009011912
Firefox/3.0.11 '
PLAYERCMD = "` echo $ player
;;
*)
echo "Variable \\" background \\ "admits only"
echo "values \u200b\u200b\\" yes \\ "and \\" no \\ "" exit 1
;;
esac
help () {
echo "Script to display the channel on
rai.tv"
echo "without the Silverlight plugin from Microsoft or Novell's Moonlight
"
echo "Created by Luke88 - luke88 slacky.it _at_"
echo-e "\\ nUso: \\ t $ 0 chiave_ricerca \\ tcerca
channel in the list "
echo-e" \\ t all $ 0 \\ t \\ tlist full channel "
echo" "echo
to configure the behavior of players and player"
echo "change the variables at the beginning of this scirpt"
echo "with your favorite editor"
echo-e "\\ nThis script does not carry with it guarantees of any kind
"
} update () {echo
" exhaust the list of channels ...."
rm $ {0}. Xml &> / dev / null
wget-U "$ USERAGENT" - tries = $ tries - timeout = $ timeout
-O $ {0}. Xml - tries = $ tries
www.rai.tv/dl/RaiTV/videoWall/PublishingBlock-5566288c-3d21-48dc-b3e2-af7fbe3b2af8.xml
&> / dev / null
if [! -S $ {0}. Xml]
then echo "Download failed! Check the connection
internet e rilancia il programma"
exit 1
fi
rm ${0}.tmp &>/dev/null
grep -B 1 '<url>' ${0}.xml
sed-i 's / \\ & # 236 \\; / ì / g' $ {0}
tmp sed-i. 'S / \\ & # 237 \\; / ì / g' {0} $ tmp.
sed-i 's / \\ & # 242 \\, / ò / g' $ {0}
tmp sed-i. 's / \\ & # 242 \\, / ò / g' $ {0} tmp.
sed-i 's / \\ & # 249 \\; / u / g' $ {0}
tmp sed-is / \\ & amp \\;. / \\ \\ \\ & / g {0} $ tmp.
sed-is / \\ & quot \\, / \\ '/ g $ {0}
tmp sed-is / \\ & # 039 \\;. / \\' / g {0} $ tmp = 0
COUNTER. rm $ {0}. canali &> / dev / null
while read line;
do let "NUM = $ COUNTER% 2"
if [$ NUM-eq 0];
then let "NUM = $ COUNTER% 20" #
something we see on the screen ...
if [$ NUM-eq 0];
then let "NUM = $ COUNTER / 2" # 10
each stream we say to those who are ...
echo-n $ NUM
else echo-n "."
fi echo-en $ line
echo-en $ line
check_dwn} () {
if [! -S $ {0}. Tmp];
then echo "Download failed!
controls the internet connection and raises the"
exit 1 fi}
play () {
if [-z "` echo $ STREAMS
check_dwn
TMP = "` tail-n 2 $ {0}. Tmp echo "(moves his hand) - You
* NOT * want to see this channel"
rm $ {0}.
tmp exit 1
else if [-n "` grep 'mms: / /' $ {0} . tmp `"
], then
STREAM = "` grep 'mms: / /'
$ {0}. tmp STREAM = "` grep 'http://'
$ {0}. Tmp `"
############################
################################# # Amendment 04/07/2009 -
jigen74
# the stream has a
form like: # \u0026lt;ASX
VERSION="3.0"> \u0026lt;Entry> \u0026lt;REF HREF ="..."
/> \u0026lt;/ ENTRY> \u0026lt;/ ASX>
# For which to retrieve the correct URL
read the contents of HREF
#################################
############################ if [-n "` echo $ STREAMS STREAM="`echo
$STREAM &>/dev/null
check_dwn
if [ -n "`grep
'mms://' ${0}.tmp`" ]; then
STREAM="`grep 'mms://' ${0}.tmp
# Edit
04/07/2009 - jigen74
# else
replaced with control
# elif extension
.
wmv # if the stream has not
extension should not be changed
####### #################################################
elif [-n "` grep
. 'wmv' $ {0}. tmp `"] then
STREAM="`grep '.wmv' ${0}.tmp $player "$STREAM"
&>/dev/null &
;;
esac
;;
[Ss][Ii])
case $background in
[Nn][Oo])
$player "$STREAM"
;;
[Ss][Ii])
$player "$STREAM" &
;;
esac
;;
esac
}
if ["$ 1" == "-h"] in
1)
if [ "$USEKDIALOG" == "true" ];
then
TMP="`echo $line echo -e "`echo ${line} 0)
COUNTER = 1 # only need to 'skip a turn
'
;;
1)
if [-z "` echo $ line staining
for vim ...
fi COUNTER = 2
# else we chasm
address ... I do not do anything ... COUNTER = 0 fi
;;
2)
if ["$ USEKDIALOG" == "true"];
then echo-e "` echo $ {line} echo \\ "\\">> $ {0}
. list # #
echo \\ "$ line \\">> $ {0}
. list # "# \u0026lt;- reset the color to
vim ...
fi COUNTER = 1
;;
esac fi done
if [! -S $ {0}. List];
then echo "Channel not found ..."
exit 0 fi rm $ {0}
. Reply &> / dev / null
REPLY = ""
if ["$ USEKDIALOG" == "True"];
then STREAM = `kdialog - title" Without Rai.tv Silverlight -
menu "available channels list" $ (cat $ {0}. List) `
else while [-z" $ REPLY "];
do dialog - title" Stream available "- help-button
- item-help - menu" Choose to open the stream "20 70 12 -
$ file {0}. list 2> $ {0}.
reply REPLY = "` tail-n 1 $ {0}. reply `"
rm $ {0}. reply &> / dev / null
if [-n "` echo $ REPLY # "` "# \u0026lt;\u0026lt;-Color vim restore ....
NAME = "` grep-B 2 "$ REPLY" $ {0}. List A-2 "$ REPLY" $ {0}. List box in which the player would have appeared embedded there was only a white box.
without losing heart uninstalled the extension installed from the project site (Tools → Add-ons) and I manually deleted the library malignant "silverlight-media-pack-linux-x86-5-1.so"
cd .mozilla / plugins / rm-rf
moonlight silverlight-media-pack-linux-x86-5-1.so
Restarting firefox to stream the rai.tv has finally appeared
0 comments:
Post a Comment