[LAU] Saving youtube audio and video

Kjetil S. Matheussen k.s.matheussen at notam02.no
Sat Jan 5 11:13:37 EST 2008


Adam Sampson:
> thomas fisher <studio1 at commspeed.net> writes:
>
>> Tommi promising looking application, but it appears to be not open
>> source and a limited trial time period teaser.
>
> It's really not very hard to save videos from YouTube, and no
> proprietary software is required -- you just need to build the right
> URL, and there are various scripts to do that:
>
>  http://www.arrakis.es/~rggi3/youtube-dl/
>  http://offog.org/darcs/misccode/youtubeget
>
> (I wrote the second, but I wouldn't have bothered had I known the
> first existed...)
>
> The resulting files can be played with VLC or MPlayer.

Here's my script to reliably stream youtube videos:
(it depends on yotube-dl)


#!/bin/sh
rm -f /tmp/ai

echo $1 >/tmp/link
xterm -e youtube-dl `cat /tmp/link` -o /tmp/ai &

while [ ! -s /tmp/ai ] ; do
   echo "File not available yet, sleeping 2 seconds"
   sleep 2;
done

echo "Caching 10 seconds before starting to play"
sleep 3;
echo 7
sleep 3;
echo 4
sleep 3;
echo 1
sleep 1;
echo 0
echo
echo "In case mplayer stops abruptly, run:"
echo "mplayer -delay 0.3 /tmp/ai"
echo "...to manually restart the player."

xterm -e mplayer -delay 0.3 /tmp/ai




More information about the Linux-audio-user mailing list