I’m trying to improve my english and, every now and again, I like listening english audio tracks with my mp3 player. Some of these audio tracks are from video files (.VOB).
This is a small recipe to know how to extract audio tracks from a .vob type files.

You can do it by using mplayer this way:

$mplayer videofile.VOB -ao pcm:file=audio.wav

in one more step, we can convert .wav to .mp3 by using lame:

$lame --vbr-new -V 1 --resample 44100 audio.wav audio.mp3

Most of mp3 players don’t read .ogg free audio format files. This is a small recipe to convert an ogg file to mp3 (non-free, patented) one.
First of all you have to install these packages:
#apt-get install vorbis-tools lame
and, next step:
$ ogg123 -d wav -f - file.ogg | lame - file.mp3

A friend of mine sent me a lot of pictures in .ARW format one week ago. Now I need to convert them to .jpg so, to do it in one step, I’ve written a short bash script I show here. Before execute the script, you have to install two utilities, imagemagick (contains “convert”) and dcraw. You can do it this way for instance:

#apt-get install imagemagick
#apt-get install dcraw

The script I’ve called it raw2jpg, you can see it below:

—————————————–

#raw2jpg.sh april 2008
#Converts .raw files to .jpg
#Must be installed dcraw and convert utilities before run this program.
#Jorge Muñoz Rodenas <jorgeroden1@gmail.com> Albacete (Spain)
#bash script licensed under GPL v3.0

echo Step 1 of 3: .arw to .ppm conversion, wait...
for file in *.ARW; do
dcraw $file
done

echo Step 2 of 3: .ppm to .jpg conversion, wait...
for file in *.ppm ; do
convert $file ${file/.ppm/%d.jpg}
done

echo Step 3 of 3: Deleting .ppm files, wait...
rm *.ppm
echo done!

———————————-
You can copy this script in your work directory and it will convert all .ARW files to jpg by typing

$./arw2jpg.sh

I hope this script be useful for you.

regards

 

November 2009
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Blog Stats

  • 518 hits

my del.icio.us