Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle MotionPhoto JPEG files with embedded video #138

Open
gkv311 opened this issue Oct 8, 2024 · 0 comments
Open

Handle MotionPhoto JPEG files with embedded video #138

gkv311 opened this issue Oct 8, 2024 · 0 comments
Assignees

Comments

@gkv311
Copy link
Owner

gkv311 commented Oct 8, 2024

There are JPEG files called 'MotionPhoto', which store video inside. It would be useful to support reading this video stream.
At minimum, it is necessary to fix issues in JPEG parser that lead to misdetection of such files.

exiftool -b -EmbeddedVideoFile my_motion_photo.jpg >video.mp4

Samsung motion photos are simply a complete JPEG image followed by a 16-byte marker and then a complete MP4 video. The marker itself is MotionPhoto_Data.

ExifTool Version Number         : 11.88
File Size                       : 6.9 MB
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Make                            : samsung
Camera Model Name               : SM-G973F
[...]
Micro Video                     : 1
Micro Video Version             : 1
Micro Video Offset              : 4535831
Micro Video Presentation Timestamp Us: -1
Image Width                     : 4032
Image Height                    : 3024
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Embedded Video Type             : MotionPhoto_Data
Embedded Video File             : (Binary data 4535775 bytes, use -b option to extract)
Aperture                        : 2.4
Image Size                      : 4032x3024
Megapixels                      : 12.2
Light Value                     : 13.9

File samples:
photo
92759077-a3ab3200-f38f-11ea-898c-8bf633cc9a20
cat

More samples

@gkv311 gkv311 self-assigned this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant