6 ms·
Google Pixel has these too, but it calls them Motion Photos. They are formatted as a JPEG with an MP4 appended to it. Kind of a weird format but nice to know th
by aftbit 3y ago
Google Pixel has these too, but it calls them Motion Photos. They are formatted as a JPEG with an MP4 appended to it. Kind of a weird format but nice to know that you can recover the video from any motion photo with a clever dd invocation.
Here's my script for the curious:
#!/bin/bash
#extract mp4 files from Google Pixel 6 .MP.jpg files
set -e -u -o pipefail
extract () {
dd if="$1" of="$1.mp4" bs=$[$( strings -td "$1" | grep ftypisom | head -n1 | cut -d' ' -f1 ) - 4] skip=1
}
for fn in "$@"; do
extract $fn
done
- deleted 3y ago[deleted]
- lom 3y agoHow do you get the live pictures from the pixel? All I can do is export as a GIF or mp4. The latter of which also doesn’t include text for me.
- aftbit 3y agoI personally use NextCloud to sync all my photos to my home server. You can also copy them using ADB or MTP from your phone. I think you can also send them as a photo with standard android sharing and it will send the video in the concatenated format, though that may depend on the sharing app and settings used.
- flangola7 3y agoHow does that work without corrupting the jpg for file viewers not expecting it?
- twright0 3y agoMost image viewers ignore bytes after the End Of Image in the jpeg format, so you can stick whatever you want on the end.