Piwigo / Piwigo-Mobile

Piwigo iOS Mobile Application
MIT License
98 stars 30 forks source link

Creation date of shared files different from creation date of photos/videos #570

Closed EddyLB closed 1 week ago

EddyLB commented 1 month ago

When sharing photos and videos, metadata is preserved and the creation date stored in the metadata of shared photo/video files is correct. However, the creation date of the file itself corresponds to the date on which the file was converted (or shared), not the date on which the photo was taken or the video recorded.

Other applications, including Apple's Photos.app, apply the photo's creation date to the converted file, certainly to make it easier to manage. It is a good idea that should also be adopted by Piwigo iOS.

Here is an example with a video recorded in February and uploaded in May:

% ls -la
-rw-r--r--@   1 lelievre  staff  104137238 Feb  6 16:12 RPReplay_Final1707232371-Original.MP4
-rw-r--r--@   1 lelievre  staff  104137238 May  9 20:58 RPReplay_Final1707232371-Piwigo.mp4

The file creation dates are different, but the metadata are identical:

% ffprobe RPReplay_Final1707232371-Original.MP4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'RPReplay_Final1707232371-Original.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: isommp41mp42
    creation_time   : 2024-02-06T15:12:51.000000Z
  Duration: 00:01:34.02, start: 0.000000, bitrate: 8860 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      creation_time   : 2024-02-06T15:12:51.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709/bt709/iec61966-2-1, progressive), 886x1920, 8845 kb/s, 59.91 fps, 59.94 tbr, 600 tbn (default)
    Metadata:
      creation_time   : 2024-02-06T15:12:51.000000Z
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]

% ffprobe RPReplay_Final1707232371-Piwigo.mp4  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'RPReplay_Final1707232371-Piwigo.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: isommp41mp42
    creation_time   : 2024-02-06T15:12:51.000000Z
  Duration: 00:01:34.02, start: 0.000000, bitrate: 8860 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      creation_time   : 2024-02-06T15:12:51.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709/bt709/iec61966-2-1, progressive), 886x1920, 8845 kb/s, 59.91 fps, 59.94 tbr, 600 tbn (default)
    Metadata:
      creation_time   : 2024-02-06T15:12:51.000000Z
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]