Wednesday, February 21, 2007

Adobe Reader on FC6

I suppose many others too might have faced this problem of Adobe Reader not working in FC 6. so here's a workaround
Edit the file /bin/acroread and replace the following line:

check_gtk_ver_and_set_lib_path "$MIN_GTK_VERSION"

with

# check_gtk_ver_and_set_lib_path "$MIN_GTK_VERSION"

(i.e. comment the line).

It worked for me. Thanks to AshutoshJSharma on Adobeforums.

Wednesday, February 14, 2007

Reset the binary screen

Sometimes it gets really irritating if you mistakenly do a cat of some binary file and you end up with a command prompt that shows up with binary characters and everything you type on screen echoes as binary characters. the remedy is simple
just type "reset" and press enter.

Tuesday, February 13, 2007

Youtube downloads

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.