photoprism/pkg/media
2025-12-01 17:16:33 +10:00
..
colors Merge tag '251130-b3068414c' into PostgreSQL 2025-12-01 17:16:33 +10:00
projection CI: Apply Go linter recommendations to remaining "pkg/..." code #5330 2025-11-22 16:14:43 +01:00
video CI: Apply Go linter recommendations to remaining "pkg/..." code #5330 2025-11-22 16:14:43 +01:00
base64.go API: Disable gzip compression for /api/v1/dl endpoint #127 #1090 2025-04-11 14:13:25 +02:00
base64_test.go API: Disable gzip compression for /api/v1/dl endpoint #127 #1090 2025-04-11 14:13:25 +02:00
data_url.go Media: Improve ReadUrl() implementation and tests #5330 2025-11-22 16:23:13 +01:00
data_url_test.go Media: Improve ReadUrl() implementation and tests #5330 2025-11-22 16:23:13 +01:00
filename.go Live Photos: Only flag actual Live and Motion Photos as "Live" #5089 2025-07-06 11:07:25 +02:00
filename_test.go Test: Use PascalCase names for all Go subtests in /pkg 2025-10-02 15:03:47 +02:00
formats.go M2TS: Extract embedded metadata with ExifTool #4982 #4892 #5040 2025-06-11 19:22:20 +02:00
headers.go Index: Add native support for MP4 and Samsung/Google Motion Photos #439 2023-09-22 23:59:56 +02:00
live.go Live Photos: Reset duration and improve type checks when indexing #5089 2025-07-07 11:15:02 +02:00
media.go Backend: Update copyright notices 2025-01-09 10:28:17 +01:00
new.go Download: Add Disabled, Originals, MediaRaw & MediaSidecar Flags #2234 2022-04-15 09:42:07 +02:00
new_test.go Download: Add Disabled, Originals, MediaRaw & MediaSidecar Flags #2234 2022-04-15 09:42:07 +02:00
orientation.go CI: Apply Go linter recommendations to remaining "pkg/..." code #5330 2025-11-22 16:14:43 +01:00
orientation_test.go HEIC: Reset Exif orientation for compatibility with libheif 1.18.1 #4439 2024-08-03 16:31:11 +02:00
preview.go Merge tag '251130-b3068414c' into PostgreSQL 2025-12-01 17:16:33 +10:00
preview_test.go Change imports to gorm2 2024-09-17 14:52:51 +10:00
README.md CI: Apply Go linter recommendations to remaining "pkg/..." code #5330 2025-11-22 16:14:43 +01:00
report.go Media: Replace sort.Slice with slices.Sort for natural ordering (#4981) 2025-06-23 15:38:55 +02:00
report_test.go Videos: Refactor codec, content and file type specifications #4770 2025-02-05 00:30:45 +01:00
source.go CI: Apply Go linter recommendations to remaining "pkg/..." code #5330 2025-11-22 16:14:43 +01:00
type.go Metadata: Improve search filter and media type documentation #5113 2025-07-17 11:55:20 +02:00
type_test.go Metadata: Improve search filter and media type documentation #5113 2025-07-17 11:55:20 +02:00
types.go Merge remote-tracking branch 'origin/develop' into PostgreSQL 2025-08-18 17:30:03 +10:00

PhotoPrism — Media Package

Last Updated: November 22, 2025

Apple iPhone and 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

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

Software Libraries and References

Title URL
Web Video Codec Guide https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs
Media Container Formats https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
MP4 Signature Format https://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 files https://github.com/abema/go-mp4
Go library for buffered I/O with io.Seeker interface https://github.com/sunfish-shogi/bufseekio
How to use the io.Reader interface https://yourbasic.org/golang/io-reader-interface-explained/
AV1 Codec ISO Media File Format https://aomediacodec.github.io/av1-isobmff