Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Hi, I have found the script that will suposedly let you watch music videos from www.launch.yahoo.com , but I have no idea where I have to enter it to make it work. Do I put it in a text editor, and if so what extension do I give it. Please also check the script below 2 see if it will work:
Code:
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: launch.sh <videoid> (<bandwidth>) (<protocol>) <mplayer-options>"
echo " videoid = Lauch Video ID"
echo " bandwidth = 56,128,300 (default 300)"
echo " protocol = mms,http (default mms)"
echo " mplayer options can be passed via command line"
echo "Example:"
echo " MMS:"
echo " launch.sh 1112809 300 mms"
echo " HTTP:"
echo " launch.sh 1112809 300 http"
echo " HTTP with mplayer options:"
echo " launch.sh 1112809 300 http -verbose 0 -cache 500"
exit 0
fi
videoid=$1
shift
if [ $1 -eq $1 ] && [ $1 != 0 ]; then
bandwidth=$1
shift
else
# 56 or 128 or 300
bandwidth=300
fi
file1=$(wget "http://launchtoday.launch.yahoo.com/player/medialog.asp?vid=$videoid&cid=1&pid=4&csid=396500550&p1=&p2=&p3=2&bw=$bandwidth&mf=1&origin=35&pguid=AA388C059C7849D99CCFBC72B6F51E37&uid=42&sk=bad551cd352143eb2da02&z=ms.asx" -q -O -)
if [ $1 == "http" ]; then
file2=$(wget "$file1" -q -O - | sed 's/mms:/http:/g')
shift
else
file2=$(wget "$file1" -q -O -)
fi
mplayer -cache 500 $file2 $@
I am a complete newb as u hav probably guessed so dnt expect any scripting experience. Thanks in advance, Alan
Yes , you put it in a text editor and you save it.It doesn't matter what extension you give it or if you give it any extension at all.Just give it a name which will remind you what it does.
The quickest way to see if it works is to actually run it.
Was very interested by this conversation because i often have to boot in to windoze mode for vids (i often just leave my computer running music videos as i dont have a TV) .
I have installed greesmonkey and have the little monkey sign at the bottom of my screen, but when i try to run the video it stills ays you need netscape 4x (or what ever it is) ...
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe