I normally used to use the site vixy.net for converting youtube flv videos to avi and download it to my system, but it seems to be down for some time now . So looking for alternatives I happened to find these two cools scripts that download videos from the youtube site and then convert them to avi.
Just copy this script for downloads..
http://www.arrakis.es/~rggi3/youtube-dl/youtube-dl
Details about the script are available at http://www.arrakis.es/~rggi3/youtube-dl/
-------------------------------------------------------------------------------------------------------------
Thats the script . Thanks a lot Ricardo.. Just pass the url of the youtube video as its argument and execute it and the file gets saved on to your system as a .flv file.
Then you can use this script to convert it to avi.You'll need the mencoder package for this to work.
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 {-divx|-xvid} list_of_flv_files"
exit 1
fi
# video encoding bit rate
V_BITRATE=1000
while [ "$1" ]; do
case "$1" in
-divx)
MENC_OPTS="-ovc lavc -lavcopts \
vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect"
;;
-xvid)
MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"
;;
*)
if file "$1" | grep -q "Macromedia Flash Video"; then
mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame \
-lameopts fast:preset=standard -o \
"`basename $1 .flv`.avi"
else
echo "$1 is not Flash Video. Skipping"
fi
;;
esac
shift
done
-----------------------------------------------------------------------------------------------------
To run this , just set the executable permission on the script and use the -divx option or whatever you choose as the compression format and pass the flv file as the argument. You can also pass multiple files in the same command.