Convert and Resize Images and Movies

Mogrify is a commanline utility included with ImageMagick.

To resize an image if you have imageMagick use:

   # mogrify -resize 50% rose.jpg
or
   # mogrify -resize 1200x1200 *.jpg

or to reduce size and quality
   # mogrify -resize 1200x1200 -quality 50 *.jpg

To convert an image use:

# convert rose.jpg rose.png

More Examples of converting with ImageMagick

ImageMagick v6 Examples -- Reference Index

To convert Canon AVI files to mpg and reduce the size by 60%

# ffmpeg -i Origional.AVI -target ntsc-dvd New.mpg

To convert Canon AVI files to mpg and reduce the size by 80%

# ffmpeg -i Origional.AVI -target ntsc-dvd -b 3000k -ab 256k New.mpg

Note that you can adjust the video bit rate from -b 3000k per second, and you can adjust the audio bit rate from -ab 256k (but only in increments of 64k).

To convert AVI to MPG and reduce the size by 90% (Note: higher crf smaller size, 18-27)

# ffmpeg -i Origional.AVI -vcodec libx264 -strict -2 -crf 27 New.mp4

# ffmpeg -i Origional.AVI -target ntsc-vcd New.mpg

To convert MP4 to AVI, change size to 720x480, video bit rate to 450k, audio bit rate to 64k

# ffmpeg -i Origional.mp4 -s 720x480 -b:v 450k -ab 64k -vcodec libx264 -vprofile main New.avi

To convert 1080P to avi 1080p

# ffmpeg -i MVI_0223.MOV -vf  -c:v  -crf 23 -preset veryslow -c:a copy   MVI_0223.avi

To automate converting a batch of avi files to mpg

Create a bash shell script file called avi2mpg.sh with the following contents:

#!/bin/sh
for f in *.AVI;
do
echo "Processing $f"
ffmpeg -i "$f" -target ntsc-dvd -b 2800k -ab 256k "${f%.AVI}.mpg"
done

Subject: