File name synchronization problem with JPEG & MP4

Started by dai, October 23, 2014, 12:16:20 AM

Previous topic - Next topic

dai

ExifTool is greatest program I have ever used. Thanks a lot. But for the moment I have a problem with changing file name. It has nothing to do with ExifTool, it is due to the different time stamp definition of image and video files.

I am using Sony A7S for video shooting. A7S generate a JPEG thumbnail for each recording file. It is a very useful for clip management. File name generate by the A7S is C001.MP4 and C0001T01.JPG. I would like to change the name to take taken by:

exiftool -fast2 "-FileName<CreateDate" -d "%Y%m%d_%H%M%S%%+c.%%e" DIR\

Naturally, I would like the two corresponding file have the same name of the time taken. It works fine with JPEG file, but troublesome with MP4 file due to different expression of "Create Time" Tag. It is quite tricky. I wish I could express it clear.

For instance, I have a "C0002.MP4" file and its thumbnail "C0002T01.JPG"
exiftool.ext C0001.MP4 gives: (Screen cut)

Attached file: MP4Tags.png


"Create Date" Tag(in the red frame) give the time of Greenwich time instead of local time hour. "Creation Time Value" Tag (in the blue frame) gives local time labeled with "+8:00".
However, the JPEG gives:

exiftool.ext C0002T01.JPG gives: (Screen cut)

Attached file: JPEGTags.png

"Create Date" Tag(in the red frame) give local time, and finish the task straightforwardly.

If I use "Create Date" to generate the file name, MP4 file and JPEG thumbnail file would have 8 hour in difference (my time zone). To get it around, what I did is to use "Date/Time Shift Feature" to shift the "Create Date" of MP4 file (+8hours) and change the file name, then change "Create Date" back(-8hours) again as:


exiftool "-CreateDate+=0:0:0 8:0:0" DIR\
exiftool "-FileName<CreateDate" -d "A7S_%Y%m%d_%H%M%S%%+c.%%e" DIR\
exiftool "-CreateDate-=0:0:0 8:0:0" DIR\


It worked but awkward. I also tried to use "Creation Time Value" Tag of MP4 file to generate the MP4 file since it has local time, but no success.

I wonder are there an elegant way to solve this problem?

Phil Harvey

I don't have time to read through your post carefully right now, but did you try playing with the QuickTimeUTC API option?:  -api QuickTimeUTC

- Phil

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

dai

Worked! thanks a lot. I did not read the application documentation that much.