How do I view google's motion photos on my windows PC? I can download the JPGs from my DCIM folder in my Pixel 2 and I know that the video is encoded inside the jpg, but I don't know what image viewer I can use to see the motion. I usually use Irfanview, but I haven't yet been able to find out how to make it show the motion. And I haven't found anyone talking about how to do it. Anyone know?
I did some experimenting based on the post by @jameshenstridge and came up with a simple PHP script that successfully split every google motion photo i threw at it.

&lt;?php

  $src_arg = $argv[1];
  $src_dir = realpath(pathinfo($src_arg, PATHINFO_DIRNAME)); 

  echo "Scanning for files...\n";

  foreach (glob($src_arg) as $src) {

    $file = realpath($src);

    if (!is_dir($file) &amp;&amp; in_array(strtoupper(pathinfo($file, PATHINFO_EXTENSION)), ["JPEG", "JPG"])) {

      echo "\tProcessing: " . $file . "\n";

      $filesize = filesize($file);
      echo "\t\tFile size: " . $filesize . "\n";

      $handle = fopen($file, "rb");
      $data = fread($handle, $filesize);
      fclose($handle);

      $eoi_pos = strpos($data, "\xFF\xD9\x00\x00\x00\x18");
      echo "\t\tEOI segment position: " . $eoi_pos . "\n";

      if ($eoi_pos !== FALSE) {
        $output_base = $src_dir . DIRECTORY_SEPARATOR . pathinfo($file, PATHINFO_FILENAME);
        echo "\t\tSaving photo...\n";
        file_put_contents($output_base . "_photo.jpg", substr($data, 0, $eoi_pos + 2));
        echo "\t\tSaving video...\n";
        file_put_contents($output_base . "_video.mp4", substr($data, $eoi_pos + 2));
      } else {
        echo "\t\tSKIPPING - File does not appear to be a Google motion photo.\n";
      }

    }

  }

  echo "Done.\n";

?&gt;


It should work on Windows and Linux.  You just pass a path  as the first argument and it will split any files that it believes are motion photos.  You can use wildcards.  It's non-destructive - the source file(s) are not deleted.

Some example uses:

php google_motion_photo_splitter.php c:\test\file.jpg
php google_motion_photo_splitter.php c:\test\*.jpg
php google_motion_photo_splitter.php c:\test\*