rename MTS/m2ts with DateTimeOriginal?

Started by liwa, May 08, 2010, 04:22:57 PM

Previous topic - Next topic

liwa

Dears

Is-it possible to rename MTS/m2ts files with exiftool as it can be done for jpg files?

Do you plan this feature for later?

thanks

Phil Harvey

Yes, ExifTool will do this.  Read FAQ number 16 for more information.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

liwa

Hi Phil

thank you very much.
I think we are a lot now managing huge quantity of MTS rushes.
Unfortunately software sold with camcorder or editing software allow very rarely access the MTS metadata, in particular,
timecode (record date time).
Your work addresses this significant lack.

very impressive job you do

Misha

Hi
Trying to rename my m2ts files but nothing happens. :(
exiftool -ext m2ts "-FileName<CreateDate" -d "%Y%m%d_%H%M%S.%%e" D:\RT\

The same command works perfect with JPG files.
exiftool -ext jpg "-FileName<CreateDate" -d "%Y%m%d_%H%M%S.%%e" D:\RT\

What is wrong?

---- ExifTool ----
ExifTool Version Number         : 8.29
---- System ----
File Name                       : 00019.m2ts
Directory                       : D:/RT
File Size                       : 7.4 MB
File Modification Date/Time     : 2009:10:16 06:53:54+03:00
File Permissions                : rw-rw-rw-
---- File ----
File Type                       : M2TS
MIME Type                       : video/m2ts
---- M2TS ----
Video Stream Type               : H.264 Video
Audio Stream Type               : A52/AC-3 Audio
---- AC3 ----
Audio Bitrate                   : 384000
Surround Mode                   : Not indicated
Audio Channels                  : 3/2
Audio Sample Rate               : 48000
---- H264 ----
Image Width                     : 1920
Image Height                    : 1080
Date/Time Original              : 2009:10:10 11:25:03+02:00
Aperture Setting                : 1.8
Gain                            : 9 dB
Exposure Program                : Program AE
White Balance                   : Auto
Image Stabilization             : On
Make                            : Panasonic
MDPM 0xe1                       : 0x833c8c05
MDPM 0xe2                       : 0x80809017
MDPM 0xe3                       : 0x00801f86
MDPM 0xe4                       : 0x9393809c
MDPM 0xe5                       : 0xeba4bd00
MDPM 0xe8                       : 0xf5b20022
MDPM 0xe9                       : 0x50000086
MDPM 0xea                       : 0x00ffffff
MDPM 0xeb                       : 0xf0574a00
MDPM 0xec                       : 0x00000104
MDPM 0xed                       : 0x00000020
MDPM 0xee                       : 0x00000001
---- Composite ----
Image Size                      : 1920x1080


Thank you

Phil Harvey

Hi Misha.

Does the m2ts contain the CreateDate tag?  Use exiftool -s -time:all to see what time-related tags it contains, then use one of those.

- Phil

Edit: I see you have posted the m2ts metadata.  I was correct, there is no "CreateDate".  Use "DateTimeOriginal" instead.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Misha


geoffschultz

Just to clarify this, the correct command line is:

exiftool -ext mts "-FileName<DateTimeOriginal" -d "%Y%m%d_%H%M%S.%%e" /directory

-- Geoff

gian

I have a Panasonic ZS7 camera that produces MTS video files.
According to exiftool, the only timestamp is FileModifyDate which is not unique; what we need is CreateDate or DateTimeOriginal.
Any idea where either of these times are stored in the MTS and whether exiftool could be modified to access them?

My problem is that there are several files with the same FileModifyDate and so renaming these files uniquely is made extremely difficult (and manual).
Thanks!


ExifTool Version Number         : 8.39
File Name                       : 00003.MTS
Directory                       : E:/WD SmartWare.swstor/Pics and Video/2010
File Size                       : 62 MB
File Modification Date/Time     : 2010:07:25 10:43:22-04:00
File Permissions                : rw-rw-rw-
File Type                       : M2TS
MIME Type                       : video/m2ts
Video Stream Type               : H.264 Video
Audio Stream Type               : A52/AC-3 Audio
Audio Bitrate                   : 192000
Surround Mode                   : Not indicated
Audio Channels                  : 2
Image Width                     : 1280
Image Height                    : 720
Audio Sample Rate               : 48000
Image Size                      : 1280x720
-- press any key --


Phil Harvey

Yes, it seems the ZS7 doesn't write the date/time in the H264 video stream (also the FX70 and GH1, but all my other samples have this information).

It is possible that this information simply wasn't written by these cameras.  This is what I suspect.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

gian

Thanks for the prompt reply, Phil.
Exiftool is a great program!

Apparently the info is embedded in the videostream:http://www.avsforum.com/avs-vb/archive/index.php/t-1018113.html

I guess the easiest thing would be to convert the MTS file to a more popular (but larger file) format and then use exiftool.

Thanks, again.

Phil Harvey

I am "boardhead" in the forum you referenced. :)

I didn't go into details, but you can read about the H264 MDPM tags in the ExifTool Tag Name documentation.  (H264 is the video compression codec used in AVCHD/M2TS videos.)  However, the MDPM information is not required by the H264 specification, so not all cameras write it, and unfortunately it seems that the Panasonic ZS7 doesn't. :(

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).