Posts Tagged With: convert

Convert RAW files to JPEG

Tagged with: , , , , , ,

Convert RAW files to JPEG in batch. Convert all files in a folder using a command. For this to work, first you must have ‘ufraw’ package installed. sudo apt-get install ufraw or sudo yum install ufraw depending on your OS.


find . -type f -name "*.CR2" -exec ufraw-batch --out-type=jpeg '{}' \;
No Comments »

Trim Image Edge

Tagged with: , , , , , ,

Use this command to cut off the edges off an image…


convert -trim image.jpg output.jpg
No Comments »

Shell Script for Batch Convertion of Images

Tagged with: , , , , , ,

An easier way to batch convert images using the ‘convert’ command


#!/bin/sh
# An Easy command to use the convert command. Makes sure that the rename problem don't happen

if [ ! -d "Out" ]; then
        mkdir Out
fi

sel="*.*"
if [ $# -eq 2 ] ; then
        sel=$2
fi

for i in $sel; do
        echo -n "Converting $i ... "
        convert $1 $i Out/$i
        echo "Done"
done
3 Comments »

Batch Resize Image

Tagged with: , , , , , , ,

Resize all JPG Files to 800×600


convert -sample 800x600 *.jpg output_file_name
5 Comments »

Convent Video to 3gp(mobile) format

Tagged with: , , , ,

This command uses ffmpeg to convert a regular video into 3gp format thats used in mobile phones


ffmpeg -i input_video.mp4 -s 176x144 -vcodec h263 -r 25 -b 12200 -ab 12200 -ac 1 -ar 8000 output_video.3gp

Original Article

1 Comment »

Convert Bin/Cue Images to ISO Image using Linux Command

Tagged with: , , , , , , ,

You can use this command to convert a Bin/Cue image to an ISO image in a linux system. You may not have the bchunk command – so use yum or apt to install it before converting the image.


bchunk IMAGE.bin IMAGE.cue IMAGE.iso

Original Article

2 Comments »

Linux Command to Convert a Video to PSP’s MP4 Format

Tagged with: , , , , , ,

Linux command to convert a video file to PSP format using ffmpeg. After converting, copy the OutputFile to the video folder in your PSP.


ffmpeg -i "OriginalFile.avi" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240 "OutputFile.mp4"
7 Comments »

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
4 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 »