Creating Samsung Motion Photos - embedding binary data

Started by taihw, April 16, 2021, 10:32:49 AM

Previous topic - Next topic

taihw

Hello All,

I am trying to make a small batch utility to convert my Apple's Live Photos into Samsung's Motion Photos.
To put briefly, the video portion of Motion Photos are an MP4 file embedded into a JPEG file's metadata. I am able to convert an Apple Live Photo into a JPEG and MP4 file, but don't know to to assemble them together.

I found out from this post https://forum.xda-developers.com/t/samsung-motion-photo-extractor.3339997/post-74791825 that exiftool could extract the video from a Motion Photo, so I tried to reverse the process.

I'm completely new to exiftool, so I'm not sure how to write the binary data in—by default, EmbeddedVideoType and EmbeddedVideoFile are not writable, and while I was able to write binary data by following this thread https://exiftool.org/forum/index.php?topic=5563.0, it created a multi-segment EXIF file and any attempts at changing the config file failed. I glanced through the documentation quickly but couldn't find any clear leads on how I would add my own Maker information.

These are the tags that I need to recreate (probably only need the Embedded Video Type and Embedded Video File tags)

---- Samsung ----
Samsung Trailer 0x0a01 Name     : Image_UTC_Data
Time Stamp                      : 2021:04:15 17:20:06+09:00
Samsung Trailer 0x0aa1 Name     : MCC_Data
Samsung Trailer 0x0aa1          : (Binary data 3 bytes, use -b option to extract)
Embedded Video Type             : MotionPhoto_Data
Embedded Video File             : (Binary data 4912304 bytes, use -b option to extract)


If anyone could point me to some beginner-friendly config notes, or some samples where a similar result is achieved, that would be much appreciated.

--edit--
just for reference, I created this https://forum.xda-developers.com/t/converting-assembling-samsungs-motion-photos-from-apples-live-photos-or-any-photo-and-video-file.4262965/ corresponding post in the XDA forums, so if someone finds this in the future trying to attempt the same or similar thing, maybe there will be helpful replies there.

Phil Harvey

ExifTool doesn't have the ability to construct a new Samsung trailer, so unfortunately you can't do what you want.

- 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 ($).

taihw

I see. Thanks for the quick response.

If anyone stumbling upon this in the future does have an alternative, please do let me know.