Back to Photoprism

README

pkg/media/README.md

latest4.3 KB
Original Source

PhotoPrism — Media Package

Last Updated: February 14, 2026

Apple iPhone & iPad

iOS Live Photos consist of a JPEG/HEIC image and a QuickTime AVC/HEVC video, which are both required for viewing.

We recommend using an app like PhotoSync to upload Live Photos to PhotoPrism, since the iOS web upload usually only submits the HEIC image file without the video.

Android Devices

Some Samsung and Google Android devices support taking "Motion Photos" with the included Camera app. Motion Photos are JPEG/HEIC image with a short MP4 video embedded after the image data.

The image part of these files can be opened in any image viewer that supports JPEG/HEIC, but the video part cannot. However, since the MP4 video is simply appended at the end of the image file, it can be easily read by our software and streamed through the API as needed.

Introductory Tutorials

TitleDateURL
How to detect Android motion photos in FlutterMay 2023https://ente.io/blog/tech/android-motion-photos-flutter/
Stripping Embedded MP4s out of Android 12 Motion PhotosOct 2021https://mjanja.ch/2021/10/stripping-embedded-mp4s-out-of-android-12-motion-photos/
Google Pixel "Motion Photo" HowtoMar 2021https://linuxreviews.org/Google_Pixel_%22Motion_Photo%22
go-mp4: Golang Library and CLI Tool for MP4Jul 2020https://dev.to/sunfishshogi/go-mp4-golang-library-and-cli-tool-for-mp4-52o1
Working with Motion PhotosJan 2019https://medium.com/android-news/working-with-motion-photos-da0aa49b50c
Google: Behind the Motion Photos Technology in Pixel 2Mar 2018https://blog.research.google/2018/03/behind-motion-photos-technology-in.html

Software Libraries & References

TitleURL
Web Video Codec Guidehttps://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs
Media Container Formatshttps://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
MP4 Signature Formathttps://www.file-recovery.com/mp4-signature-format.htm
List of file signatures (Wikipedia)https://en.wikipedia.org/wiki/List_of_file_signatures
Go library for reading and writing MP4 fileshttps://github.com/abema/go-mp4
Go library for buffered I/O with io.Seeker interfacehttps://github.com/sunfish-shogi/bufseekio
How to use the io.Reader interfacehttps://yourbasic.org/golang/io-reader-interface-explained/
AV1 Codec ISO Media File Formathttps://aomediacodec.github.io/av1-isobmff