[digikam] [Bug 374453] Extract right video date from MP4 files metadata

wildcowboy bugzilla_noreply at kde.org
Sat Mar 18 15:11:16 GMT 2017


https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #6 from wildcowboy <aegoreev at gmail.com> ---
Hello Gilles,

This message also applicable to:
https://bugs.kde.org/show_bug.cgi?id=377072
https://bugs.kde.org/show_bug.cgi?id=377177

It turned out that ffmpeg is already able to read a lot of metadata we could
use.

Here is an output of an ffmeg -i command on a sample file:
---
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/mnt/data/FamilyPictures/2016/2016-10/20161008/20161007_190516.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2016-10-08T01:10:04.000000Z
    location        : +50.8893-114.0159/
    location-eng    : +50.8893-114.0159/
    com.android.version: 6.0.1
  Duration: 00:00:43.20, start: 0.000000, bitrate: 16947 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080, 16876 kb/s, 29.78 fps, 29.92 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2016-10-08T01:10:04.000000Z
      handler_name    : VideoHandle
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 256 kb/s (default)
    Metadata:
      creation_time   : 2016-10-08T01:10:04.000000Z
      handler_name    : SoundHandle
---

Reading just these three fields

creation_time   : 2016-10-08T01:10:04.000000Z
location        : +50.8893-114.0159/
rotate          : 90 (or displaymatrix: rotation of -90.00 degrees)

will allow digiKam to:

1. Import video files in correct folders, rename them correctly on import
2. Show video files in chronological order when sort by date
3. Show video files on the map, add GPS information to the database
4. Preview video correctly per the rotation tag, create correct video
thumbnails

Is that possible to add the support of this on your roadmap? Let me know your
thoughts.

https://github.com/wang-bin/QtAV/issues/820#issuecomment-287545695

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Digikam-devel mailing list