I'm using a FLIR Boson thermal imaging camera, whose 'video' output consists of sequences of 'one-second long' multipage TIFF files.
The frame rate is variable, but averages 8.6 fps. So, each TIFF can contain up to 9 monochrome 16-bit images (example TIFF can be downloaded here).
I'd like to batch split the multipage TIFFS into individual images - firstly for processing, but also so I can create lossless videos from them (using FFMPEG).
However, I can't work out how to extract the individual frames with their timestamp intact (according to the FLIR TIFF documentation it's recorded in the metadata as Exif.Photo.DateTimeOriginal
. But EXIFTool doesn't display it – see output of exiftool -a -G1 -s Boson_Capture.tiff
:
[ExifTool] ExifToolVersion : 12.30
[System] FileName : Boson_Capture.tiff
[System] Directory : .
[System] FileSize : 5.6 MiB
[System] FileModifyDate : 2022:05:06 16:54:24-04:00
[System] FileAccessDate : 2022:05:06 19:54:06-04:00
[System] FileInodeChangeDate : 2022:05:06 19:54:04-04:00
[System] FilePermissions : -rw-------
[File] FileType : TIFF
[File] FileTypeExtension : tif
[File] MIMEType : image/tiff
[File] ExifByteOrder : Little-endian (Intel, II)
[IFD0] ImageWidth : 640
[IFD0] ImageHeight : 512
[IFD0] BitsPerSample : 16
[IFD0] Compression : Uncompressed
[IFD0] PhotometricInterpretation : BlackIsZero
[IFD0] FillOrder : Normal
[IFD0] StripOffsets : 8
[IFD0] Orientation : Horizontal (normal)
[IFD0] SamplesPerPixel : 1
[IFD0] RowsPerStrip : 512
[IFD0] StripByteCounts : 655360
[IFD0] XResolution : 1
[IFD0] YResolution : 1
[IFD0] PlanarConfiguration : Chunky
[IFD0] ResolutionUnit : None
[IFD0] PageNumber : 0 2
[IFD0] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD0] SampleFormat : Unsigned
[IFD1] ImageWidth : 640
[IFD1] ImageHeight : 512
[IFD1] BitsPerSample : 16
[IFD1] Compression : Uncompressed
[IFD1] PhotometricInterpretation : BlackIsZero
[IFD1] FillOrder : Normal
[IFD1] StripOffsets : 655662
[IFD1] Orientation : Horizontal (normal)
[IFD1] SamplesPerPixel : 1
[IFD1] RowsPerStrip : 512
[IFD1] StripByteCounts : 655360
[IFD1] XResolution : 1
[IFD1] YResolution : 1
[IFD1] PlanarConfiguration : Chunky
[IFD1] ResolutionUnit : None
[IFD1] PageNumber : 1 3
[IFD1] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD1] SampleFormat : Unsigned
[IFD2] ImageWidth : 640
[IFD2] ImageHeight : 512
[IFD2] BitsPerSample : 16
[IFD2] Compression : Uncompressed
[IFD2] PhotometricInterpretation : BlackIsZero
[IFD2] FillOrder : Normal
[IFD2] StripOffsets : 1311316
[IFD2] Orientation : Horizontal (normal)
[IFD2] SamplesPerPixel : 1
[IFD2] RowsPerStrip : 512
[IFD2] StripByteCounts : 655360
[IFD2] XResolution : 1
[IFD2] YResolution : 1
[IFD2] PlanarConfiguration : Chunky
[IFD2] ResolutionUnit : None
[IFD2] PageNumber : 2 4
[IFD2] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD2] SampleFormat : Unsigned
[IFD3] ImageWidth : 640
[IFD3] ImageHeight : 512
[IFD3] BitsPerSample : 16
[IFD3] Compression : Uncompressed
[IFD3] PhotometricInterpretation : BlackIsZero
[IFD3] FillOrder : Normal
[IFD3] StripOffsets : 1966970
[IFD3] Orientation : Horizontal (normal)
[IFD3] SamplesPerPixel : 1
[IFD3] RowsPerStrip : 512
[IFD3] StripByteCounts : 655360
[IFD3] XResolution : 1
[IFD3] YResolution : 1
[IFD3] PlanarConfiguration : Chunky
[IFD3] ResolutionUnit : None
[IFD3] PageNumber : 3 5
[IFD3] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD3] SampleFormat : Unsigned
[IFD4] ImageWidth : 640
[IFD4] ImageHeight : 512
[IFD4] BitsPerSample : 16
[IFD4] Compression : Uncompressed
[IFD4] PhotometricInterpretation : BlackIsZero
[IFD4] FillOrder : Normal
[IFD4] StripOffsets : 2622624
[IFD4] Orientation : Horizontal (normal)
[IFD4] SamplesPerPixel : 1
[IFD4] RowsPerStrip : 512
[IFD4] StripByteCounts : 655360
[IFD4] XResolution : 1
[IFD4] YResolution : 1
[IFD4] PlanarConfiguration : Chunky
[IFD4] ResolutionUnit : None
[IFD4] PageNumber : 4 6
[IFD4] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD4] SampleFormat : Unsigned
[IFD5] ImageWidth : 640
[IFD5] ImageHeight : 512
[IFD5] BitsPerSample : 16
[IFD5] Compression : Uncompressed
[IFD5] PhotometricInterpretation : BlackIsZero
[IFD5] FillOrder : Normal
[IFD5] StripOffsets : 3278278
[IFD5] Orientation : Horizontal (normal)
[IFD5] SamplesPerPixel : 1
[IFD5] RowsPerStrip : 512
[IFD5] StripByteCounts : 655360
[IFD5] XResolution : 1
[IFD5] YResolution : 1
[IFD5] PlanarConfiguration : Chunky
[IFD5] ResolutionUnit : None
[IFD5] PageNumber : 5 7
[IFD5] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD5] SampleFormat : Unsigned
[IFD6] ImageWidth : 640
[IFD6] ImageHeight : 512
[IFD6] BitsPerSample : 16
[IFD6] Compression : Uncompressed
[IFD6] PhotometricInterpretation : BlackIsZero
[IFD6] FillOrder : Normal
[IFD6] StripOffsets : 3933932
[IFD6] Orientation : Horizontal (normal)
[IFD6] SamplesPerPixel : 1
[IFD6] RowsPerStrip : 512
[IFD6] StripByteCounts : 655360
[IFD6] XResolution : 1
[IFD6] YResolution : 1
[IFD6] PlanarConfiguration : Chunky
[IFD6] ResolutionUnit : None
[IFD6] PageNumber : 6 8
[IFD6] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD6] SampleFormat : Unsigned
[IFD7] ImageWidth : 640
[IFD7] ImageHeight : 512
[IFD7] BitsPerSample : 16
[IFD7] Compression : Uncompressed
[IFD7] PhotometricInterpretation : BlackIsZero
[IFD7] FillOrder : Normal
[IFD7] StripOffsets : 4589586
[IFD7] Orientation : Horizontal (normal)
[IFD7] SamplesPerPixel : 1
[IFD7] RowsPerStrip : 512
[IFD7] StripByteCounts : 655360
[IFD7] XResolution : 1
[IFD7] YResolution : 1
[IFD7] PlanarConfiguration : Chunky
[IFD7] ResolutionUnit : None
[IFD7] PageNumber : 7 9
[IFD7] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD7] SampleFormat : Unsigned
[IFD8] ImageWidth : 640
[IFD8] ImageHeight : 512
[IFD8] BitsPerSample : 16
[IFD8] Compression : Uncompressed
[IFD8] PhotometricInterpretation : BlackIsZero
[IFD8] FillOrder : Normal
[IFD8] StripOffsets : 5245240
[IFD8] Orientation : Horizontal (normal)
[IFD8] SamplesPerPixel : 1
[IFD8] RowsPerStrip : 512
[IFD8] StripByteCounts : 655360
[IFD8] XResolution : 1
[IFD8] YResolution : 1
[IFD8] PlanarConfiguration : Chunky
[IFD8] ResolutionUnit : None
[IFD8] PageNumber : 8 8
[IFD8] Software : 7CTiff - FLIR Systems, Indigo Operations
[IFD8] SampleFormat : Unsigned
[Composite] ImageSize : 640x512
[Composite] Megapixels : 0.328
Everything I've tried which splits the TIFFs (e.g. ImageMagick, ImageJ) also seems to remove the metadata. Is there any way to batch split these files from the command line and keep the timestamp?
Exif.Photo.DateTimeOriginal
. This is what I meant by not having managed to view it using EXIFTool. I'm not so experienced with EXIFTool, so wasn't sure whether it's just the way I'm using it, or that the tag isn't actually there?