ExifTool Forum

ExifTool => Newbies => Topic started by: FloridaRoadie on March 10, 2015, 09:06:14 AM

Title: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 09:06:14 AM
Hello,
I use an action cam and it creates videos in the .mp4 format.  I am constantly swapping out the battery.  When I do this I have to go back into settings and reset the date and time.  Sometimes I am in a hurry and do not do so.  I then get the wrong date and time for quicktime CreateDate, ModiyDate, TrackCreateDate, TrackModifiedDate, MediaCreateDate, and MediaModifyDate.  All of which I would like to change.
I figured I would start with CreateDate and once I figurd out how to change it I could apply that string to the other dates I want to change.  I have read a number of different post but have been unable to find one that helps me. 
I found one post that refered to –quicktime:createdate but I have not been able to write a command that worked using it.

The file I want to change is called FILE0020.mp4 and it is located in the folder
G:\march_7_kiteboarding.

I tried this string
Exiftool –quicktime:createdate=2015:03:07 11:08:19 :\march_7_kiteboarding\FILE0020.mp4
I get this error
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in QuickTime:CreateDate (Print
ConvInv)
Nothing to do.

I've tried adding double zeros to the time (11:08:19:00) that failed
I do not understand [.ss][+/-HH:MM|Z] is telling me in the error.

What should I be typing for the command?  I have about 50 files I need to change but no more than 4 videos shot on the same day.  So no way to really batch all the mp4s at one time.

Thanks much for your assistance,
Greg
Title: Re: changing -quicktime:createdate
Post by: Phil Harvey on March 10, 2015, 09:20:11 AM
Hi Greg,

Quote from: FloridaRoadie on March 10, 2015, 09:06:14 AM
Exiftool –quicktime:createdate=2015:03:07 11:08:19 :\march_7_kiteboarding\FILE0020.mp4
I get this error
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in QuickTime:CreateDate (Print
ConvInv)
Nothing to do.

You need quotes around the date/time value so the shell sees it as a single argument:

exiftool –quicktime:createdate="2015:03:07 11:08:19" ...

Also see FAQ 5 (https://exiftool.org/faq.html#Q5) for more help writing date/time values.

- Phil
Title: Re: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 11:10:25 AM
I added the quotes but get the same error.  :-\
Title: Re: changing -quicktime:createdate
Post by: Phil Harvey on March 10, 2015, 11:17:41 AM
> exiftool -ver
9.89
> exiftool -quicktime:createdate="2015:03:07 11:08:19" a.mp4
    1 image files updated


- Phil
Title: Re: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 11:39:15 AM
I bad I missed a colon in the time.  But all still not well I used

exiftool -quicktime:createdate="2015:03:07 11:08:19" G:\march_7_kiteboarding\FILE0020.mp4

it runs for a long time and then finally errors with the following

C:\Temp\Downloads\ExifTool>exiftool -quicktime:createdate="2015:03:07 11:08:19" G:\march_7_kiteboarding\F
ILE0020.mp4
Error: Error writing output file - G:/march_7_kiteboarding/FILE0020.mp4
    0 image files updated
    1 files weren't updated due to errors

I see it makes a file called FILE00200.mp4_exiftool_tmp in the G:/march_7_kiteboarding directory but it goes away when it errors.
I used exiftool GUI and looked at the temp file and it had the date/time I wanted for the createdate date/time






Title: Re: changing -quicktime:createdate
Post by: Phil Harvey on March 10, 2015, 12:27:57 PM
Is there enough space on your disk to make a copy of this file?

- Phil
Title: Re: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 01:00:46 PM
yes. in fact already have on in the same folder as exiftool
Title: Re: changing -quicktime:createdate
Post by: Phil Harvey on March 10, 2015, 01:05:41 PM
Maybe try adding the -v2 option to see if this gives any hints about what is going wrong.

- Phil
Title: Re: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 02:27:38 PM
This is what I get

exiftool -v2 -quicktime:createdate="2015:03:07 11:08:19" FILE0020.mp4
Writing QuickTime:CreateDate if tag exists
======== FILE0020.mp4
Rewriting FILE0020.mp4...
  FileType = MP4
  MIMEType = video/mp4
  Editing tags in: QuickTime
  Creating tags in:
  Rewriting Movie
  Rewriting MovieHeader
    - MovieHeader:CreateDate = '3503221546'
    + MovieHeader:CreateDate = '3508571299'
  Rewriting UserData
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader

and then it seems to hang up
Title: Re: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 02:55:02 PM
It worked yea  ;D it created a new file with the correct CreateDate.  Now can I string something like this

exiftool -v2 -quicktime:CreateDate="2015:03:07 11:08:19" -quicktime:ModifyDate="2015:03:07 11:08:19" -quicktime:TrackCreateDate="2015:03:07 11:08:19" quicktime:TrackCreateDate="2015:03:07 11:08:19" quicktime:TrackModifiedDate="2015:03:07 11:08:19" quicktime:MediaCreateDate="2015:03:07 11:08:19" quicktime:MediaModifyDate="2015:03:07 11:08:19" FILE0020.mp4


Title: Re: changing -quicktime:createdate
Post by: FloridaRoadie on March 10, 2015, 04:15:49 PM
This worked for me

exiftool -v2 -quicktime:CreateDate="2015:03:07 11:08:19" -quicktime:ModifyDate="2015:03:07 11:08:19" -quicktime:TrackCreateDate="2015:03:07 11:08:19" -quicktime:TrackCreateDate="2015:03:07 11:08:19" -quicktime:TrackModifyDate="2015:03:07 11:08:19" -quicktime:MediaCreateDate="2015:03:07 11:08:19" -quicktime:MediaModifyDate="2015:03:07 11:08:19" FILE0020.mp4

I left a few - out of my command line above

Thanks Phil Harvey for your help
Title: Re: changing -quicktime:createdate
Post by: Phil Harvey on March 10, 2015, 07:29:06 PM
Hi Greg,

I'm glad it seems to work for you now, but I'm not happy because we haven't explained the error you were seeing.  (I am assuming that the "hang up" was just that you got impatient when it was copying of the movie data.)

- Phil