Problem with EXIF data from DV tapes

Started by adamarmadillo, July 30, 2017, 01:04:52 PM

Previous topic - Next topic

adamarmadillo

Hi there. I've just imported/captured footage from my old DV tapes using the app LifeFlix, which takes the footage and separates it into the clips and gives the specific date to it, though for some reason, this date only applies for one part of the EXIF data. I want to import the clips to Apple Photos, though Photos doesn't classify the videos in the correct dates. I tried to see what the dates were in the exif data, and I received this data when entering exiftool -a /Users/AdamA/Movies/LifeFlix/Tapes/Test/Scenes/Test\ -\ 81_h264.mov into the command line:

ExifTool Version Number         : 10.60
File Name                       : Test - 81_h264.mov
Directory                       : /Users/AdamA/Movies/LifeFlix/Tapes/Test/Scenes
File Size                       : 5.5 MB
File Modification Date/Time     : 2003:07:20 08:08:00+01:00
File Access Date/Time           : 2017:07:30 17:51:00+01:00
File Inode Change Date/Time     : 2017:07:27 17:03:49+01:00
File Permissions                : rw-r--r--
File Type                       : M4V
File Type Extension             : m4v
MIME Type                       : video/x-m4v
Major Brand                     : Apple iTunes Video (.M4V) Video
Minor Version                   : 0.0.1
Compatible Brands               : M4V , M4A , mp42, isom
Movie Header Version            : 0
Create Date                     : 2017:07:27 16:02:36
Modify Date                     : 2017:07:27 16:03:36
Time Scale                      : 25000
Duration                        : 10.32 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Matrix Structure                : 1 0 0 0 1 0 0 0 1
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               : 2017:07:27 16:02:36
Track Modify Date               : 2017:07:27 16:03:36
Track ID                        : 1
Track Duration                  : 10.32 s
Track Layer                     : 0
Track Volume                    : 100.00%
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2017:07:27 16:02:36
Media Modify Date               : 2017:07:27 16:03:36
Media Time Scale                : 32000
Media Duration                  : 10.40 s
Media Language Code             : und
Handler Type                    : Audio Track
Handler Description             : Core Media Audio
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 32000
Track Header Version            : 0
Track Create Date               : 2017:07:27 16:02:36
Track Modify Date               : 2017:07:27 16:03:36
Track ID                        : 2
Track Duration                  : 10.32 s
Track Layer                     : 0
Track Volume                    : 100.00%
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Image Width                     : 718
Image Height                    : 540
Media Header Version            : 0
Media Create Date               : 2017:07:27 16:02:36
Media Modify Date               : 2017:07:27 16:03:36
Media Time Scale                : 25000
Media Duration                  : 10.32 s
Media Language Code             : und
Handler Type                    : Video Track
Handler Description             : Core Media Video
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 736
Source Image Height             : 540
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Color Representation            : nclx 1 1 1
Video Field Order               : Progressive; 0
Pixel Aspect Ratio              : 1:1
Clean Aperture Width            : 718
Clean Aperture Height           : 540
Clean Aperture Offset X         : 0
Clean Aperture Offset Y         : 0
Video Frame Rate                : 25
Handler Type                    : Metadata
User Data mak                   : Apple
Content Create Date             : 2017:07:27 16:45:19+01:00
Movie Data Size                 : 5768400
Movie Data Offset               : 6591
Avg Bitrate                     : 4.47 Mbps
Image Size                      : 718x540
Megapixels                      : 0.388
Rotation                        : 0



I'd like to change it so that all the dates (or all that are necessary) are changed to the File Modification Date/Time (2003:07:20 08:08:00+01:00).
How would I do this?
All the best,
Adam

Phil Harvey

Hi Adam,

This will change all dates that ExifTool can write (without adding new ones):

exiftool -P "-time:all<filemodifydate" -wm w DIR

The -P will preserve the original FileModifyDate, and -wm w only writes existing tags.

- 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 ($).

adamarmadillo

Hey Phil,
Thanks for the reply, though for some reason this didn't seem to change anything for me. I checked all the data again with the one of the clips I tested out, and this was the output:

ExifTool Version Number         : 10.60
File Name                       : Test - 175_h264.mov
Directory                       : /Users/AdamA/Desktop/LifeFlix DV Tapes/Test
File Size                       : 53 MB
File Modification Date/Time     : 2003:10:12 05:55:00+01:00
File Access Date/Time           : 2017:07:31 11:15:07+01:00
File Inode Change Date/Time     : 2017:07:31 11:15:06+01:00
File Permissions                : rw-r--r--
File Type                       : M4V
File Type Extension             : m4v
MIME Type                       : video/x-m4v
Major Brand                     : Apple iTunes Video (.M4V) Video
Minor Version                   : 0.0.1
Compatible Brands               : M4V , M4A , mp42, isom
Movie Header Version            : 0
Create Date                     : 2017:07:27 16:22:26
Modify Date                     : 2017:07:27 16:25:11
Time Scale                      : 600
Duration                        : 0:01:37
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Matrix Structure                : 1 0 0 0 1 0 0 0 1
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               : 2017:07:27 16:22:26
Track Modify Date               : 2017:07:27 16:25:11
Track ID                        : 1
Track Duration                  : 0:01:37
Track Layer                     : 0
Track Volume                    : 100.00%
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2017:07:27 16:22:26
Media Modify Date               : 2017:07:27 16:25:11
Media Time Scale                : 32000
Media Duration                  : 0:01:37
Media Language Code             : und
Handler Type                    : Audio Track
Handler Description             : Core Media Audio
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 32000
Track Header Version            : 0
Track Create Date               : 2017:07:27 16:22:26
Track Modify Date               : 2017:07:27 16:25:11
Track ID                        : 2
Track Duration                  : 0:01:37
Track Layer                     : 0
Track Volume                    : 100.00%
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Image Width                     : 766
Image Height                    : 576
Media Header Version            : 0
Media Create Date               : 2017:07:27 16:22:26
Media Modify Date               : 2017:07:27 16:25:11
Media Time Scale                : 600
Media Duration                  : 0:01:37
Media Language Code             : und
Handler Type                    : Video Track
Handler Description             : Core Media Video
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 786
Source Image Height             : 576
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Color Representation            : nclx 1 1 1
Video Field Order               : Progressive; 0
Pixel Aspect Ratio              : 1:1
Clean Aperture Width            : 766
Clean Aperture Height           : 576
Clean Aperture Offset X         : 0
Clean Aperture Offset Y         : 0
Video Frame Rate                : 24
Handler Type                    : Metadata
User Data mak                   : Apple
Content Create Date             : 2017:07:27 16:45:19+01:00
Movie Data Size                 : 55499531
Movie Data Offset               : 46974
Avg Bitrate                     : 4.54 Mbps
Image Size                      : 766x576
Megapixels                      : 0.441
Rotation                        : 0


Apple Photos didn't classify it in the right date either. Not sure what happened, though thanks for the tips.
Any way to fix this?
Adam

Phil Harvey

I should have tested my command first.  You're right, that doesn't do what I wanted (it only tries to write FileModifyDate because a destination tag name of "All" writes only to the same tag name as the source tag).

Instead, try this:

exiftool -P "-*date<filemodifydate" -wm w DIR

- 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 ($).

Hayo Baan

Quote from: Phil Harvey on July 31, 2017, 07:26:28 AM
Instead, try this:

exiftool -P "-*date<filemodifydate" -wm w DIR

You might also want to update time tags as well, if you want that, use this command
exiftool -P "-*date<filemodifydate" "-*time<filemodifydate" -wm w DIR

Be aware, however, that both commands might change tags you do not want to change. So before you run them check if the output of
exiftool -a -G0:1 "-*date" "-*time" DIR
contains any tags that you don't want to change. (you can exclude tags by prefixing them with two - signs on the command-line).
Hayo Baan – Photography
Web: www.hayobaan.nl

adamarmadillo

Thanks so much, Phil! It solved the problem brilliantly! I really appreciate it!

Though Hayo Baan, what exactly would changing the time tags do?

Thanks for the input both of you :)

Hayo Baan

Quote from: adamarmadillo on July 31, 2017, 12:07:11 PM
Though Hayo Baan, what exactly would changing the time tags do?
Actually in your case, with these video files, it would do the wrong thing as it would change e.g the current time tag, which you probably don't want. But with images, you'd likely want to change tags like datetime original as well as a number of other tags that have time in them.  But now I think about this, you'd need to add a * after the tag name part anyway as *Time wouldn't have picked up on those either (*Date* would though).

In any case, checking to see if the wrong tags aren't selected is always a good thing to do!
Hayo Baan – Photography
Web: www.hayobaan.nl