Re: modifying photo timestamps with jhead

Replies:

Parents:

On Fri, Nov 01, 2002 at 04:21:52AM +0100, Henrik Edlund wrote:
> Here is a little shell script I did for my IXUS 330 (should work with all
> Canon digital cameras I guess) that sets file modification time of the JPG
> and AVI files to that of the EXIF timestamp, useful for sorting files
> after when they were shot.

I use 'epinfo' for this, usually:

   epinfo -rf $W/%Y/%m/%d/%H-%M-%S.jpg IMG*

This renames files based on the exif timestamps, using your
current timezone setting. (I have $W set to /home/gerald/www )

epinfo comes with photopc [1], very useful.

I wrote a shell script [2] to rename AVI files based on the
timestamp, quite similar to your approach (also uses 'strings'
to get the time/date, since there doesn't seem to be any
structured data like exif in the file.)

more notes on related stuff: http://impressive.net/software/photo/

[1] http://photopc.sourceforge.net/
   or "apt-get install photopc" on debian systems

[2] http://impressive.net/people/gerald/2002/04/rename-vids

--
Gerald Oskoboiny <[email protected]>
http://impressive.net/people/gerald/

Re: modifying photo timestamps with jhead

Replies:

Parents:

On Thu, 31 Oct 2002, Gerald Oskoboiny wrote:

GO> I use 'epinfo' for this, usually:
GO>
GO>     epinfo -rf $W/%Y/%m/%d/%H-%M-%S.jpg IMG*
GO>
GO> This renames files based on the exif timestamps, using your
GO> current timezone setting. (I have $W set to /home/gerald/www )
GO>
GO> epinfo comes with photopc [1], very useful.

Mmm, yes, but I don't want to rename my files, just set their file
modification time. :-) Their names can be anything, I use the file
modification time to see when they were shot.

Something I would like to change is the dependency on jhead, but it seems
the EXIF timestamp is not stored in in clear text as it is in the AVI
file.

(I also forgot to mention in my earlier email that the script does not use
GNU-ism either. Hence it should work, a rare thing today, in Unix
environments without GNU utilities.)

Re: modifying photo timestamps with jhead

Replies:

  • None.

Parents:

Henrik Edlund <[email protected]> writes:

> On Thu, 31 Oct 2002, Gerald Oskoboiny wrote:
>
> GO> I use 'epinfo' for this, usually:
> GO>
> GO>     epinfo -rf $W/%Y/%m/%d/%H-%M-%S.jpg IMG*
> GO>
> GO> This renames files based on the exif timestamps, using your
> GO> current timezone setting. (I have $W set to /home/gerald/www )
> GO>
> GO> epinfo comes with photopc [1], very useful.
>
> Mmm, yes, but I don't want to rename my files, just set their file
> modification time. :-) Their names can be anything, I use the file
> modification time to see when they were shot.

Epinfo is good for that too.  I rename and set timestamps with it
using above and

epinfo -t -r *.jpg

My script then generate thumbnails and medium sized photos and uses
the original's timestamp for them and the generated html page for the
medium sized photo.  I display last-modified on my photo pages using
server side includes.

for i in `ls *.jpg | egrep -v '(sm|med)' | sed -e 's/.jpg//'`; do touch -r $i.jpg $i-{med,sm}* ; done

> (I also forgot to mention in my earlier email that the script does not use
> GNU-ism either. Hence it should work, a rare thing today, in Unix
> environments without GNU utilities.)

Dunno offhand if epinfo works on solaris or not.

--
Ted Guild <[email protected]>
http://www.guilds.net

Re: modifying photo timestamps with jhead

Replies:

  • None.

Parents:

On Thu, 31 Oct 2002, Gerald Oskoboiny wrote:

> I use 'epinfo' for this, usually:
>
>     epinfo -rf $W/%Y/%m/%d/%H-%M-%S.jpg IMG*
>
> This renames files based on the exif timestamps, using your
> current timezone setting. (I have $W set to /home/gerald/www )

I also use epinfo but with the -z option to only have UTC dates in the
filename, matching the EXIF date. Of course it's not a big problem if your
machine is in a timezone where there are no daylight saving times ;)

--
~~Yves

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny