2

[Posted on StackOverflow, then I realized that this is a better place for it]

I have a video made with a canon camera (actually a PowerShow G5Xm2), which was shot at 2022:08:28 11:25:09-04:00.

I want to extract the creation date metadata, and I found that I can see it with:

$ ffprobe -i myfile.MP4 -show_entries stream_tags
[.....]
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myfile.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1CAEP
    make            : 
    make-eng        : 
    model           : 
    model-eng       : 
    creation_time   : 2022-08-28T15:25:09.000000Z
  Duration: 00:00:53.96, start: 0.000000, bitrate: 29939 kb/s
  Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080, 29639 kb/s, 25 fps, 25 tbr, 25k tbn, 50k tbc (default)
    Metadata:
      creation_time   : 2022-08-28T15:25:09.000000Z
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      creation_time   : 2022-08-28T15:25:09.000000Z
      vendor_id       : [0][0][0][0]
[STREAM]
TAG:creation_time=2022-08-28T15:25:09.000000Z
TAG:language=eng
TAG:vendor_id=[0][0][0][0]
[/STREAM]
[STREAM]
TAG:creation_time=2022-08-28T15:25:09.000000Z
TAG:language=eng
TAG:vendor_id=[0][0][0][0]
[/STREAM]

The creation date in in UTC (2022-08-28T15:25:09.000000Z), and it has the format %Y-%m-%dT%H:%M:%S.%fZ. The camera has the info of the time zone, and actually it converted the local time to UTC time, so I suppose that the MP4 should hide somewhere the time zone info.

How do I see it?

exiftool has the ability to show date/times in local+tz format (like 2022:08:28 11:25:09-04:00) using the -API QuickTimeUTC flag. This means that tz info is in somewhere the mp4. How do I get the tz info with ffprobe?

EDIT: here is a short video file

7
  • The time zone offset is probably hidden the the XMP metadata. Try: ffprobe -print_format json -show_format -show_streams -export_xmp 1 myfile.MP4
    – Rotem
    Aug 29, 2022 at 22:09
  • @Rotem, no, it's not there Aug 29, 2022 at 22:24
  • Hard to guess... Try export_all 1
    – Rotem
    Aug 29, 2022 at 22:27
  • no time zone :-( Aug 29, 2022 at 23:06
  • I recommend you to share a short video file. Don't expect to see a tag named "time zone", look for something like 11:25:09-04:00
    – Rotem
    Aug 30, 2022 at 5:31

1 Answer 1

0

It indeed seems ffprobe does not export ExifIFD (even if ffprobe -export_all 1 -show_format -- "${file}.mp4"), though mentioned. Please state if otherwise.


exiftool, however:

$ exiftool  -a -s -G0:1 -- "${file}.mp4" | grep 'OffsetTime';
[EXIF:ExifIFD]  OffsetTime                      : -04:00
[EXIF:ExifIFD]  OffsetTimeOriginal              : -04:00
[EXIF:ExifIFD]  OffsetTimeDigitized             : -04:00

0x9010 OffsetTime          string ExifIFD (time zone for ModifyDate)
0x9011 OffsetTimeOriginal  string ExifIFD (time zone for DateTimeOriginal)
0x9012 OffsetTimeDigitized string ExifIFD (time zone for CreateDate)

Source: https://exiftool.org/TagNames/EXIF.html


These are the standard video time stamps and part of the Quicktime group. According to the standard, these are supposed to be in UTC, but it's up to you whether you want to make sure they are that way, depending upon what software you use with your files. Adobe programs read these tags as if they were local time, the same as a jpg or RAW file. Windows and Google photos will read them as per the spec as UTC time. So it's up to you as to what you want to do.

Source: https://exiftool.org/forum/index.php?topic=11100.msg59329#msg59329

In short, the MP4 standard is to record the time in UTC. There is no provision for a time zone. If the device (like a phone) knows what time zone it's in, it will record the time as UTC. If the device doesn't know what time zone it's in (my camera, for example), it will record the time as whatever time the device is currently set to.

Source: https://github.com/drewnoakes/metadata-extractor/issues/529


Related:
I just need to change the encoding date in an mp4
How can i modify the Encoding Time of a mp4 file?
You should be aware of the difference between date/time values stored in the metadata of...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .