I have MPEG-2 Transport Stream (M2T) .ts files recorded on an airborne camera platform. They have embedded KLV/MISB metadata that I would like exported to a CSV.
When I ran the command:
exiftool '/file.ts'
It returns the following 56 lines, which looks like some basic header information and a single frame of MISB data. (Redacted some of the results but you can see all the headers)
ExifTool Version Number : 13.34
File Name : REDACTED
Directory : REDACTED
File Size : 25 MB
File Modification Date/Time : 2023:07:19 21:39:01-04:00
File Access Date/Time : 2025:01:30 15:23:56-05:00
File Inode Change Date/Time : 2025:09:04 19:02:15-04:00
File Permissions : -rwxr-xr-x
File Type : M2T
File Type Extension : m2t
MIME Type : video/mpeg
Warning : [minor] The ExtractEmbedded option may find more tags in the video data [x2]
Duration : 0:00:36
GPS Date Time : REDACTED
Mission ID : REDACTED
GPS Track : REDACTED
Sensor Name : LWIR
Image Coordinate System : WGS84
GPS Latitude : REDACTED
GPS Longitude : REDACTED
Horizontal Field Of View : REDACTED
Vertical Field Of View : REDACTED
Sensor Relative Azimuth Angle : REDACTED
Sensor Relative Elevation Angle : REDACTED
Sensor Relative Roll Angle : REDACTED
Slant Range : REDACTED
Frame Center Latitude : REDACTED
Frame Center Longitude : REDACTED
Target Location Latitude : REDACTED
Target Location Longitude : REDACTED
Target Location Elevation : REDACTED
Target Error Estimate CE90 : REDACTED
Target Error Estimate LE90 : REDACTED
Generic Flag Data 01 : (none)
Security Version : REDACTED
Magnetic Heading : REDACTED
UAS LS Version Number : REDACTED
Event Start Time : REDACTED
Operational Mode : Other
Frame Center Height Above Ellipsoid: REDACTED
Sensor Velocity North : REDACTED
Sensor Velocity East : REDACTED
Corner Latitude 1 : REDACTED
Corner Longitude 1 : REDACTED
Corner Latitude 2 : REDACTED
Corner Longitude 2 : REDACTED
Corner Latitude 3 : REDACTED
Corner Longitude 3 : REDACTED
Corner Latitude 4 : REDACTED
Corner Longitude 4 : REDACTED
Full Pitch Angle : REDACTED
Full Roll Angle : REDACTED
MIIS Core Identifier : (Binary data 18 bytes, use -b option to extract)
Target Width Extended : (Binary data 3 bytes, use -b option to extract)
Sensor Ellipsoid Height Extended: (Binary data 3 bytes, use -b option to extract)
GPS Position : REDACTED
I saw the warning about the ExtractEmbedded so I ran this command:
exiftool -ee '/file.ts'
This returned 46,015 results. This lead me to believe this includes the MISB data for all of the frames.
However, what I'm looking to do is drop all of that into a CSV file so I can animate graphs from various elements in Python or R. Basically I want one frame of metadata per line.
What I tried:
exiftool -csv -ee '/file.ts' > 'file.csv'
However this only exported the headers and a single frame of information to a single row of the CSV.
Any ideas what I'm missing? Thank you!
EDIT:
Exporting to CSV and JSON have the same problem, where each video file can only export to a single row with a set of columns for each frame of video. This makes processing in R extremely slow and inefficient. It was faster just to export to a .txt file and parse the data that way.