Score:4

Files with date "Unknown" but files have date created in meta data

cn flag

I am rather confused why nemo is reporting that some files have no date set. Which means I cannot order my files by Date. This is only happening with my GoPro videos I will add. But when checking I can see that the Media Create Date is indeed the correct time of recording.

How I get it so the correct date is shown in nemo and in bash when sorting files for my scripts:

enter image description here

Date Unkown

(base) hutber@hutber:/media/hutber/3834-3762/DCIM/100GOPRO$ exiftool GX055351.MP4
ExifTool Version Number         : 11.88
File Name                       : GX055351.MP4
Directory                       : .
File Size                       : 3.7 GB
File Modification Date/Time     : 0000:00:00 00:00:00
File Access Date/Time           : 2022:01:12 22:32:31+00:00
File Inode Change Date/Time     : 0000:00:00 00:00:00
File Permissions                : rwxrwxrwx
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v1 [ISO 14496-1:ch13]
Minor Version                   : 2013.10.18
Compatible Brands               : mp41
Media Data Size                 : 4004174743
Media Data Offset               : 36
Movie Header Version            : 0
Create Date                     : 2022:01:11 19:08:56
Modify Date                     : 2022:01:11 19:08:56
Time Scale                      : 120000
Duration                        : 0:05:21
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                   : 5
Lens Serial Number              : LKO1062003401692
Camera Serial Number Hash       : 9ea9a8bdbd36f956eaa1b923d1cf581e
Firmware Version                : H21.01.01.16.00
Camera Serial Number            : C3461324767792
Camera Model Name               : HERO10 Black
Auto Rotation                   : Down
Digital Zoom                    : No
Pro Tune                        : On
White Balance                   : AUTO
Sharpness                       : MED
Color Mode                      : NATURAL
Auto ISO Max                    : 1600
Auto ISO Min                    : 100
Exposure Compensation           : 0.0
Rate                            : 
Field Of View                   : Unknown (N)
Electronic Image Stabilization  : HS Boost
Audio Setting                   : AUTO
Device Name                     : Highlights
Track Header Version            : 0
Track Create Date               : 2022:01:11 19:08:56
Track Modify Date               : 2022:01:11 19:08:56
Track ID                        : 1
Track Duration                  : 0:05:21
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 3840
Image Height                    : 2160
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : hvc1
Source Image Width              : 3840
Source Image Height             : 2160
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 : GoPro H.265 encoder
Bit Depth                       : 24
Video Frame Rate                : 119.88
Time Code                       : 3
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 24
Audio Sample Rate               : 48000
Text Font                       : Unknown (21)
Text Face                       : Plain
Text Size                       : 10
Text Color                      : 0 0 0
Background Color                : 65535 65535 65535
Font Name                       : Helvetica
Other Format                    : tmcd
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2022:01:11 19:08:56
Media Modify Date               : 2022:01:11 19:08:56
Media Time Scale                : 1000
Media Duration                  : 0:05:21
Handler Class                   : Media Handler
Handler Type                    : NRT Metadata
Handler Description             : GoPro MET
Gen Media Version               : 0
Gen Flags                       : 0 0 0
Gen Graphics Mode               : srcCopy
Gen Op Color                    : 0 0 0
Gen Balance                     : 0
Meta Format                     : gpmd
Warning                         : [minor] The ExtractEmbedded option may find more tags in the media data
Image Size                      : 3840x2160
Megapixels                      : 8.3
Avg Bitrate                     : 99.7 Mbps
Rotation                        : 180

The same recording session but date correct

(base) hutber@hutber:/media/hutber/3834-3762/DCIM/100GOPRO$ exiftool GX075351.MP4
ExifTool Version Number         : 11.88
File Name                       : GX075351.MP4
Directory                       : .
File Size                       : 3.7 GB
File Modification Date/Time     : 2022:01:11 19:46:27+00:00
File Access Date/Time           : 2022:01:12 22:32:33+00:00
File Inode Change Date/Time     : 2022:01:11 19:46:27+00:00
File Permissions                : rwxrwxrwx
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v1 [ISO 14496-1:ch13]
Minor Version                   : 2013.10.18
Compatible Brands               : mp41
Media Data Size                 : 4004313141
Media Data Offset               : 36
Movie Header Version            : 0
Create Date                     : 2022:01:11 19:08:56
Modify Date                     : 2022:01:11 19:08:56
Time Scale                      : 120000
Duration                        : 0:05:21
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                   : 5
Lens Serial Number              : LKO1062003401692
Camera Serial Number Hash       : 9ea9a8bdbd36f956eaa1b923d1cf581e
Firmware Version                : H21.01.01.16.00
Camera Serial Number            : C3461324767792
Camera Model Name               : HERO10 Black
Auto Rotation                   : Down
Digital Zoom                    : No
Pro Tune                        : On
White Balance                   : AUTO
Sharpness                       : MED
Color Mode                      : NATURAL
Auto ISO Max                    : 1600
Auto ISO Min                    : 100
Exposure Compensation           : 0.0
Rate                            : 
Field Of View                   : Unknown (N)
Electronic Image Stabilization  : HS Boost
Audio Setting                   : AUTO
Device Name                     : Highlights
Track Header Version            : 0
Track Create Date               : 2022:01:11 19:08:56
Track Modify Date               : 2022:01:11 19:08:56
Track ID                        : 1
Track Duration                  : 0:05:21
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 3840
Image Height                    : 2160
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : hvc1
Source Image Width              : 3840
Source Image Height             : 2160
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 : GoPro H.265 encoder
Bit Depth                       : 24
Video Frame Rate                : 119.88
Time Code                       : 3
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 24
Audio Sample Rate               : 48000
Text Font                       : Unknown (21)
Text Face                       : Plain
Text Size                       : 10
Text Color                      : 0 0 0
Background Color                : 65535 65535 65535
Font Name                       : Helvetica
Other Format                    : tmcd
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2022:01:11 19:08:56
Media Modify Date               : 2022:01:11 19:08:56
Media Time Scale                : 1000
Media Duration                  : 0:05:21
Handler Class                   : Media Handler
Handler Type                    : NRT Metadata
Handler Description             : GoPro MET
Gen Media Version               : 0
Gen Flags                       : 0 0 0
Gen Graphics Mode               : srcCopy
Gen Op Color                    : 0 0 0
Gen Balance                     : 0
Meta Format                     : gpmd
Warning                         : [minor] The ExtractEmbedded option may find more tags in the media data
Image Size                      : 3840x2160
Megapixels                      : 8.3
Avg Bitrate                     : 99.7 Mbps
Rotation                        : 180

Stat of the broken file:

14_Training$ stat ./GX055351.MP4
  File: ./GX055351.MP4
  Size: 4004635826  Blocks: 7821560    IO Block: 4096   regular file
Device: 821h/2081d  Inode: 19475       Links: 1
Access: (0777/-rwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-01-12 23:32:35.441047700 +0000
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 2022-01-12 23:32:33.504918500 +0000
 Birth: -
AlexFullinator avatar
ar flag
I'm pretty sure that your machine doesn't know when the file was created because you created it on the gopro disk and your machine only knows when a file is created on the actual machine if you move it from your disk to the pc
fuzzy drawings avatar
tj flag
What is the output of `stat /media/hutber/3834-3762/DCIM/100GOPRO/GX055351.MP4`?
cn flag
Thing is though Alex, why would some files read properly but others not?
cn flag
Would I be able to rewrite the meta data that is shown in stat that is available via the exiftool?
Elder Geek avatar
cn flag
You might find [this answer](https://askubuntu.com/questions/62492/how-can-i-change-the-date-modified-created-of-a-file) useful. It should point you in the right direction.
Score:2
kr flag

FS Timestamp vs EXIF

Your file manager uses FS timestamps. (Stored separately from file data)
While exif metadata is part of file data.

exif info
Loading exif metadata (dates,etc) for every file is way slower than just using FS Timestamp.

Config options or plugins may let you add exif functionality like sorting/tool tip info/etc.

FS Differences

Not all file systems use timestamps the same way. Some don't support the same stamps, or are configured not to use all of them.

Only supported timestamps can be copied to any target filesystem, and only if they actually exist.

  1. Make sure your camera writes modified/accessed timestamps, not justcreated

  2. When you install an OS or set up external storage, make sure you use an FS format that support the features you need. (Like for example timestamps).

  3. Make sure mount options aren't set to ignore timestamps or other features you need.

user10489 avatar
in flag
I seem to remember finding a tool that would extract the timestamp from exif data and set the filesystem timestamp. Copying the files to an appropriate filesystem and then running this would fix things. However I don't see the option in exiftool.
kr flag
Using touch, you could set stamps to current time, but the Linux Kernel will not easily let you set a timestamp from the past on on a mounted FS
cn flag
Hum the difficult I have with "make sure it says the time stamps if" it is intermittent. Maybe 3/10 videos do not have time stamps and these are all recorded in the same session. Actually ultimately what am doing is, killing through the files and with ffmpeg combining the files based on the date created. In theory I should be able to order these files before writing to the tmp.txt which is then used by ffmpeg to be ordered via the exit info right? Thus avoiding the real issue.
kr flag
@JamieHutber Yes. you could use a shell script with a **for** loop to run **exiftool** "$filename" on every file, then grepping what you need from the output write a tmp.txt file
kr flag
That script and explanations required, would be way out of the scope of this question though... So if you post a new question I may give it a go.. If someone doesn't beat me to it..
cn flag
Thanks again Svin83. I have awarded you the bounty and I thank you very much for laying this out for me. I have asked a new question and I will look into it myself too https://askubuntu.com/questions/1388957/overwrite-fs-properties-with-the-exif-props
kr flag
@JamieHutber I appreciate it. I'll have a look at it later tonight.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.