Access Special Info in files, like photos, audio, video
I am trying to automate the sorting of files using shell scripting.
I want to file different things in different places based on things like:
- what camera they were taken from
- what resolution the picture is
- perhaps GPS location
- for mp3's maybe audio compression or codec
- for audio files, are the podcasts, from an iPhone, voice recorder.
For example I dump files into a directory and want a cron job to take
any .jpg files and figure out where they came from? Were they downloaded
from the Internet, saved from email, taken from a camera or phone, if so
what device.
I know there is data somewhere in these files, and that finder, preview
and other programs can find it and get at it, but is there a way to do it
on my own?
I have heard of resource forks but I really have no idea what they are or
how to access them. If I could figure that out, or even where the data
might be inside the file and I could pull it out with shell commands, but
where is any of this data documented?
Just a pointer for jpg's, mp3's. mov's, mp4's would be a great start.
iMac, OS X Yosemite (10.10.3), 24",120G SSD,6GRAM,2T home,4T TM