Tag Archives: convert

Creating PDF files from images

Creating PDF files from images is really easy to do with the ImageMagick suite installed. This software suite can handle over 100 different image formats and is essential to have if you manipulate large batches of images. It has all sorts of useful functions; translate, flip, mirror, rotate, scale,  shear and transform images, adjust image colors, apply various special  effects, or draw text, lines, polygons, ellipses and Bézier curves.

 

  • Install imagemagick if it’s not present:
sudo apt-get install imagemagick

 

  • Convert some files into a PDF file:
convert file1.jpg file2.jpg document.pdf

or

convert *.jpg document.pdf

 

Posted in Linux | Tagged , , , , , , | Leave a comment

Converting files to mp3

I have previously used Lame to convert different file formats to mp3. Having stumbled on some mp4 videos that refused to being converted to mp3 I thought I’d try my luck with FFmpeg instead.

Using FFmpeg was quite easy:

ffmpeg -i infile outffile.mp3

Controlling the bit-rate of the created file:

ffmpeg -b 192 -i infile outffile.mp3

 

The mp4 file was converted to mp3 without problems. Mission accomplished!

Posted in Linux | Tagged , , , , | Leave a comment

Lost in time

Keeping track of time all over the globe is hard enough. Add to this different timezones which you may not be familiar with, and brain melt-down is imminent.

Use this timezone conversion table to bring order to chaos.

You can also use this nifty tool to compare the time of different destinations all over the world.

Posted in Linux | Tagged , , , , , , , , | Leave a comment

Tame your video files

ffmpeg

An advanced tool and able to handle most file formats, is ffmpeg. Install it with:

sudo apt-get install ffmpeg

 

Converting to SVCD

Convert all files in current directory to SVCD (PAL):

for file in *; do ffmpeg -i $file -target pal-svcd ${file}_final.mpg ; done

Convert all files in current directory to SVCD (NTSC):

for file in *; do ffmpeg -i $file -target ntsc-svcd ${file}_final.mpg ; done

 

Converting to VCD

Convert all files in current directory to VCD (PAL):

for file in *; do ffmpeg -i $file -target pal-vcd ${file}_final.mpg ; done

Convert all files in current directory to VCD (NTSC):

for file in *; do ffmpeg -i $file -target ntsc-vcd ${file}_final.mpg ; done

 

Merging mpg-files

Combine two mpg-files to one, as mpeg:

cat file1.mpg file2.mpg |ffmpeg -i - -f mpeg -vcodec copy -acodec copy merged.mpg

Combine two mpg-files to one, converting to SVCD while keeping the audio in sync:

Posted in Linux | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment