best or easiest way to bach modify videos create date to be same as modify date?

Started by Emir. B., March 01, 2020, 08:28:40 AM

Previous topic - Next topic

Emir. B.

Hello.

I have lot of old videos on my hdd witch I wish to upload to Google photos. Problem is when I upload them, google photos sorts them by create date or something, but videos should be sorted by Date modify.

What is best or easiest way to bach modify lot of videos in C:\2006videos create date (and time) to modify date (and time)?

I am total noob for sintax and windows7 terminal. Please write me a sintax command.

Thank You so much.
ps
I still can not believe that google photos have this big problem with metadata... Unbelievable :(
Thank You Phil for great piece of software.
Perfect cure for Corona virus: Eating lot of white onions. You may still get corona virus, but everybody is running away from you :)

Schone grusse aus Bosnia ;)

Emir. B.

I did lot of research and find that this sintax works for google photos service

exiftool "-alldates<filemodifydate" C:\2006videos

Now uploaded videos works fine in google photos except +1 h time zone, but it is not big deal.

It is unclear for me why exiftool makes copy of my original videos?

Perfect cure for Corona virus: Eating lot of white onions. You may still get corona virus, but everybody is running away from you :)

Schone grusse aus Bosnia ;)

StarGeek

Quote from: Emir. B. on March 01, 2020, 08:28:40 AM
I have lot of old videos on my hdd witch I wish to upload to Google photos. Problem is when I upload them, google photos sorts them by create date or something, but videos should be sorted by Date modify.

What is best or easiest way to bach modify lot of videos in C:\2006videos create date (and time) to modify date (and time)?

I thought I had done testing on this, but I can't find any details in my notes or a previous post of mine, so I can't help with the exact tags to write.

The syntax would be this.  Replace TAG1 with the name of the tag to be changed and TAG2 with the name of the tag to copy from.
exiftool "-TAG1<TAG2" /path/to/files

The problem is figuring out which tags to actually use.

Run this on one of the files
exiftool -g1 -a -s -time:all FILE.mp4

That will list all the time stamps in the file.  One important factor is that video time stamps are supposed to be in UTC, so if they're correct, the listed time will be off by your time zone.

If Google ends up displaying dates that are off by your time zone, then try adding -api QuickTimeUTC to your command.

QuoteI still can not believe that google photos have this big problem with metadata... Unbelievable :(

Don't be too hard on Google, they actually are doing better with regards to metadata than most programs/sites.  Metadata is just that complicated.  Even Adobe screws up video time stamps last I checked.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

StarGeek

Quote from: Emir. B. on March 01, 2020, 11:13:18 AM
I did lot of research and find that this sintax works for google photos service

exiftool "-alldates<filemodifydate" C:\2006videos

Odds are the tag being used is the Quicktime:CreateDate, which would be covered by AllDates.  Try adding -api QuickTimeUTC to your command to deal with the time zone issue.

QuoteIt is unclear for me why exiftool makes copy of my original videos?

Exiftool always makes a backup copy of your file.  You can add the Overwrite_Original option to your command to suppress this.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Emir. B.

Thanks StarGeek :)

Windows 7
Exiftool version exiftool-11.89
Video type.3gp

QuoteRun this on one of the files
exiftool -g1 -a -s -time:all FILE.mp4

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>exiftool -g1 -a -s -time:all "C:\video\nova dig antena.3gp"
---- System ----
FileModifyDate                  : 2007:11:15 13:12:08+01:00
FileAccessDate                  : 2020:03:01 18:11:03+01:00
FileCreateDate                  : 2020:03:01 18:11:03+01:00
---- QuickTime ----
CreateDate                      : 2019:12:05 15:14:55
ModifyDate                      : 2019:12:05 15:14:55
---- Track1 ----
TrackCreateDate                 : 2019:12:05 15:14:55
TrackModifyDate                 : 2019:12:05 15:14:55
MediaCreateDate                 : 2019:12:05 15:14:55
MediaModifyDate                 : 2019:12:05 15:14:55
---- Track2 ----
TrackCreateDate                 : 2019:12:05 15:14:55
TrackModifyDate                 : 2019:12:05 15:14:55
MediaCreateDate                 : 2019:12:05 15:14:55
MediaModifyDate                 : 2019:12:05 15:14:55

C:\     >




I think that this sintax works fine.

exiftool "-alldates<filemodifydate" C:\folder

It creates one new fields in metadata
Date/Time Original              : 2008:06:27 18:26:30+02:00
Create Date                     : 2008:06:27 18:26:30+02:00
Modify Date                     : 2008:06:27 18:26:30+02:00
and it set that up with filemodifydate.
I think google photos use this as initial date in google photos service because it works fine in GP.


This is my original video file:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\ratm>exiftool "C:\Users\ratm\Desktop\New folder (4)\2233\tarzan.3gp"
ExifTool Version Number         : 11.89
File Name                       : tarzan.3gp
Directory                       : C:/Users/ratm/Desktop/New folder (4)/2233
File Size                       : 37 kB
File Modification Date/Time     : 2008:06:27 18:26:30+02:00
File Access Date/Time           : 2020:03:01 15:49:50+01:00
File Creation Date/Time         : 2020:03:01 15:49:50+01:00
File Permissions                : rw-rw-rw-
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.0.0
Compatible Brands               : isom, mp42
Movie Header Version            : 0
Create Date                     : 2019:12:05 18:07:09
Modify Date                     : 2019:12:05 18:07:09
Time Scale                      : 1000
Duration                        : 3.97 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2019:12:05 18:07:09
Track Modify Date               : 2019:12:05 18:07:09
Track ID                        : 1
Track Duration                  : 3.60 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 192
Image Height                    : 144
Compressor ID                   : avc1
Source Image Width              : 192
Source Image Height             : 144
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Video Frame Rate                : 10
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2019:12:05 18:07:09
Media Modify Date               : 2019:12:05 18:07:09
Media Time Scale                : 8000
Media Duration                  : 3.97 s
Media Language Code             : und
Handler Description             : ISO Media file produced by Google Inc. Created
on: 12/05/2019.
Audio Format                    : mp4a
Audio Channels                  : 1
Audio Bits Per Sample           : 16
Audio Sample Rate               : 8000
Balance                         : 0
Handler Type                    : Metadata
Handler Vendor ID               : Apple
Encoder                         : Google
Media Data Size                 : 36520
Media Data Offset               : 1693
Image Size                      : 192x144
Megapixels                      : 0.028
Avg Bitrate                     : 73.6 kbps
Rotation                        : 0

C:\Users\ratm>



And this is the same file modified with

exiftool "-alldates<filemodifydate" C:\folder


C:\Users\ratm>exiftool C:\Users\ratm\Desktop\2233\tarzan.3gp
ExifTool Version Number         : 11.89
File Name                       : tarzan.3gp
Directory                       : C:/Users/ratm/Desktop/2233
File Size                       : 40 kB
File Modification Date/Time     : 2020:03:01 21:46:58+01:00
File Access Date/Time           : 2020:03:01 21:46:58+01:00
File Creation Date/Time         : 2020:03:01 21:46:42+01:00
File Permissions                : rw-rw-rw-
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.0.0
Compatible Brands               : isom, mp42
Movie Header Version            : 0
Time Scale                      : 1000
Duration                        : 3.97 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2019:12:05 18:07:09
Track Modify Date               : 2019:12:05 18:07:09
Track ID                        : 1
Track Duration                  : 3.60 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 192
Image Height                    : 144
Compressor ID                   : avc1
Source Image Width              : 192
Source Image Height             : 144
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Video Frame Rate                : 10
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2019:12:05 18:07:09
Media Modify Date               : 2019:12:05 18:07:09
Media Time Scale                : 8000
Media Duration                  : 3.97 s
Media Language Code             : und
Handler Description             : ISO Media file produced by Google Inc. Created
on: 12/05/2019.
Audio Format                    : mp4a
Audio Channels                  : 1
Audio Bits Per Sample           : 16
Audio Sample Rate               : 8000
Balance                         : 0
Handler Type                    : Metadata
Handler Vendor ID               : Apple
Encoder                         : Google
XMP Toolkit                     : Image::ExifTool 11.89
Date/Time Original              : 2008:06:27 18:26:30+02:00
Create Date                     : 2008:06:27 18:26:30+02:00
Modify Date                     : 2008:06:27 18:26:30+02:00

Media Data Size                 : 36520
Media Data Offset               : 4796
Image Size                      : 192x144
Megapixels                      : 0.028
Avg Bitrate                     : 73.6 kbps
Rotation                        : 0

C:\Users\ratm>


One more optional thing that I wish to set up is that "modify date" or/and "date created" to be set in desired value.  In that way I will get more control in windows explorer. Now all dates in windows explorer are set on day I used exiftool or today.

PS
Time zone is not big issue. I am very tired of trying to chronologically set up my photo/video album in google photos. Believe it or not, I was trying for few months to solve this problem with metadata dates in videos and photos, but mostly in videos. Best option is definitely EXIFTOOL by Phil, thanks Phil, but it is unusual piece of software, but we are all in this forum quite unusual ppl interested in metadata, so it is quite ok.

I have read that Adobe does not support lot of metadata correctly, so I will believe you when you say that google is doing great job :)
Perfect cure for Corona virus: Eating lot of white onions. You may still get corona virus, but everybody is running away from you :)

Schone grusse aus Bosnia ;)

StarGeek

Quote from: Emir. B. on March 01, 2020, 04:22:16 PMOne more optional thing that I wish to set up is that "modify date" or/and "date created" to be set in desired value.  In that way I will get more control in windows explorer. Now all dates in windows explorer are set on day I used exiftool or today.

Try adding the -P (preserve) option.

QuoteI have read that Adobe does not support lot of metadata correctly, so I will believe you when you say that google is doing great job :)

For the most part it does with regards to image metadata.  The supplies a relatively simple interface to a complex subject.  I only have an older version of Lightroom and don't do much with video so it's not something I can research much.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Emir. B.

QuoteTry adding the -P (preserve) option.

Can you please give me some example with  -P command?

I use now two command to get what I want

exiftool "-alldates<filemodifydate" C:\VIDEO
AND
exiftool "-filemodifydate<DateTimeOriginal" C:\VIDEO


First command crates new fields in metadata and those fields use Google photos to set up video date in their service.

Second command edits modifies modify date again and it is easy to sort that video in windows explorer.

It is improvisation, but it works. If someone have suggestions, I will be thankful. Thank you.
Perfect cure for Corona virus: Eating lot of white onions. You may still get corona virus, but everybody is running away from you :)

Schone grusse aus Bosnia ;)

StarGeek

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Emir. B.

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\ratm>EXIFTOOL C:\Users\ratm\Desktop\1\coek.AVI
ExifTool Version Number         : 11.89
File Name                       : coek.AVI
Directory                       : C:/Users/ratm/Desktop/1
File Size                       : 147 kB
File Modification Date/Time     : 2007:08:20 20:30:56+02:00
File Access Date/Time           : 2007:08:20 20:30:56+02:00
File Creation Date/Time         : 2007:08:20 20:30:56+02:00

File Permissions                : rw-rw-rw-
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.0.0
Compatible Brands               : isom, mp42
Movie Header Version            : 0
Create Date                     : 2019:12:05 15:14:27
Modify Date                     : 2019:12:05 15:14:27
Time Scale                      : 1000
Duration                        : 1.67 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2019:12:05 15:14:27
Track Modify Date               : 2019:12:05 15:14:27
Track ID                        : 1
Track Duration                  : 1.47 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 640
Image Height                    : 480
Compressor ID                   : avc1
Source Image Width              : 640
Source Image Height             : 480
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Video Frame Rate                : 15
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2019:12:05 15:14:27
Media Modify Date               : 2019:12:05 15:14:27
Media Time Scale                : 11025
Media Duration                  : 1.67 s
Media Language Code             : und
Handler Description             : ISO Media file produced by Google Inc. Created
on: 12/05/2019.
Audio Format                    : mp4a
Audio Channels                  : 1
Audio Bits Per Sample           : 16
Audio Sample Rate               : 11025
Balance                         : 0
Handler Type                    : Metadata
Handler Vendor ID               : Apple
Encoder                         : Google
Media Data Size                 : 149275
Media Data Offset               : 1519
Image Size                      : 640x480
Megapixels                      : 0.307
Avg Bitrate                     : 714 kbps
Rotation                        : 0

C:\Users\ratm>


When I try to execute commands

exiftool "-AllDates<FileModifyDate" C:\Users\ratm\Desktop\1
OR
exiftool "-filemodifydate<DateTimeOriginal" C:\Users\ratm\Desktop\1


It says that
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\ratm>exiftool "-AllDates<FileModifyDate" C:\Users\ratm\Desktop\1
    1 directories scanned
    0 image files read
C:\Users\ratm>


and I need one of those date/time to copy on other places

File Modification Date/Time     : 2007:08:20 20:30:56+02:00
File Access Date/Time           : 2007:08:20 20:30:56+02:00
File Creation Date/Time         : 2007:08:20 20:30:56+02:00

Please help. There some issue with .avi files, but I do not get it. :(

Perfect cure for Corona virus: Eating lot of white onions. You may still get corona virus, but everybody is running away from you :)

Schone grusse aus Bosnia ;)

StarGeek

Exiftool can't edit embedded data in AVI files.  You can edit the FileModifyDate/FileCreateDate, but have to add something like -ext+ avi  (see FAQ #16).
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Emir. B.

First, thank you for your patiente  ;D
When  I use this command:

C:\Users\ratm>exiftool -ext AVI "-directory<dateTimeOriginal" C:\Users\ratm\Desk
top\1
Warning: No writable tags set from C:/Users/ratm/Desktop/1/video01.AVI
Warning: No writable tags set from C:/Users/ratm/Desktop/1/video02.AVI
    1 directories scanned
    0 image files updated
    2 image files unchanged



And when I use this one

C:\Users\ratm>exiftool -ext AVI "-AllDates<FileModifyDate" C:\Users\ratm\Desktop
\1
Error: Not a valid AVI (looks more like a MOV) - C:/Users/ratm/Desktop/1/22.AVI
Error: Not a valid AVI (looks more like a MOV) - C:/Users/ratm/Desktop/1/33.AVI
    1 directories scanned
    0 image files updated
    2 files weren't updated due to errors


Can you please write me down sintax, please :)
Perfect cure for Corona virus: Eating lot of white onions. You may still get corona virus, but everybody is running away from you :)

Schone grusse aus Bosnia ;)

StarGeek

DateTimeOriginal doesn't exist in AVI files.  Additionally, the format of time stamps includes colons, so try to move to directories based upon time stamps will fail unless you use the -d (dateFormat) option to format the date differently.

Run this command
exiftool -g1 -a -s C:/Users/ratm/Desktop/1/video01.AVI

That will show you all the tags you can copy from.

The second command doesn't work because, as I said, exiftool can't edit AVI files.

I can't give you an exact command because I no longer know what you are trying to do.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype