Friday, June 20th, 2008 11:00 PM
This will convert a flv file to a avi file. I got this off linux.com. It uses mencoder - so make sure you have that.
#!/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
No Comments »
Monday, May 26th, 2008 11:16 PM
This will convert all the ico files in the folder to gif. It uses the final frame of the ico file to create the gif.
for i in *.ico; do convert `mogrify -identify $i|awk '{print $1}'|tail -n1` $i.gif; done
No Comments »
Monday, March 17th, 2008 11:17 PM
I had a collection of ico files with the ext gif - these are the commands I used to fix the situation…
rename .gif .ico *.gif
find . -name '*.ico' -exec convert "{}" "{}.gif" \;
OR
mogrify -format gif *.ico
rm -f *.ico
No Comments »
Tuesday, March 4th, 2008 11:20 PM
Convert from lower case to upper case
echo 'hello world' | tr '[:lower:]' '[:upper:]'
No Comments »
Saturday, February 16th, 2008 11:23 PM
Batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)
find . -maxdepth 1 -name *.jpg -print -exec convert "{}" -resize 80x60 "thumbs/{}" \;
No Comments »
Tuesday, January 1st, 2008 10:55 PM
Rip a DVD to an AVI file using mencoder
mencoder dvd://1 -dvd-device /mnt/Image/ -ovc xvid -xvidencopts pass=1 -alang en -oac mp3lame -o /dev/null
No Comments »
Friday, November 16th, 2007 10:44 PM
Ever wonder how you can get a man page in into a format you can read and print?
man command | col -x -b > command.txt
Original Article
No Comments »
Friday, September 7th, 2007 10:38 PM
Convert FLV file to MPEG using ffmpeg
ffmpeg -i myFile.flv -ab 56 -ar 22050 -b 500 -s 320x240 myFile.mpg
1 Comment »
Wednesday, August 29th, 2007 10:31 PM
Convent video using mencoder in linux…
mencoder input.mpg -o output.avi -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc
http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html
http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide
[tags]video,convert,mencoder,encode,format[/tags]
No Comments »