No writable tags set (probably time zone issues)

Started by carefulicarus, October 21, 2022, 11:31:04 AM

Previous topic - Next topic

carefulicarus

Hey there!
I'm completely new to exiftool. Today I wanted to extract the correct date from the filename of some .mp4 videos and save it in the "CreateDate" or in "alldates". It works for nearly all of the videos, but a few problem-makers. I tried to find solutions and get a better understanding, but it's too much at once.

I run Windows 11, downloaded exiftool today, use the standard windows cmd prompt. Some Screenshots from my console:pic1.pngpic2.png


I've read something about tags having to be defined first, but it seems, there's already a value for CreateDate. Also the solution with adding -api QuickTimeUTC in the front didn't work for me.

So as you see the error "No writable tags set from ..." occurs. Any hints? Would be appreciated!
Cheers!
 

Phil Harvey

The problem is that file name has a date but no time.  The extra 0099 in the first file name is some sequence number and would make an invalid time.  To fix this you could replace the last part of the file name with "000000" to set a time of midnight.  The -d option isn't needed:

exiftool "-filecreatedate<${filename;s/-W.*/000000/}" -ext mp4 -r 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 ($).

StarGeek

as usual, I'm too slow, but posting anyway

You're using the Filename to FileCreateDate properly, but the FileCreateDate also requires a time component and your files only contain a date (as usual with WhatsApp).  Also, your regex in that command is looking for 8 digits at the very beginning of the filename and your files start with "vid"

In most cases, people just add a 00:00:00 time.  To do that your command would be
exiftool -ext mp4 -r -fast4 "-FileCreateDate<${fi1ename;m/(\d{8})/;$_=$1} 00:00:00" /path/to/files/

I changed the regex so that it will match 8 digits anywhere in the filename rather than try to remove characters at the beginning and end of the filename.  I removed the -d (-dateFormat) option because it doesn't do anything for this command.  The addition of the -fast option will speed things up a little, as the command only needs to deal with file system tags and this -fast option means that exiftool won't even read the file header.

If you want each to the files to have a different, incrementing time, you could run a second command
exiftool -ext mp4 -r -fileorder4 Filename "-FileCreateDate<+<0:0:$FileSequence" /path/to/files/

The -FileOrder option is probably not necessary and will take a little longer, but it will guarantee that the files are processed in the correct order.  I use StableBit Drive Pool and that doesn't necessarily return files in a sorted manner, so this option is required for me.

The -api QuickTimeUTC option isn't needed for this operation, but if you end up copying the timestamps from the FileCreateDate to the embedded timestamps, i.e. if you use "-AllDates<FileCreateDate", then you would want to add it.  Video timestamps are supposed to be in UTC and the -api QuickTimeUTC option will properly adjust the time to UTC.

"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

Phil Harvey

... and as usual your response is more detailed. :)
...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 ($).

carefulicarus

Wow, thanks so much guys! Only saw your responses now.
Have a good week!