Home > Mobile >  exiftool: extract "Cre ate Date" for avi, mpg, mkv, other files
exiftool: extract "Cre ate Date" for avi, mpg, mkv, other files

Time:11-12

In my case (disclaimer: I probably am doing something wrong!), -- I am struggling with extracting media creation time from certain Video files.

exiftool does fine job with *.MOV and *.MP4, but fails for *.AVI, *.MPG, *.MKV files (probably some others).

  1. Is this because these files lack this information? or exiftool is ... not flawless?
  2. Is there a 'best' standard way to extract this info from any media (any video at least)?

Thank you!

CodePudding user response:

Different formats have different tags due to different standards (see Standards). Additionally, adding such data depends entirely on the program that created the file. Many programs simply do not included such data in the file. For example, I do not believe that ffmpeg includes any metadata by default and a lot of programs are based upon it.

And then there's also the fact that some file formats do not support the addition of metadata at all.

Use this exiftool command to look at all date/time tags in the file to see if one suits your needs. This is a variation of the command from exiftool FAQ #3 which limits the output to the desired tags. You may have to fall back to the file system timestamps
exiftool -time:all -G1 -a -s /path/to/files/

  • Related