[digiKam-users] MTS video metadata

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

[digiKam-users] MTS video metadata

Guy Rutenberg
Hi,

I've got couple of MTS videos (shot using Sony a6000), and it seems that Digikam fails to parse the tags from the file. I've tried both digikam 5.9 and the 6.0 beta. I saw that there were improvements to metadata handling in 6.0, but it didn't solve it. The thing that bothers me the most is incorrect time associated with the videos (it seems digikam is using modification time of the file, while ignoring the timezone), which means that the videos are not sorted correctly compared to the JPEGs.

I've checked with exiftool and the MTS files indeed contain the correct metadata (including maker and model which are not parsed at all by digikam).

I don't remember such problems with mp4 videos in the past. Am I doing something wrong?

Thanks,
Guy
Reply | Threaded
Open this post in threaded view
|

Re: MTS video metadata

meku
Different cameras store some of the video dates as UTC or localtime. I think Digikam-6.0 is expecting that it is always stored as UTC and then converting to the local timezone.

I noticed that my camera that uses localtime also stores an ExifIFD.DateTimeOriginal tag in the video. Maybe Digikam can do some additional tests on the metadata to look for this or other tags and determine if the video is in UTC or not.


On Fri, 5 Oct 2018 at 20:07, Guy Rutenberg <[hidden email]> wrote:
Hi,

I've got couple of MTS videos (shot using Sony a6000), and it seems that Digikam fails to parse the tags from the file. I've tried both digikam 5.9 and the 6.0 beta. I saw that there were improvements to metadata handling in 6.0, but it didn't solve it. The thing that bothers me the most is incorrect time associated with the videos (it seems digikam is using modification time of the file, while ignoring the timezone), which means that the videos are not sorted correctly compared to the JPEGs.

I've checked with exiftool and the MTS files indeed contain the correct metadata (including maker and model which are not parsed at all by digikam).

I don't remember such problems with mp4 videos in the past. Am I doing something wrong?

Thanks,
Guy
Reply | Threaded
Open this post in threaded view
|

Re: MTS video metadata

Gilles Caulier-4
Hi,

I would add more technical precision here about video files support :

1/ 5.x and older release do not have video metadata support. Exiv2video support is full of bug and we disable it at all.
2/ 6.0.0 has video metadata support. It use ffmpeg for that. We write a wrapper to import all metadata read by ffmpeg when video is identified.
3/ ffmpeg parse video file in different way than exiv2 or exiftool. To be honest, i don't know well where the data are extracted. video metadata are more complex than photo metadata. this is not a puzzle, it's a huge maze.
4/ ffmpeg use extension codecs to support proprietary video. Are you sure to have the right ffmpeg version installed with all video codecs.
5/ With mys experiment when i tune the wrapper code, MP4 and MKV are the best video format. MP4 for ex, is very well documented with a full support of metadata (Thanks to Apple for that).

Voilà

Gilles Caulier

Le sam. 6 oct. 2018 à 16:39, meku <[hidden email]> a écrit :
Different cameras store some of the video dates as UTC or localtime. I think Digikam-6.0 is expecting that it is always stored as UTC and then converting to the local timezone.

I noticed that my camera that uses localtime also stores an ExifIFD.DateTimeOriginal tag in the video. Maybe Digikam can do some additional tests on the metadata to look for this or other tags and determine if the video is in UTC or not.


On Fri, 5 Oct 2018 at 20:07, Guy Rutenberg <[hidden email]> wrote:
Hi,

I've got couple of MTS videos (shot using Sony a6000), and it seems that Digikam fails to parse the tags from the file. I've tried both digikam 5.9 and the 6.0 beta. I saw that there were improvements to metadata handling in 6.0, but it didn't solve it. The thing that bothers me the most is incorrect time associated with the videos (it seems digikam is using modification time of the file, while ignoring the timezone), which means that the videos are not sorted correctly compared to the JPEGs.

I've checked with exiftool and the MTS files indeed contain the correct metadata (including maker and model which are not parsed at all by digikam).

I don't remember such problems with mp4 videos in the past. Am I doing something wrong?

Thanks,
Guy
Reply | Threaded
Open this post in threaded view
|

Re: MTS video metadata

Maik Qualmann
I found a sample video from this camera on the web. In fact, FFmpeg does not
find the date in the file. Exiftool displays a date. All other parameters such
as video codec, audio codec, etc. are recognized.

Maik

Am Samstag, 6. Oktober 2018, 17:10:40 CEST schrieb Gilles Caulier:

> Hi,
>
> I would add more technical precision here about video files support :
>
> 1/ 5.x and older release do not have video metadata support. Exiv2video
> support is full of bug and we disable it at all.
> 2/ 6.0.0 has video metadata support. It use ffmpeg for that. We write a
> wrapper to import all metadata read by ffmpeg when video is identified.
> 3/ ffmpeg parse video file in different way than exiv2 or exiftool. To be
> honest, i don't know well where the data are extracted. video metadata are
> more complex than photo metadata. this is not a puzzle, it's a huge maze.
> 4/ ffmpeg use extension codecs to support proprietary video. Are you sure
> to have the right ffmpeg version installed with all video codecs.
> 5/ With mys experiment when i tune the wrapper code, MP4 and MKV are the
> best video format. MP4 for ex, is very well documented with a full support
> of metadata (Thanks to Apple for that).
>
> Voilà
>
> Gilles Caulier
>
> Le sam. 6 oct. 2018 à 16:39, meku <[hidden email]> a écrit :
> > Different cameras store some of the video dates as UTC or localtime. I
> > think Digikam-6.0 is expecting that it is always stored as UTC and then
> > converting to the local timezone.
> >
> > I noticed that my camera that uses localtime also stores an ExifIFD.
> > DateTimeOriginal tag in the video. Maybe Digikam can do some additional
> > tests on the metadata to look for this or other tags and determine if the
> > video is in UTC or not.
> >
> > On Fri, 5 Oct 2018 at 20:07, Guy Rutenberg <[hidden email]> wrote:
> >> Hi,
> >>
> >> I've got couple of MTS videos (shot using Sony a6000), and it seems that
> >> Digikam fails to parse the tags from the file. I've tried both digikam
> >> 5.9
> >> and the 6.0 beta. I saw that there were improvements to metadata handling
> >> in 6.0, but it didn't solve it. The thing that bothers me the most is
> >> incorrect time associated with the videos (it seems digikam is using
> >> modification time of the file, while ignoring the timezone), which means
> >> that the videos are not sorted correctly compared to the JPEGs.
> >>
> >> I've checked with exiftool and the MTS files indeed contain the correct
> >> metadata (including maker and model which are not parsed at all by
> >> digikam).
> >>
> >> I don't remember such problems with mp4 videos in the past. Am I doing
> >> something wrong?
> >>
> >> Thanks,
> >> Guy




Reply | Threaded
Open this post in threaded view
|

Re: MTS video metadata

Guy Rutenberg
In reply to this post by meku
Hi,

From: Maik Qualmann <[hidden email]>
To: digiKam - Home Manage your photographs as a professional with the power of open source <[hidden email]>
Cc: 
Bcc: 
Date: Sat, 06 Oct 2018 21:09:10 +0200
Subject: Re: [digiKam-users] MTS video metadata
I found a sample video from this camera on the web. In fact, FFmpeg does not
find the date in the file. Exiftool displays a date. All other parameters such
as video codec, audio codec, etc. are recognized.


It seems ffmpeg fails to extract most of the metadata as well, as it doesn't recognize thing like camera model as well.
I think about a workaround by copying (using ffmpeg) the video to another container format which is better supported by ffmpeg/digikam and then copying the metadata using exiftool.

I've tried:
  ffmpeg -i video.mts -c copy video.mp4
  exiftool -tagsFromFile video.mts video.mp4

But still digikam won't read the creation time and other metadata. Any other recommended format?

Thanks,
Guy
Reply | Threaded
Open this post in threaded view
|

Re: MTS video metadata

jdd@dodin.org
Le 08/10/2018 à 13:49, Guy Rutenberg a écrit :

> I've tried:
>    ffmpeg -i video.mts -c copy video.mp4

copy do only what is said, copy exactly, same as rename...

converting to mp4 may dio the job, but I never tested for metadata

http://dodin.org/wiki/pmwiki.php?n=Doc.UsingHtml5

jdd


--
http://dodin.org
Reply | Threaded
Open this post in threaded view
|

Re: MTS video metadata

Guy Rutenberg
In reply to this post by meku
Hi,


---------- Forwarded message ----------
From: "[hidden email]" <[hidden email]>
To: [hidden email]
Cc: 
Bcc: 
Date: Mon, 8 Oct 2018 14:35:15 +0200
Subject: Re: [digiKam-users] MTS video metadata
Le 08/10/2018 à 13:49, Guy Rutenberg a écrit :

> I've tried:
>    ffmpeg -i video.mts -c copy video.mp4

copy do only what is said, copy exactly, same as rename...

converting to mp4 may dio the job, but I never tested for metadata

http://dodin.org/wiki/pmwiki.php?n=Doc.UsingHtml5

jdd


copy isn't the same as rename, as the container format itself changes. If I understand correctly, the metadata is stored by the container and not in the actual video stream. By using "-c copy" I copy the video stream as-is to the new container (without the quality loss from re-encoding). The problem is that it seems that ffmpeg does very poor job in metadata handling.

Thanks,
Guy