After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 717180 - AVHCD (.MTS) video timestamps not recognized
AVHCD (.MTS) video timestamps not recognized
Status: RESOLVED OBSOLETE
Product: shotwell
Classification: Other
Component: general
unspecified
Other All
: High normal
: ---
Assigned To: Shotwell Maintainers
Shotwell Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-12 12:38 UTC by Adam Dingle
Modified: 2021-05-19 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Lindsay 2013-11-25 21:49:30 UTC


---- Reported by adam@yorba.org 2011-01-11 16:38:00 -0800 ----

Original Redmine bug id: 3093
Original URL: http://redmine.yorba.org/issues/3093
Searchable id: yorba-bug-3093
Original author: Adam Dingle
Original description:

Reported at https://bugs.launchpad.net/bugs/701719 :

When I import .%(=caps)MTS% (avchd h264/ac3) files into shotwell, the
date/time are not recognize. Files are flagged in the “Aucun Evenementâ€
event (in french translation… aka No Event ?).

If needed, I found a piece of C-code to parse the
PRIVATE/%(=caps)AVCHD%/%(=caps)BDMV%/directory to find the exact date and time
of each .%(=caps)MTS% file.

You need to read every file in the
PRIVATE/%(=caps)AVCHD%/%(=caps)BDMV%/%(=caps)PLAYLIST%/directory and you can
have the creation date/time for every .%(=caps)MTS% file
inPRIVATE/%(=caps)AVCHD%/%(=caps)BDMV%/%(=caps)STREAM%/ directory.

Thanks.

Related issues:
related to shotwell - 3300: use file mtime as timestamp if EXIF
information missing (Open)



---- Additional Comments From shotwell-maint@gnome.bugs 2012-04-04 13:33:00 -0700 ----

### History

####

#1

Updated by Adam Dingle almost 3 years ago

Also seehttp://en.wikipedia.org/wiki/AVCHD.

####

#2

Updated by Adam Dingle almost 3 years ago

  * **Priority** set to _High_

Several users have mentioned they're affected by this. Upping to high.

####

#3

Updated by Adam Dingle almost 3 years ago

See also#3227.

####

#4

Updated by Adam Dingle over 2 years ago

  * **Target version** set to _0.10_

####

#5

Updated by Adam Dingle over 2 years ago

  * **Tracker** changed from _Bug_ to _Feature_

####

#6

Updated by Adam Dingle over 2 years ago

On ticket #3066, Bibinsa wrote:

I would like to mention that AVCHD files do not store the date/time
informations in the AVCHD/%(=caps)BDMV%/%(=caps)STREAM%/*.%(=caps)MTS% files
(Panasonic camera).

Date/Time informations are stored in the
AVCHD/%(=caps)BDMV%/%(=caps)PLAYLIST%/*MPL files.

I'm using a little C program to get date/time informations if you want it.

####

#7

Updated by Adam Dingle over 2 years ago

See also#3520.

####

#8

Updated by Adam Dingle over 2 years ago

  * **Target version** deleted (<strike>_0.10_</strike>)

####

#9

Updated by Adam Dingle over 2 years ago

  * **Target version** set to _0.11_

####

#10

Updated by Adam Dingle over 2 years ago

  * **Target version** deleted (<strike>_0.11_</strike>)

####

#11

Updated by Christian Stadegaart over 1 year ago

  * **Description** updated (diff)

On my AVCHD files created by my Sony camcorder, the video metadata is stored
on _every keyframe_ within the .MTS video stream file itself. Panasonic
camcorders store metadata in every frame EXCEPT the keyframes. Clip info files
(.CLI) or playlist files (.MPL) usually **do NOT contain metadata**. AFAIK, no
standard out there describes that it should be in those files, but I don't
have insight in all the standards of course, so I can be wrong. But if that
would be the case, it would **NEVER** be possible to get the original creation
date of a video file if you only have the .M2TS file on your hard drive,
because you need the whole AVCHD folder structure. Bunch of nonsense if you
ask me.

I created a bash script to export the data/time stamp for my videos to rename
them and file them in Year/Month/Date folders accordingly. You'll need to know
something about hex editing and if you do, it's pretty easy. If there was only
a blueprint for the hex info stream, because every camcorder manufacturer
implements this metadata on its own way.

For my camcorder the following works (xxd is a hex dump utility):

`datetime=$(xxd -l 2048 -ps $original | tr -d '\n' | sed -e
's/.*17ee8c60f84d11d98cd60800200c9a664d44504d//' -e 's/......\(......\)../\1/'
-e 's/\(..............\).*/\1/') ;`

The output is yyyymmddhhmmss.

Hope this helps. Metadate can also contain GPS info, camcorder info, shutter
info etc. See forum.videohelp.com/threads/316229-Export-AVCHD-frame-specific-
metadata-to-subtitles.

####

#12

Updated by Adam Dingle over 1 year ago

Thanks, Christian. Still not sure when we'll get to this, but if you feel like
hacking on Shotwell itself we'd gladly accept a patch. :)



--- Bug imported by chaz@yorba.org 2013-11-25 21:49 UTC  ---

This bug was previously known as _bug_ 3093 at http://redmine.yorba.org/show_bug.cgi?id=3093

Unknown Component 
   Using default product and component set in Parameters 
Unknown version " in product shotwell. 
   Setting version to "!unspecified".
Unknown milestone "unknown in product shotwell. 
   Setting to default milestone for this product, "---".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
Resolution set on an open status.
   Dropping resolution 

Comment 1 Alan Pater 2015-03-18 15:47:35 UTC
Fixed in exiv2? 

   http://dev.exiv2.org/issues/956

Could somebody with access to those video files test them with the exiv2 trunk?
Comment 2 JOG 2015-04-26 03:12:57 UTC
I have the same issue.. Shotwell does not recognize MTS timestamps.. This is with latest unbuntu 15.04 - Which I think has latest shotwell as well...
BTW, how do I test with exiv2 trunk ?
thanks
Comment 3 Jens Georg 2017-04-07 10:09:21 UTC
Some samples at https://www.shedworx.com/shedworx-samples
Comment 4 Jens Georg 2019-11-01 16:15:09 UTC
Doesn't work and it video support is also going to be deprecated with exiv2
Comment 5 GNOME Infrastructure Team 2021-05-19 12:34:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/shotwell/-/issues/2324.