Change exif timestamp of JPGs with Exiv2
I usually rename my JPG photos with the help of the Exif timestamp ("DateTimeOriginal", to be precise). It so can happen that I can't use this timestamp if I once forget setting the internal clock of my camera - because then, the timestamps aren't correct, obviously.
Exiv2 is a useful program that can quite easily change exif timestamps - among other things.
So in a nutshell, change the timestamp as follows:
exiv2 -a 00:01:00 ad test.jpg
This would add one minute to the timestamp of test.jpg. Of course you can also subtract a certain amount of time: Just write a minus sign in front of the timestamp.
Moreover, you can change the filename of a JPG according to the Exif timestamp like this:
exiv2 -r "%Y-%m-%d - %H-%M-%S - :basename:" mv test.jpg
This syntax keeps the original filename in the newly created filename.
Change some IPTC-Data as follows. Instead of Copyright there are other field names like Byline, Caption, Keywords...:
exiv2 -M "set Iptc.Application2.Copyright Some copyright message..." mo test.jpg
Display all Exif, IPTC, XMP data of the picture:
exiv2 -p a pr test.jpg
Comments
shawn 8/ 3/2013
thank you. That command line sucks ass. i needed the timecode code.
Leave Comment