[digikam] [Bug 374453] New: Display as Date the DateUTC metadata coming from MP4 files

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 374453] New: Display as Date the DateUTC metadata coming from MP4 files

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

            Bug ID: 374453
           Summary: Display as Date the DateUTC metadata coming from MP4
                    files
           Product: digikam
           Version: 5.3.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Metadata
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 103142
  --> https://bugs.kde.org/attachment.cgi?id=103142&action=edit
Suprising displayed dates in metadata panel for video files

Hello,

Digikam allow to manage both pictures and movies files and metadata are
displayed for both these 2 kind of files.

But Date metadatas are displayed in a very uncommon way in the right panel
which display the embedded metadata (see screenshot).

It seems this is an issue in digikam: if I use an different software like
exiftool to fetch metadata dates, they are displayed correctly:
$: exiftool /home/marc/pictures/GOPR0022.MP4 | grep Date
File Modification Date/Time     : 2013:01:02 12:23:11+01:00
File Access Date/Time           : 2017:01:01 19:52:08+01:00
File Inode Change Date/Time     : 2017:01:01 19:45:55+01:00
Modify Date                     : 2013:01:02 18:23:11
Track Create Date               : 2013:01:02 18:23:11
Track Modify Date               : 2013:01:02 18:23:11
Media Create Date               : 2013:01:02 18:23:11
Media Modify Date               : 2013:01:02 18:23:11
Date/Time Original              : 2013:01:02 12:23:11
Create Date                     : 2013:01:02 12:23:11

This issue seems related to #316882 which is marked as fixed, but I'm still
encounter this problem with 5.3 coming from ppa.


Regards

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 374453] Display as Date the DateUTC metadata coming from MP4 files

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

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from [hidden email] ---
First, digiKam do not use Exiftool to extract metadata. It use Exiv2 instead.

Second, Exiv2 0.26 support better video metadata. We include this version of
library (not yet released), in universal Linux AppImage bundle. Please try with
this digiKam 5.4.0 pre-release available here :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Display as Date the DateUTC |Extract right video date
                   |metadata coming from MP4    |from MP4 files metadata
                   |files                       |

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #2 from Marc <[hidden email]> ---
Hello Gilles,

First, thanks for your quick answer.

I haven't the required knowledge to judge which is the better API to process
metadata: exiftool example was just to identify which component is responsible
of this display.

I'll give you a feedback with the 5.4 version.

Regards

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

wildcowboy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from wildcowboy <[hidden email]> ---
Confirmed on 5.4.0. For all mp4 files digiKam used a file modification date
instead of any content create date from metadata. Looks like exiv2 does not
read any metadata from mp4 files yet.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|5.3.0                       |5.4.0

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #4 from wildcowboy <[hidden email]> ---
I am wondering if this might help:
https://discuss.pixls.us/t/organize-images-videos-in-folders-by-month-date-taken/3156/10?u=andrius
There is a link to a piece of code of Rapid Photo Downloader responsible for
reading video files' creation date in the post. I tested it on my machine and
it worked well, all video files went to correct date folders

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #5 from wildcowboy <[hidden email]> ---
Mediainfo reads the date well:

mediainfo FILE.mp4 | grep "Encoded date" | head -n 1

Example output:
Encoded date : UTC 2012-01-08 11:16:19

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #6 from wildcowboy <[hidden email]> ---
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.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #7 from [hidden email] ---
yes, we can do it through QtAV.

Try to use stand alone QtAv Player. Load a video and go to Info pannel. These
ffmpeg metadata are there. So i'm sure more and less that QtAV can provide all
these kind of data to client application as digiKam, without to use directly
ffmpeg (and add direct ffpmeg dependencies to digiKam.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #8 from wildcowboy <[hidden email]> ---
(In reply to caulier.gilles from comment #7)
> yes, we can do it through QtAV.
>
> Try to use stand alone QtAv Player. Load a video and go to Info pannel.
> These ffmpeg metadata are there. So i'm sure more and less that QtAV can
> provide all these kind of data to client application as digiKam, without to
> use directly ffmpeg (and add direct ffpmeg dependencies to digiKam.
>
> Gilles Caulier

It can write too. I just wrote GPS location into mp4 file using this command
ffmpeg -i inputfile -metadata location="+50.8893-114.0159/" outputfile

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #9 from [hidden email] ---
Very interesting. Do you know if there is already somewhere a c++ interface to
ffmpeg to read/write metadata on video ?

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374453

--- Comment #10 from wildcowboy <[hidden email]> ---
(In reply to caulier.gilles from comment #9)
> Very interesting. Do you know if there is already somewhere a c++ interface
> to ffmpeg to read/write metadata on video ?

Is this close to what you are looking for?

https://ffmpeg.org/doxygen/2.0/doc_2examples_2metadata_8c-example.html

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