Extract metadata from video files on Android

I need to read metadata from Android video files. I looked at the tags available through MediaStore.Video.VideoColumns and android. media.MediaMetadataRetriever . However, both of them do not give me access to some additional tags that can be accessed by a tool such as ExifTool by Phil Harvey .

I’m most interested in the Camera Make / Model, Compressor ID tags, but I’d also like to know how to access the other tags.

Are there any APIs in android for reading these additional tags, or am I looking for a specific file format, my own meta-analysis of metadata?

Here's the output created by ExifTool for the video shot with the iPhone camera:

ExifTool Version Number         : 9.28
File Name                       : iPhone.MOV
Directory                       : .
File Size                       : 74 kB
File Modification Date/Time     : 2013:04:30 14:41:24+09:00
File Access Date/Time           : 2013:04:30 14:41:24+09:00
File Creation Date/Time         : 2013:04:30 14:41:24+09:00
File Permissions                : rw-rw-rw-
File Type                       : MOV
MIME Type                       : video/quicktime
Major Brand                     : Apple QuickTime (.MOV/QT)
Minor Version                   : 0.0.0
Compatible Brands               : qt
Movie Data Size                 : 71757
Movie Header Version            : 0
Modify Date                     : 2013:04:30 05:40:07
Time Scale                      : 600
Duration                        : 5.36 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2013:04:30 05:40:06
Track Modify Date               : 2013:04:30 05:40:07
Track ID                        : 1
Track Duration                  : 5.34 s
Track Layer                     : 0
Track Volume                    : 100.00%
Balance                         : 0
Audio Channels                  : 1
Audio Bits Per Sample           : 16
Audio Sample Rate               : 44100
Audio Format                    : chan
Matrix Structure                : 0 1 0 -1 0 0 272 0 1
Image Width                     : 480
Image Height                    : 272
Clean Aperture Dimensions       : 480x272
Production Aperture Dimensions  : 480x272
Encoded Pixels Dimensions       : 480x272
Media Header Version            : 0
Media Create Date               : 2013:04:30 05:40:06
Media Modify Date               : 2013:04:30 05:40:07
Media Time Scale                : 600
Media Duration                  : 5.37 s
Media Language Code             : und
Graphics Mode                   : ditherCopy
Op Color                        : 32768 32768 32768
Handler Class                   : Data Handler
Handler Vendor ID               : Apple
Handler Description             : Core Media Data Handler
Compressor ID                   : avc1
Source Image Width              : 480
Source Image Height             : 272
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 : H.264
Bit Depth                       : 24
Video Frame Rate                : 30
Camera Identifier               : Back
Frame Readout Time              : 28512 microseconds
Make                            : Apple
Software Version                : 6.1.3
Create Date                     : 2013:04:30 14:39:40+09:00
GPS Coordinates                 : 37 deg 15' 19.08" N, 127 deg 2' 59.28" E, 43 m Above Sea Level
Model                           : iPhone 4S
Handler Type                    : Metadata Tags
Make (und-IN)                   : Apple
Creation Date (und-IN)          : 2013:04:30 14:39:40+09:00
GPS Coordinates (und-IN)        : 37 deg 15' 19.08" N, 127 deg 2' 59.28" E, 43 m Above Sea Level
Software (und-IN)               : 6.1.3
Model (und-IN)                  : iPhone 4S
Avg Bitrate                     : 107 kbps
GPS Altitude                    : 43 m
GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 37 deg 15' 19.08" N
GPS Longitude                   : 127 deg 2' 59.28" E
GPS Position                    : 37 deg 15' 19.08" N, 127 deg 2' 59.28" E
Image Size                      : 480x272
Rotation                        : 90
+5

All Articles