Archive

Archive for the ‘Multimedia’ Category

Add a Datestamp to Digital Photos

January 7th, 2009
No comments
I had a friend of mine that didn’t realize his “datestamp” feature on his digital camera wasn’t turned on when he took some pictures while out of town. He wanted to have that little neon date stamped on all the pictures so he would know when they were taken. Of course you could use Photoshop, but what fun is that? Using command line “mogrify”, a part of ImageMagick I believe, was a great solution.

Here is the basic command for a 3264×2448 image:
mogrify \
-font /usr/share/fonts/truetype/msttcorefonts/arial.ttf \
-pointsize 96 \
-draw "gravity southeast fill orange text 275,150 '10.05.2008'" \
picture.jpg

And even a step further, you could easily start with command above and put it in a loop to recurse directories of photos extracting the actual date the picture was taken from the EXIF info using jhead.

Multimedia , , ,

DVD to iPod Made Easy

January 3rd, 2009
No comments
Taking one of your DVDs and putting it on your iPod is relatively easy on Debian Linux (Lenny) using the very powerful applications; vobcopy, cat, and ffmpeg. Be prepared to install some new apps if you don’t already have them, but that is really easy with aptitude (apt-get).

First you’ll need to modify your sources.list file to add the debian-multimedia.org repository.
vi /etc/apt/sources.list

and add …
deb http://www.debian-multimedia.org lenny main
deb-src http://www.debian-multimedia.org lenny main

Then run the following:
apt-get update
apt-get install debian-multimedia-keyring
apt-get update
apt-get build-dep ffmpeg
apt-get install build-essential subversion
apt-get install ffmpeg

Finish up with this:
apt-get install libdvdread3 libdvdcss2 vobcopy

Put your DVD in and run the following which will create some .vob files on the same directory level where you ran it:
vobcopy

Combine the .vob files by running:
cat *.vob > full.vob

Now run ffmpeg, tweaking any settings you need to (first remove the comments):
ffmpeg \
-i full.vob \   # input file name
-f mp4 \        # output file format
-r 30 \         # frame rate
-vcodec mpeg4 \ # video codec
-maxrate 1000 \ # maximum video bitrate tolerance
-b 700 \        # video bitrate in kbit/s
-qmin 3 \       # minimum video quantiser scale (VBR)
-qmax 5 \       # maximum video quantiser scale (VBR)
-bufsize 4096 \ # rate control buffer size
-g 300 \        # gop (group of pictures) size
-acodec aac \   # audio codec to use
-ar 44100 \     # audio sampling frequency
-ab 192 \       # audio bitrate
-ac 2 \         # the 2 stereo channels
-s 320x240 \    # output resolution
-aspect 4:3 \   # aspect ratio
~/new.mp4       # filename for output

Where credit is due - the site(s) where I got help and info:
- http://ramblings.narrabilis.com/wp/howto-encode-dvd-video-for-an-ipod-ffmpeg/

Multimedia , , , ,