File is not writeable [.mov]

Started by jch2103, October 24, 2023, 12:57:49 AM

Previous topic - Next topic

jch2103

I'm running into a problem adding metadata to .mov files (edited in DaVinci Resolve 18.6, then adding metadata in IM). The ExifTool Output window shows
-execute9999

Writable file extensions:
  360 3G2 3GP 3GP2 3GPP AAX AI AIT APNG ARQ ARW AVIF CIFF CR2 CR3 CRM CRW CS1
  DCP DNG DR4 DVB EPS EPS2 EPS3 EPSF ERF EXIF EXV F4A F4B F4P F4V FFF FLIF GIF
  GLV GPR HDP HEIC HEIF HIF ICC ICM IIQ IND INDD INDT INSP J2K JNG JP2 JPE JPEG
  JPF JPG JPM JPS JPX JXL JXR LRV M4A M4B M4P M4V MEF MIE MNG MOS MOV MP4 MPO
  MQV MRW NEF NKSC NRW ORF ORI PBM PDF PEF PGM PNG PPM PS PS2 PS3 PSB PSD PSDT
  QT RAF RAW RDF RW2 RWL SR2 SRW THM TIF TIFF VRD WDP WEBP X3F XMP

----- Runtime: 0.8 s.

while the log shows 
10.23 16:35:09+96516 [711C] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6646-50.mov  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
The File Window for the video shows a yellow triangle ["There was an error while writing back metadata to this file: 'File is not writeable' This icon vanishes when you rescan the file or metadata is updated successfully.] Rescanning the file doesn't remove the 'pencil' icon. 

Metadata Analyst Results. Version 2023.3.6. 10/23/2023 4:48:27 PM
File analyzed: D:\Pictures\Nikon Z6\2023_1012\DSC_6646-50.MOV
Errors: 0
Warnings: 4

Warning: [System] File has unwritten metadata (pending write-back).<br/>The metadata loaded from the image and the data in the database may not match.
Warning: [XMP] [XMP-iptcExt]:LocationShownGPSLatitude and [XMP-exif]:GPSLatitude (embedded) mismatch.
Warning: [XMP] [XMP-iptcExt]:LocationShownGPSLongitude and [XMP-exif]:GPSLongitude (embedded) mismatch.
Warning: [XMP] [XMP-iptcExt]:LocationCreatedGPSLongitude not mapped to [XMP::iptcExt]:GPSDestLongitude (embedded).
The details from Metadata Analyst are
[XMP-iptcExt]:LocationShownGPSLatitude and [XMP-exif]:GPSLatitude (embedded) mismatch.
'35.196938' => '35.1969383333333'
 [XMP-iptcExt]:LocationShownGPSLongitude and [XMP-exif]:GPSLongitude (embedded) mismatch.
'-106.595133' => '-106.595133333333'
 [XMP-iptcExt]:LocationCreatedGPSLongitude not mapped to [XMP::iptcExt]:GPSDestLongitude (embedded).


A link to the video is here: https://1drv.ms/v/s!AtlBwiIf8wQzgZszqNe5hmsZrpZGyA?e=yNUjb5

If I Reload Metadata or Force Update, the file can be written, but the metadata is changed. Specifically, changes to {File.MD.XMP::dc\description\Description\0}, {File.MD.XMP::photoshop\DateCreated\DateCreated\0} and {File.MD.XMP::xmp\CreateDate\CreateDate\0} are lost. 

Not sure what's happening, but there appears to be an issue w/ inconsistent metadata for .mov files.


John

Tveloso

John, this may be the same issue discussed in this topic:

https://www.photools.com/community/index.php/topic,13686.0.html

Do you have the QuickView Panel open as well?...(if so, closing it - or first focusing a file other than the one you're trying to write back - should allow the write-back to complete successfully).
--Tony

Mario

I think this is the same problem. Windows Media Foundation locking the file while it is loaded into the Video Player.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

#3
Unfortunately, that's not it (or at least not all of my issues for this problem).

I tried updating the reverse geocode for an MOV file with the Map window open (not Quick View) (only Location changed for this specific file) and encountered the same issue (File is Not Writeable, similar output as I included above). Switching to a different MOV file and then retrying the update didn't work either. I tried this again with the Map closed; same result. Some kind of file lock seems plausible, although the MOV clip is only ~300MB.

EDIT
But I next tried just changing the data/time tags, and the update worked flawlessly...(again, no Quick View or Map window open)

So, perhaps it's got something to do with specific tags (in particular location tags) in my MOV files?
John

Mario

Did ExifTool log any warnings to the Output Panel or the IMatch log file?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Just these:

10.25 16:38:39+    0 [7C28] 00  M>  <  0 CIMGeoLocationManager::GetLocations
10.25 16:39:08+28422 [8BB8] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:39:40+32937 [5188] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:39:43+ 2156 [3450] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:39:58+14875 [90B0] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:42:59+181172 [7324] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:44:09+69953 [84D4] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:44:21+12157 [5D20] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:46:51+150578 [35CC] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:46:58+ 7093 [88E4] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'
10.25 16:48:15+76969 [2678] 01  W> ETWARN: Writeback: File not writable: D:\Pictures\Nikon Z6\2023_1012\DSC_6648.MOV  'V:\develop\IMatch5\src\IMEngine\PTETWrapper.cpp(3561)'

This ExifTool output is from a successful write 
-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-tagsfromfile
D:\Pictures\Nikon Z6\2023_1012\DSC_6767-6811.mov
-@
C:\Program Files\photools.com\imatch6\arg_files\exif2xmp.args
--Exif:rating
-@
C:\Program Files\photools.com\imatch6\arg_files\iptc2xmp.args
-@
C:\Program Files\photools.com\imatch6\arg_files\gps2xmp.args
-sep

-XMP-exif:GPSDestDistance#=0.000030
-XMP-exif:GPSDestDistanceRef=Kilometers
-XMP-exif:GPSImgDirection=90.000000
-XMP-exif:GPSImgDirectionRef=True North
-XMP-xmpMM:InstanceID=xmp.iid:5bd1d28a-25f5-4bd8-96d2-2e522f85441c
-xmp:InstanceID=xmp.iid:cda8f11e-4a1a-400d-b631-6119aeaa4f75

-XMP:MetadataDate=now
-XMP:ModifyDate=now
D:\Pictures\Nikon Z6\2023_1012\DSC_6767-6811.mov
-execute
-execute9999

    1 image files updated


----- Runtime: 1 s.
Warning: No writable tags set from D:\Pictures\Nikon Z6\2023_1012\DSC_6767-6811.mov

I'll continue to keep a close eye on this as I add/update MOV files. 
John

Mario

IMatch logs this message when it cannot open the cannot open the file in writable mode.
IMatch tries, but the Windows file system refuses and returns an error.
This is usually a file system permission issue or the file is locked by another application. Or the file does not exist.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

I understand. What I don't yet understand is why some changes to metadata seem to trigger this problem while other changes don't. As I said above, I'll keep tracking this as I work on video clips. 
John

jch2103

#8
One possible clue: The ExifTool output show this when I have an issue with the 'ETWARN: Writeback: File not writable' message:
-execute9999

Writable file extensions:
  360 3G2 3GP 3GP2 3GPP AAX AI AIT APNG ARQ ARW AVIF CIFF CR2 CR3 CRM CRW CS1
  DCP DNG DR4 DVB EPS EPS2 EPS3 EPSF ERF EXIF EXV F4A F4B F4P F4V FFF FLIF GIF
  GLV GPR HDP HEIC HEIF HIF ICC ICM IIQ IND INDD INDT INSP J2K JNG JP2 JPE JPEG
  JPF JPG JPM JPS JPX JXL JXR LRV M4A M4B M4P M4V MEF MIE MNG MOS MOV MP4 MPO
  MQV MRW NEF NKSC NRW ORF ORI PBM PDF PEF PGM PNG PPM PS PS2 PS3 PSB PSD PSDT
  QT RAF RAW RDF RW2 RWL SR2 SRW THM TIF TIFF VRD WDP WEBP X3F XMP

----- Runtime: 0.8 s.

...even though the .MOV file extension is present in the file name.

Here's the ExifTool output for a successful writeback for a different MOV file (just added a keyword):

-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-tagsfromfile
D:\Pictures\Nikon Z6\2023_1012\DSC_6646-50.MOV
-@
C:\Program Files\photools.com\imatch6\arg_files\exif2xmp.args
--Exif:rating
-@
C:\Program Files\photools.com\imatch6\arg_files\iptc2xmp.args
-@
C:\Program Files\photools.com\imatch6\arg_files\gps2xmp.args
-sep

-XMP-lr:HierarchicalSubject=
-XMP-dc:Subject=
-XMP-lr:HierarchicalSubject=things|man-made|balloons
-XMP-lr:HierarchicalSubject=Smugmug|Travel|USA 2023|Albuquerque Balloon Fiesta
-XMP-dc:Subject=things
-XMP-dc:Subject=man-made
-XMP-dc:Subject=balloons
-XMP-dc:Subject=Smugmug
-XMP-dc:Subject=Travel
-XMP-dc:Subject=USA 2023
-XMP-dc:Subject=Albuquerque Balloon Fiesta
-XMP-xmpMM:InstanceID=xmp.iid:ece3d4c8-b1b6-4544-b940-7a2c66104065
-xmp:InstanceID=xmp.iid:4f690b7f-bef0-4f34-9492-e46e22c6104b

-XMP:MetadataDate=now
-XMP:ModifyDate=now
D:\Pictures\Nikon Z6\2023_1012\DSC_6646-50.MOV
-execute
-execute9999

    1 image files updated


----- Runtime: 1 s.
Warning: No writable tags set from D:\Pictures\Nikon Z6\2023_1012\DSC_6646-50.MOV
I've attached the log file for this session; interestingly the successful write doesn't seem to be recorded. 
John

Mario

The Writeback:File not writable is logged by IMatch after checking that the output file is writable.
ExifTool is not launched in that case.

The fragment where ExifTool lists writable file extensions, is there anything before. I see only the execute, but not what IMatch has sent before to the ExifTool process. If this depends on what data you change, maybe there's the info we need.

It might also happen, of course, that ExifTool does not support the specific .MOV variant you use. MOV is a container format and can contain all kinds of streams. But ExifTool usually outputs more or less detailed error messages, not just dumps a list of writable formats...not sure. Video files are an even bigger mess than RAW formats.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Quote from: Mario on October 26, 2023, 08:31:19 PMThe Writeback:File not writable is logged by IMatch after checking that the output file is writable.
ExifTool is not launched in that case.

The fragment where ExifTool lists writable file extensions, is there anything before. I see only the execute, but not what IMatch has sent before to the ExifTool process. If this depends on what data you change, maybe there's the info we need.

It might also happen, of course, that ExifTool does not support the specific .MOV variant you use. MOV is a container format and can contain all kinds of streams. But ExifTool usually outputs more or less detailed error messages, not just dumps a list of writable formats...not sure. Video files are an even bigger mess than RAW formats.

I restarted IM after that last session, so don't have what ExifTool wrote in that session anymore. 

I don't think the version of MOV is the issue. All these clips are from my Nikon Z6, and I've had no metadata issues w/ them. I process clips in Davinci Resolve, which leaves out all the prior metadata in the file it writes (I believe, including date/time tags). Of course, it's possible there's something in the output file that creates issues; something I'll have to check. That's why I have to add metadata back w/ IM. Until recently, that hasn't posed any issues. I'll investigate further...
John