Embed a sound file in a photo?

Started by Alan Clifford, December 31, 2013, 08:50:49 AM

Previous topic - Next topic

Alan Clifford

Some of my cameras can record a voice memo and these are recorded as a different file with the same name as the photo but with a different extension.

I've been thinking it would be nice if I could ensure the sound traveled with the jpeg by embedding it in the jpeg file, in the manner that there are other jpegs and other binary data embedded in jpeg files.  Is this something that is done and is there a tag where I would store the sound, or am I in new territory here?


Phil Harvey

Hi Alan,

You aren't in new territory.  Some cameras already embed sound in JPEG images (ie. Ricoh G700SE).  Unfortunately though, there is no standard way to do this, and the JPEG 64kB segment-size limit really restricts the possibilities (can't use EXIF because it is limited to a single segment).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Alan Clifford

Thanks Phil.  That sounds (no pun intended) like a non starter.

Warren

I don't know if this is foolish or not: do it the other way around.

Convert your voice memo to flac and then embed your picture in it. I do this all the time with album cover art. I will admit that this is off the top of my head and that I have no idea on the limitations flac imposes on the pictures, although just now as a test I embedded a 5184x3456 jpeg into a  Rolling Stones tune, and it took.

Also, I see from the documentation that the flac picture tags aren't directly writable from within exiftool -- you'd have to use EasyTag  (my choice) or something like it. I'm also not sure how you'd extract it from within exiftool either. Just my 2-cents-worth.

Phil Harvey

Hi Warren,

This would be do-able, but probably not very convenient because you would need to use audio software instead of imaging software to display the image.  But as you said, ExifTool should be able to pull the image back out of the FLAC again.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).