From what I can tell, exif_read_data will only read EXIF data, not any other sort of metadata, as well as being limited to Tiff and Jpg files. EXIF chunks only very rarely appear in video files. Additionally, the two tags you're looking for in that bit of code, Camera Identifier
and Rotation
, are not tags are part of the EXIF specification. Camera Identifier
appears to be a Quicktime tag, while Rotation
appears to be a Nikon and Canon makernotes tag.
One thing that could be done is to tell Exiftool to show only the tags you want rather than piping it through grep. This can be done by adding -CameraIdentifier -Rotation
to the command line. The quiet option -q
might also be useful for this.
You might also want to look into the Orientation
tag, as that is the standard tag to hold the orientation for image files.
@tsmgeek probably has the best solution, as they are correct about the startup overhead.