Posts Tagged With: convert

Script to Convert FLV to AVI

Tagged with: , , , , , ,

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 »

Convent Ico to Gif

Tagged with: , , , , ,

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 »

Convert all Ico files to Gif

Tagged with: , , , , , ,

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 »

Change Case

Tagged with: , , , , , ,

Convert from lower case to upper case


echo 'hello world' | tr '[:lower:]' '[:upper:]'
No Comments »

Batch Resize Images with ImageMagick

Tagged with: , , ,

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 »

Rip DVD using Mencoder

Tagged with: , , , , , , ,

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 »

Manual to Text

Tagged with: , , ,

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 »

Convert FLV file to MPEG

Tagged with: , , , , , , ,

Convert FLV file to MPEG using ffmpeg


ffmpeg -i myFile.flv -ab 56 -ar 22050 -b 500 -s 320x240 myFile.mpg
1 Comment »

Command for Converting Video Format Using Mencoder

Tagged with: , , , ,

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 »