ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Crusty on September 13, 2020, 03:42:51 AM

Title: Setting .mp4 File ‘Year’ Property Value?
Post by: Crusty on September 13, 2020, 03:42:51 AM
Hi there,

I've been hunting around for a while now for a solution to this, but have not found it yet. I'm hoping someone here can help.

I have a bunch of movies in .mp4 files that I'd like to be able to apply a 'Year' released to so that I can sort by that field in Windows Explorer. I can manually set the year using Windows Explorer (see attached image), but I have no idea which ExifTools option to use to do that. If I use the following command line...

exiftool "Only Fools & Horses Big Brother, Comedy, 1981 - 7.9.mp4" -Comment="7.9- Comedy" -Title="Only Fools & Horses, Big Brother" -year=1980 -overwrite_original

...this sets the Content Create Date to 1981...

Encoder                         : Lavf54.63.104
Year                            : 1981
Comment                         : 7.9- Comedy
Content Create Date             : 1980
XMP Toolkit                     : Image::ExifTool 11.65

...but it's the 'Year' property I'd like to set. Is there an ExifTools option to set that? If so, what is it?

Thanks in advance.

Regards, Chris.
Title: Re: Setting .mp4 File ‘Year’ Property Value?
Post by: Hubert on September 13, 2020, 04:36:31 AM
Hi,

According to the QuickTime tags reference https://exiftool.org/TagNames/QuickTime.html (https://exiftool.org/TagNames/QuickTime.html), Year is a string, not a date or number.

It works for me if I quote it:

exiftool -year="1980" /path/to/the/file.mp4

Cheers,

H
Title: Re: Setting .mp4 File ‘Year’ Property Value?
Post by: Crusty on September 13, 2020, 04:55:51 AM
Thanks for the reply H, but that doesn't work for me...
Title: Re: Setting .mp4 File %u2018Year%u2019 Property Value?
Post by: Phil Harvey on September 13, 2020, 08:40:19 AM
I really don't understand what you are doing.   This works to set the "Year" tag:

> exiftool a.mp4 -year=1980
    1 image files updated
> exiftool a.mp4 -year -G1 -a
[Keys]          Year                            : 1980
> exiftool -ver
12.06


Perhaps see FAQ 3 (https://exiftool.org/faq.html#Q3).

- Phil
Title: Re: Setting .mp4 File ‘Year’ Property Value?
Post by: StarGeek on September 13, 2020, 12:10:00 PM
It is a FAQ 3 question.  Setting Year in Windows Properties->Details does not set the Quicktime:Year tag, nor does it set the Microsoft:Year tag, which would have been my guess.  Instead, it sets the Quicktime ItemList:ContentCreateDate tag.

That leads to another problem.  Windows will only accept 4 digits through the Properties window, but exiftool expects a complete timestamp, which seems reasonable to me since it is ContentCreateDATE, not ContentCreateYEAR.  So, you have to add a hashtag to the end of the tag when setting it.

exiftool -ContentCreateDate#=1999 FILE.mp4
Title: Re: Setting .mp4 File ‘Year’ Property Value?
Post by: Crusty on September 13, 2020, 01:30:16 PM
You, sir, *are* a *Star* indeed! Sooper dooper #FixedIt. Many, many thanks :-)