Enno Bartels
Super tuxi


Camera tool

Minolta Dimage Xt - Script's (last update: 20. October 2003)

TOP
Back

Minolta Diamage Xt:

I have written 4 scripts for handling images/sounds/movies for the camera.

1. Post-process the downloaded digicam data
2. Move data files in a folder
3. Process data to be moved back into the cam
4. Preprocessing to move data on a windows partition

The scripts will nothing do with the cam. They will only work in your pc picture folders.





1. Post-process the downloaded digicam data
    (images, sounds, movies)

(Red = not implemented jet)


Scriptname processCamDataIntoHtmlPages.sh

Author Enno Bartels

Version 0.1

What is does
0. Read and check commandline options
1. At jpeg pictures:
Read the exif-tag and rename the file with date and time.
2. At wav files:
Read 2 parts with hexdump and rename the file with the readen date and time.
3. At mov files:
Rename the file with the creation date and time of the file.
4. Delete "pict0" from the filename of all files
5. Rotate pictures
#. Rotate movies
6. Create the preview sub direcory
7. Create previews for jpeg files
8. Create previews for movies
9. Create previews for soundfiles
10. Convert soundfiles into ogg vorbis files and add metadata
11. Create big picture for movies
##. Convert movies from mov into mpg with soundtrack
13. Filter the sound out of a movie into a ogg vorbis file.
14. Create main html page
15. Create individual html pages
##. Add a description from an ascii file to each html page
Options
-prr x Rotate a picture 90 degrees right
-prl x Rotate a picture 90 degrees left
-prf x Rotate a picture 180

-mrr x Rotate a movie 90 degrees right
-mrl x Rotate a movie 90 degrees left
-mrf x Rotate a movie 180

-gnjp : Generate no picture previews (for faster loop second time)
What it needs
jhead: Reads the JPEG exif header.
http://www.sentex.net/~mwandel/jhead/

mplayer: Generates sound and previews from movies.

sox: Converts the minolta wav files into normal wav files.

wavetools: wplot Generate previews for sound files.
http://tph.tuwien.ac.at/~oemer/wavetools.html
(make; make wplot;)
And please correct the WAVETOOLS_WPLOT_DIR variable in the processCamDataIntoHtmlPages.sh script!

gs: Ghostscript:
Convert postscript to jpeg

oggenc: Convert wav to ogg sound files

How to work with
1. Switch the camera on.
2. Put the usb cable into the cam.
3. After some seconds the pc says BEEP.
4. There should be a new line in the /etc/fstab file
So you can mount the cam as a normal filesystem with:
mount /media/sda1
(On SuSE 8.2)
5. Copy the sub folder with the cam pictures you want to proceed on a place of you pc harddisk.
cp -r /media/sda1/dcim/10131027 ~/Bilder/.
6. Do a sync with the sync command on a terminal.
7. Go inside the directory on your PC.
cd ~/Bilder/10131027
8. Start the script:
sh ~/Projekte/minolta_dimage_xt/tools/processCamDataIntoHtmlPages.sh
Download processCamDataIntoHtmlPages.sh

Examples sh ~/tools/processCamDataIntoHtmlPages.sh -rl 1 -rl 5 -rr 16 -rr 18 -rr 19 -gnjp








2. Move data files in a folder
    (images, sounds, movies)

Scriptname movePictures.sh <no. from> <no. to>

Author Enno Bartels

Version 0.1

What is does 1. Moving data files with file number xxx. to yyy.
Options None
What it needs Nothing special
How to work with 1.
Download movePictures.sh

Examples sh ~/tools/movePictures.sh 5 10







3. Process data to be moved back into the cam
    (images, sounds, movies) If you want get the data from the camera you have to do the



(Red = not implemented jet)


Scriptname backIntoCam.sh

Author Enno Bartels

Version 0.1

What is does
1. Create a sub folder for the back into cam data.
It will be named: xxxYMMDD
2. Find all *.mov *.jpg *.wav .
Copy them in the new folder.
Translate the filenames back to pictXXXX.??? in the new folder.
3. Correct picture - stage 1
Rotate pictures with the right size of (2048*1536) and the wrong orientation.
4. Correct picture - stage 2
Not right scalled pictures will be scalled to (2048*1536). And they may be rotate if the orientation is wrong.
5. Correct picture - stage 3
Pictures with no EXIF header: A EXIF header will be added and filed with the right values.
6. Correct sounds -
???
6. Correct movies -
???
Options None
What it needs ????
How to work with
1. Go into that data directory on your pc you want to bring back into the digicam.
cd ~/Bilder/10131027
2. Start the script.
sh ~/backIntoCam.sh
3. There should be a new subfolder with the name xxxYMMDD.
4. Turn on the digicam.
5. Connect the cam with the computer via usb cable.
6. You will hear a BEEP if the computer detected the cam.
7. Now you can mount the cam:
mount /media/sda1
(On SuSE 8.2)
8. Copy the new folder to the cam subfolder
cp -r ~/Bilder/xxxYMMDD /media/sda1/dcim/.
9. Rename the sub folder.
Change Y to the actuall year. 2003 -> 3
Change MM to the actuall month. October -> 10
Change DD to the actuall day. 1 -> 01
Change xxx to the hights number of the other folders plus 1.
If there is no other folder use 100
Download backIntoCam.sh

Examples sh ~/tools/backIntoCam.sh







4. Preprocessing to move data on a windows partition
    (images, sounds, movies)

Scriptname change_SpecCharaters.sh

Author Enno Bartels

Version 0.1

What is does 1. Change all filenames with : characters into _ characters.
2. Change the link names in html pages with : characters into _ characters.
Options None
What it needs Nothing special
How to work with 1. ?
Download change_SpecCharaters.sh

Examples sh ~/tools/change_SpecCharaters.sh







Mail:

Feel free to send comments/suggestions/patches !
ennobartels@t-online.de