ignore trailing garbage in insta360 .insv files?

Started by m_stolle, August 29, 2024, 05:40:31 PM

Previous topic - Next topic

m_stolle

Hi,

I have some Insta360 (One RS 1 inch 360) videos where the time is wrong. (Camera's battery got depleted, I didn't realize time was wrong until after shooting some video).

I am now trying to use ExifTool to fix it, but the majority of videos cannot be edited due to errors like

Error: Truncated '0x0100' atom - ./LRV_20240409_235951_11_026.insv
Error: Truncated '0x0100' atom - ./LRV_20240410_000003_11_027.insv
Error: Truncated '0x3e01ed12' atom - ./LRV_20240410_000045_11_028.insv
Error: '0x00db' atom is too large for rewriting (725 MB) - ./VID_20240409_193549_00_002.insv
Error: Truncated '0x0101' atom - ./VID_20240409_193736_00_003.insv
Error: Truncated '0x0100' atom - ./VID_20240409_203444_00_006.insv

Looking at the files with exiftool -v3 , it appears as if this is only due to garbage in the end after the "free" chunk, e.g. for the first file:

  | | | | | ChunkOffset64 = .u....$.....V..g.......Z..v........S..j|...
  | | | | | - Tag 'co64' (136 bytes):
  | | | | |    436d5: 00 00 00 00 00 00 00 10 00 00 00 00 00 00 75 90 [..............u.]
  | | | | |    436e5: 00 00 00 00 00 00 94 1a 00 00 00 00 00 00 cc 24 [...............$]
  | | | | |    436f5: 00 00 00 00 00 00 e3 8e 00 00 00 00 00 00 f2 b8 [................]
  | | | | |    43705: 00 00 00 00 00 01 56 02 00 00 00 00 00 01 67 8c [......V.......g.]
  | | | | |    43715: 00 00 00 00 00 01 8d 96 00 00 00 00 00 01 aa 00 [................]
  | | | | |     [snip 56 bytes]
  Free =
  - Tag 'free' (20695195 bytes):
     43765: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
     43775: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
     43785: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
     43795: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
     437a5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
      [snip 20695115 bytes]
  Warning = Truncated '\x00\x00\x01\x00' data (missing 600808 bytes)

Two questions:
1) does anyone know if insta360 stores something important in this "garbage" in the end?
2) assuming "no": is there a way to get exiftool to ignore this?  I already tried "-m" to no avail.

Any ideas are welcome...

Thanks,
  Martin

Phil Harvey

Hi Martin,

There is currently no way to ignore garbage like this.  If you email me a sample I can look to see if I can find anything useful in this data but it may take me a few weeks because I'm going on vacation soon and I probably won't have the time before I leave.  My mail is philharvey66 at gmail.com

- 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 ($).

m_stolle

Hi Phil,

Thank you for the quick response.  I have sent you a message with a download link.

Martin

Phil Harvey

#3
Hi Martin,

I got the sample, thanks.  And I found time today to look at this.

ExifTool wasn't recognizing this as an Insta360 trailer because the format is different from my other samples.  I will improve the handling of these trailers to be more robust in ExifTool 12.95, and this should fix the problem.

You shouldn't delete this trailer because it contains useful information.

- Phil

Edit: 12.95 is now available
...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 ($).

m_stolle

Just to summarize off-thread discussions for posteriority: Some files still had some quirks that were not recognized, but Phil was able to extend insta360 handling logic some more and released 12.96.

This seems to be working well now, thanks for the quick fixes!

Martin