ffmprovisr icon indicating copy to clipboard operation
ffmprovisr copied to clipboard

Exiftool recipes

Open ablwr opened this issue 7 years ago • 18 comments

As discussed in #310 and #309, we'd like to add an Exiftool section to ffmprovisr, but we need recipes! Please share small scripts here!

ablwr avatar Mar 28 '18 20:03 ablwr

exiftool -j input - json output exiftool -X input rdf output exiftool -v# input where # is a number between 0 and 5 levels of verbosity, 0 being simple, 5 being trace level.

kieranjol avatar Mar 28 '18 20:03 kieranjol

Getting a specific value, such as ImageWidth:

$ exiftool -s3 -Imagewidth out.jpg 
320

The -s3 gives you the value only, which i need sometimes. Using -s1 or -s2 gives element names as well.

using

$ exiftool -s out.jpg 

Will display the element names that you can use with this option for a particular file.

kieranjol avatar Mar 28 '18 20:03 kieranjol

Ahhhhh great thank you yes yes yes

ablwr avatar Mar 28 '18 20:03 ablwr

These are really simple and obvious but they're the only ones I really use at work.

On Wed, 28 Mar 2018, 21:17 Ashley, [email protected] wrote:

Ahhhhh great thank you yes yes yes

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/amiaopensource/ffmprovisr/issues/313#issuecomment-377021675, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEyvgbEZsE_OXTvf5wLd4TPgqxAlVa4ks5ti-_BgaJpZM4S_RSk .

kieranjol avatar Mar 28 '18 20:03 kieranjol

A good start. I think it's more about practical use and not knowing what is actually possible to do with a tool.

ablwr avatar Mar 28 '18 20:03 ablwr

I know that you guys are into preservation, but I use it to scrub all metadata from my images when sharing:

exiftool -all= image.ext

JonnyTech avatar Mar 28 '18 20:03 JonnyTech

Aw hell yeah @JonnyTech!!!

ablwr avatar Mar 28 '18 20:03 ablwr

To work on images in recursive subfolders:

exiftool -r -ext jpg -all= foldername

JonnyTech avatar Mar 28 '18 20:03 JonnyTech

Rename files to datetime stored in exif tag:

exiftool '-FileName<DateTimeOriginal' -d "%Y-%m-%d_%H.%M.%S%%-c.%%e" .

The output filename will be appended with -x where x is a counter number if multiple files have the same timestamp, i.e. multi burst camera photos.

JonnyTech avatar Mar 28 '18 20:03 JonnyTech

Staying with timestamps, set to specific one supplied for all files:

exiftool '-DateTimeOriginal=2018:03:28 12:00:00' .

JonnyTech avatar Mar 28 '18 21:03 JonnyTech

When the date of my camera is wrong, I shift the timestamps of the images:

Add one hour exiftool "-AllDates+=0:0:0 1" . Subtract one hour exiftool "-AllDates-=0:0:0 1" .

Format is Y:M:D h:m:s

Please note that everything is from memory and notes as I am not at work now, so please double check before publishing.

JonnyTech avatar Mar 28 '18 21:03 JonnyTech

Damn thanks so much though!!!!! I'll test all before writing them up

ablwr avatar Mar 28 '18 21:03 ablwr

Just remembered, find files with missing exif timestamp in folders:

exiftool -filename -r -if '(not $datetimeoriginal)' folderpath/

You can probably tell that I have a thing about times!

JonnyTech avatar Mar 28 '18 21:03 JonnyTech

@kieranjol Like I just did to Andrew... Could I possibly task you with writing a summary/introduction to sox and why people might find it useful? But I understand if you don't have the time! (Unlike @privatezero 😜)

ablwr avatar Mar 29 '18 14:03 ablwr

Do you mean exiftool?I know nothing about sox!

On Thu, 29 Mar 2018, 15:17 Ashley, [email protected] wrote:

@kieranjol https://github.com/kieranjol Like I just did to Andrew... Could I possibly task you with writing a summary/introduction to sox and why people might find it useful? But I understand if you don't have the time! (Unlike @privatezero https://github.com/privatezero 😜)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/amiaopensource/ffmprovisr/issues/313#issuecomment-377249573, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEyvsjfXTMslcQSCoWsvbJmQhQ30-Eiks5tjOzegaJpZM4S_RSk .

kieranjol avatar Mar 29 '18 14:03 kieranjol

Bahahaha yes. I copy-pasted!

ablwr avatar Mar 29 '18 14:03 ablwr

echo "Could I possibly task you with writing a summary/introduction to sox and why people might find it useful?" | sed "s/sox/exiftool/gI"

JonnyTech avatar Mar 29 '18 15:03 JonnyTech

lololololol @JonnyTech practical applications of sed have been on my mind lately!!! 😂

ablwr avatar Mar 29 '18 15:03 ablwr