Pictures in jpeg format use EXIF to store metadata, in case you rename the file or change its timestamp is very useful. However, I don't know if that is the case for video files. Is there any kind of format that supports such implementation? The only way I know of preserving metadata on a video file is either set the filename correctly or use mkv with the description fields and such. However I would like to see if that can be done in mp4 of avi format to make it more widely playable.
Asked
Active
Viewed 5.0k times
3 Answers
12
Yes, I have used exiftool to read the metadata from mov videos from iphone and mp4 videos from android. It contains metadata like the datetime that the video was taken (not when the file was saved or modified). You can also use exiftool to write metadata as well.
wisbucky
- 3,346
6
Yes, but it differs by file format. For example, the QuickTime container format has many types of metadata within. This format type is used by MOV, M4V, MP4 and other less popular ones.
- https://en.wikipedia.org/wiki/QuickTime_File_Format
- https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html
You mention MKV (Matroska) which uses a different container format again.
Drew Noakes
- 2,317
3
You can do it with FFMpeg lib. Check it out from here: https://github.com/wseemann/FFmpegMediaMetadataRetriever
Example code:
FFmpegMediaMetadataRetriever mmr = new FFmpegMediaMetadataRetriever();
mmr.setDataSource(context, uri);
String comment = mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_COMMENT);
Huy Nguyen
- 141