Skip to content

ryanking13/lglivephoto

Repository files navigation

LGlivephoto

Go Reference

LG smart phone is dead. Long live the Live Photo.

A Simple golang utility to unpack and pack LG Live Photo.

NOTE: this module is tested with LG G7.

Usage (binary)

For windows (x86_64) download executables below:

For other platforms, download binaries at releases section.

livephoto-unpack <livephoto image or directory which contains livephoto images>
livephoto-pack <non-livephoto image> <video to be embedded>

Usage (module)

go get -u github.com/ryanking13/lglivephoto
package main

import (
	"io/ioutil"

	"github.com/ryanking13/lglivephoto"
)

func main() {
	image, video, _ := lglivephoto.Unpack("livephoto.jpg")
	ioutil.WriteFile("livephoto_image.jpg", image, 0644)
	ioutil.WriteFile("livephoto_video.mp4", video, 0644)

	livephoto, _ := lglivephoto.Pack("livephoto_image.jpg", "livephoto_video.mp4")
	ioutil.WriteFile("livephoto_repack.jpg", livephoto, 0644)
}

See document for more information.

Related links