Extracting embedded images from Samsung phone (S8) "Selective Focus" shots

Started by ubacher, May 07, 2017, 02:07:32 AM

Previous topic - Next topic

jumpjack

Quote from: Phil Harvey on July 30, 2018, 07:22:51 AM
I suggest that you spend some time looking at the ExifTool -htmldump and -v3 outputs.

- Phil
Actually I am studying several pages, sites and documents about JPEG format, but the more I study it, the more I'm convinced that who invented it was kinda of drunk...

jumpjack

How do I extract just the image from a  "SurroundShotVideo"? if I use this tag, I can extract the video, but how do I get just the image?


Working command line for video:
exiftool -a -b -Samsung:SurroundShotVideo  input-image.jpg >output-video.avi


Not working:
exiftool -a -b -Samsung:SurroundShotVideo -w output-video.avi input-image.jpg

Not working:
exiftool -a -b -Samsung:PanoramaShot  -w pano.jpg pano-cascata.jpg



Samsung trailer (13037681 bytes at offset 0xd86411):
  SurroundShotVideoName = Motion_Panorama_MP4_000
  SurroundShotVideo = .ftyp3gp53gp5isom.*~mdat.HRe.N,....p.N....lusu.bmj..o.'.........T[snip]
  SamsungTrailer_0x08e1Name = Motion_Panorama_Info
  SamsungTrailer_0x08e1 = ..8....Z...6.`...@B.?B.....Pf..@B.@B.@B......<..?B.@B.@B.4$..[snip]
  Samsung_Trailer_0x0a01-name = Image_UTC_Data
  TimeStamp = 1536409526694
  SamsungTrailer_0x0aa1Name = MCC_Data
  SamsungTrailer_0x0aa1 = 222
  SamsungTrailer_0x08e0Name = Panorama_Shot_Info
  SamsungTrailer_0x08e0 = PanoramaShot

Phil Harvey

Sorry for the delay -- I've been away on vacation.

Can you email me a sample with this PanoramaShot metadata?  (philharvey66 at gmail.com)   I'll add the ability to extract this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jumpjack

Quote from: Phil Harvey on September 17, 2018, 08:12:11 AM
Sorry for the delay -- I've been away on vacation.

Can you email me a sample with this PanoramaShot metadata?  (philharvey66 at gmail.com)   I'll add the ability to extract this.

- Phil
Thse images are huge (50-100MB), but I will try.
I examined one, and it looks like it contains all the shots used to build the panorama (there are dozens of FFD( signatures) , plus the resulting panorama video and the resulting panorama itself!

Phil Harvey

OK,  If you can't send me the whole file, could you post the output of exiftool -v3 on the file?

Thanks.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jumpjack

Quote from: Phil Harvey on September 24, 2018, 08:25:06 AM
OK,  If you can't send me the whole file, could you post the output of exiftool -v3 on the file?

Thanks.

- Phil
I succeeded in uploading a couple of images:
http://jumpjack.altervista.org/raduni/xi/pano-gardenie.jpg
http://jumpjack.altervista.org/raduni/xi/pano-crivelli.jpg

In the meantime I wrote a very simple program which just extract first image, but it would be anyway interesting to figure out what is inside a panorama file.
http://jumpjack.altervista.org/SamsungExtractor.zip

Phil Harvey

I wasted quite a bit of time this morning trying to figure out what is going on with the panos you uploaded.  As far as I can tell, the main image is missing the JPEG EOI marker (which should occur just before the trailer).  I wouldn't put it past the Samsung programmers to make a stupid blunder like this.

As far as decoding the trailer goes, the lack of an EOI means that ExifTool doesn't find the trailer in the second image you uploaded, but it does fully parse the trailer in the first image, with the exception that the 48064-byte "Motion_Panorama_Info" is not decoded (but this doesn't look like an image).

So I don't know what you mean by the first image of the panorama, and I don't see it anywhere in the trailer.

- Phil

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).