ExifTool Forum

General => Other Discussion => Topic started by: Alan Clifford on December 31, 2013, 08:50:49 AM

Title: Embed a sound file in a photo?
Post by: Alan Clifford on December 31, 2013, 08:50:49 AM
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?

Title: Re: Embed a sound file in a photo?
Post by: Phil Harvey on December 31, 2013, 10:19:26 AM
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
Title: Re: Embed a sound file in a photo?
Post by: Alan Clifford on January 01, 2014, 08:41:22 PM
Thanks Phil.  That sounds (no pun intended) like a non starter.
Title: Re: Embed a sound file in a photo?
Post by: Warren on February 13, 2014, 11:11:06 AM
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 (https://en.wikipedia.org/wiki/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.
Title: Re: Embed a sound file in a photo?
Post by: Phil Harvey on February 13, 2014, 12:03:24 PM
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