Write XMP Files

I need to write xmp files. These files will I then be imported in other applications like PhaseOne's Media Pro. The rest of my application is writen in C# so I need something that works with C#. Are there any libraries to do this? Ideally, there is some xmp object that can be serialized.

The only way that I could get Lightroom to write the xmp files for these specific files was to make a change to all of them AND I had to turn on Automatically write changes to xmp files in the catalog preferences section. If this option was not set, even after making a change to the files, Lightroom would not create the xmp files.
So I finally got the program to create the xmp files, I just can't understand what's different about these 93 files that insisted on having xmp writes turned on globally before any xmp files could be created. I turned off this global setting after creating the needed files.
The whole purpose of this exercise was to change the Lense Description to a Sigma 10-20mm F4 from a Tamron lense. I found a shareware program that allowed me to select a directory of files and make a global edit to all 93 xmp files at once. I then read the XMP files back into Lightroom and everything is right with the world.
Is the option of NOT changing the lense designation within Lightroom a XMP limitation or is this a design decision of the LR engineering team? It sure would be nice to have the option to PAINT the changes (in this case lense description) from one image to the rest of the group, if one chose to do this.

Similar Messages

  • Turning on 'write xmp files' in LR 5.4 changed the modified date on my old raw and jpg files. Can i stop this?

    On the advice of an article saying XMP sidecar files are a safer alternative to relying only on the catalog, I recently (June 16, 2014) turned on write XMP files. Now all my JPG and raw files have the same modified date of June 16, 2014, making it impossible to know which are the most recent files, etc.
    Is it possible to change this behavior to only create these files for new images - or to stop this behavior?
    I'm reverting to a backup of all my files and turning this option o ff for now.
    Thx

    I assume your raws are in DNG format? If xmp is in sidecar, it won't change raw file date.
    Anyway, saving xmp does not change any dates in Lightroom, so you should still be able to sort by edit time or capture time...
    But if you want control, you have to save manually instead of automatically.
    Two things that might help:
    1. Filter based on metadata status.
    2. robcole.com - DNGPreviewUpdater
    Rob

  • Can't Write XMP Files

    I'm using Windows XP and LR 1.3.1 and I can't seem to write a specific folder of files. I'm trying to create the XMP files so I can do a global edit to modify the Lense type. When I select all and then click on Save Metadata to Files, the program does not write the files for this specific folder. I have tried this on other files and I don't get the same problem. I have tried moving the specific files themselves to their own collection and trying the same process above, but I get the same result.
    These are Pentax K10D files saved as PEF files.

    The only way that I could get Lightroom to write the xmp files for these specific files was to make a change to all of them AND I had to turn on Automatically write changes to xmp files in the catalog preferences section. If this option was not set, even after making a change to the files, Lightroom would not create the xmp files.
    So I finally got the program to create the xmp files, I just can't understand what's different about these 93 files that insisted on having xmp writes turned on globally before any xmp files could be created. I turned off this global setting after creating the needed files.
    The whole purpose of this exercise was to change the Lense Description to a Sigma 10-20mm F4 from a Tamron lense. I found a shareware program that allowed me to select a directory of files and make a global edit to all 93 xmp files at once. I then read the XMP files back into Lightroom and everything is right with the world.
    Is the option of NOT changing the lense designation within Lightroom a XMP limitation or is this a design decision of the LR engineering team? It sure would be nice to have the option to PAINT the changes (in this case lense description) from one image to the rest of the group, if one chose to do this.

  • XMP Files in LR 1.4.1

    Hi,  In using LR I find that my image folder contains not only my FPG and RAW file but also many images have an associated XMP file.  I have Three quesitons:
    1) Am I correct that the xmp file holds the edits I made in LR?  In other words the original RAW file is untouched but as I "develop" an image the sequence of changes are placed in the XMP file.
    2)  If #1 is correct, is that the only way to store the changes?  When I first researched LR I thought I saw something acout having a choice of storing such info in either XMP or the LR Catalog.  What are my options and how do I select which one I want to use?
    3)  When I select a bunch of images in the grid, then right click on a different folder and select "move selected images to this folder" it moves the JPG and the RAW and updates the catalog to know the image is in a new file.  However, it seems that the XMP's are still in the original folder.  Is this normal?  Should I move the XMP files to the same folder that the images are now in?
                             Thanks -- Dan

    Am I correct that the xmp file holds the edits I made in LR?  In other words the original RAW file is untouched but as I "develop" an image the sequence of changes are placed in the XMP file.
    No, this is incorrect. The edits are stored in the catalog file. You can make Lightroom write a copy of the edits to an xmp sidecar, but it will be a copy, not the main repository. If you choose to write xmp files, either explicitly or automatically, indeed the original RAW is untouched. If you edit the xmp sidecar in another program, Lightroom does NOT automatically pick up on the changes. You would have to explicitly read from it. If you do that Lightroom will overwrite the settings in the catalog file with those in the sidecar.
    2) answered above. You cannot choose. The main store is always the catalog file.
    However, it seems that the XMP's are still in the original folder.  Is this normal?
    As far as I know, if lightroom wrote the xmp file, it should move it along. Perhaps another program (bridge or ACR for example) wrote them. In that case Lightroom doesn't know about them and won't move them along.
    Should I move the XMP files to the same folder that the images are now in?
    As Lightroom doesn't really care about them you only need to do this if you want to keep things nice and tidy I guess.

  • Create XMP files from existing edited files

    I just learned I needed to have the box checked in the Prefs menu in order for LR to automatically write XMP files in the images' folder. Now I need to go and create XMP files for all the photos I have previously edited. How can I do that?

    That worked this time. I read in the forums that's what I should do, but it wasn't working. No XMP files were showing up with the image files. I did a restart of LR, maybe that did it.
    Thanks!

  • Adobe Media Encoder Could not write XMP data in output file.

    Hi there i have searched for this on the forums,
    if there is a Thread on it please Link:)
    This is my Encoding Log from Adobe Media ancoder,
    (se Below).
    im doing a projekt from Mts Files, in Premiere pro
    i have Checked the box that no Xmp Data needs to be added, to the left from the Queue button in the export window.
    Should i Delete all the Xmp in Bridge or somthing like that to Resolve this?
    Regards
    Jonas Dwight
    Encoding Log:
    - Source File: /Users/Blasuk/Library/Caches/TemporaryItems/Mogel_oe_2014_nyeste.prproj
    - Output File: /Users/Blasuk/Desktop/Video_Projekts/Fremkaldte/Moegeloe2014-hq.mp4
    - Preset Used: Custom
    - Video: 1920x1080 (1,0), 25 fps, Upper, 01:18:52:10
    - Audio: AAC, 320 kbps, 48 kHz, 5.1
    - Bitrate: VBR, 2 pass, Target 15.00 Mbps, Max 41.30 Mbps
    - Encoding Time: 11:05:14
    01/05/2015 07:35:01 PM : File Encoded with warning
    File importer detected an inconsistency in the file structure of Moegeloe2014-hq.mp4.  Reading and writing this file's metadata (XMP) has been disabled.
    Adobe Media Encoder
    Could not write XMP data in output file.

    Any help please?! Thank you!

  • Media Encoder "Could not write XMP data in output file." issue

    Greetings,
         We have invested a great deal of money and time into a brand new editting system and we need some help with adobe media encoder. We are trying to export some of our projects and we keep getting the same error. Here is the entire log of errors:
    Could not write XMP data in output file.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_6.prproj
    - Output File: M:\acura_rooftop_43_draft_1.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:17:23
    2/4/2010 1:42:28 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_7.prproj
    - Output File: C:\Users\Ramius\Desktop\acura_rooftop_43draft_1.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:02:09
    2/4/2010 1:54:21 PM : Encoding Failed
    The Operation was interrupted by user
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_9.prproj
    - Output File: C:\Users\Ramius\Desktop\acura_rooftop_43draft_1.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:16:04
    2/4/2010 2:19:49 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_10.prproj
    - Output File: C:\Users\Ramius\Desktop\acura_rooftop_HD_draft_1.mp4
    - Preset Used: HDTV 1080p 29.97 High Quality
    - Video: NTSC, 1920x1080, 29.97 [fps], Progressive
    - Audio: AAC, 160 [kbps], 48 kHz, Stereo
    - Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
    - Encoding Time: 00:01:38
    2/4/2010 2:30:31 PM : Encoding Failed
    The Operation was interrupted by user
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_11.prproj
    - Output File: C:\Users\Ramius\Desktop\acura_HD.mp4
    - Preset Used: HDTV 1080p 29.97 High Quality
    - Video: NTSC, 1920x1080, 29.97 [fps], Progressive
    - Audio: AAC, 160 [kbps], 48 kHz, Stereo
    - Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
    - Encoding Time: 00:00:38
    2/4/2010 3:19:31 PM : Encoding Failed
    The Operation was interrupted by user
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_12.prproj
    - Output File: C:\Users\Ramius\Desktop\acura_HD.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:01:08
    2/4/2010 3:31:37 PM : Encoding Failed
    The Operation was interrupted by user
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_17.prproj
    - Output File: C:\Users\Ramius\Desktop\acura_HD.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:15:31
    2/4/2010 4:21:06 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_19.prproj
    - Output File: M:\GRAPHICS\cow_graphics\acura_HD.mp4
    - Preset Used: HDTV 1080p 29.97 High Quality
    - Video: NTSC, 1920x1080, 29.97 [fps], Progressive
    - Audio: AAC, 160 [kbps], 48 kHz, Stereo
    - Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
    - Encoding Time: 00:00:24
    2/4/2010 5:16:54 PM : Encoding Failed
    The Operation was interrupted by user
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_16.prproj
    - Output File: C:\Users\Ramius\Desktop\mxf.mpg
    - Preset Used: 1440 x 1080i 29.97 High Quality
    - Video: NTSC, 1440x1080, 29.97 drop frame [fps], Upper, Quality 4.0
    - Audio: 384 [kbps], 48 kHz, 16 bit, Stereo, MPEG
    - Bitrate: VBR, 1 Pass, Min 4.00, Target 15.00, Max 18.50 [Mbps]
    - Encoding Time: 00:05:08
    2/23/2010 12:12:40 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_18.prproj
    - Output File: M:\AVI\ihigh_avi\GAR\Marines\marinespromo_2009.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:04:00
    2/23/2010 12:26:54 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_19.prproj
    - Output File: M:\AVI\ihigh_avi\GAR\Marines\marinespromo_2009.avi
    - Preset Used: NTSC DV
    - Video: 720x480, 29.97 [fps], Lower, Quality 100
    - Audio: 48000 Hz, Stereo, 16 bit
    - Bitrate:
    - Encoding Time: 00:05:08
    2/23/2010 12:51:01 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_23.prproj
    - Output File: C:\Users\Ramius\Desktop\allhdtest2.mpg
    - Preset Used: 1440 x 1080i 29.97 High Quality
    - Video: NTSC, 1440x1080, 29.97 drop frame [fps], Upper, Quality 4.0
    - Audio: 384 [kbps], 48 kHz, 16 bit, Stereo, MPEG
    - Bitrate: VBR, 1 Pass, Min 4.00, Target 15.00, Max 18.50 [Mbps]
    - Encoding Time: 00:04:20
    2/23/2010 4:23:46 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_27.prproj
    - Output File: C:\Users\Ramius\Desktop\Sequence 07.mp4
    - Preset Used: HDTV 1080p 29.97 High Quality
    - Video: NTSC, 1920x1080, 29.97 [fps], Progressive
    - Audio: AAC, 160 [kbps], 48 kHz, Stereo
    - Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
    - Encoding Time: 00:09:11
    3/2/2010 3:21:19 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_28.prproj
    - Output File: C:\Users\Ramius\Desktop\Sequence 07_1.mp4
    - Preset Used: HDTV 1080p 29.97 High Quality
    - Video: NTSC, 1920x1080, 29.97 [fps], Progressive
    - Audio: AAC, 160 [kbps], 48 kHz, Stereo
    - Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
    - Encoding Time: 00:09:00
    3/2/2010 3:34:47 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    - Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_29.prproj
    - Output File: C:\Users\Ramius\Desktop\Sequence 07_2.mp4
    - Preset Used: HDTV 1080p 29.97 High Quality
    - Video: NTSC, 1920x1080, 29.97 [fps], Progressive
    - Audio: AAC, 160 [kbps], 48 kHz, Stereo
    - Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
    - Encoding Time: 00:10:22
    3/2/2010 4:41:03 PM : Encoding Failed
    Error compiling movie.
    Unknown error.
    We absolutely need to fix this issue ASAP, we are in a major bind until we can resolve this issue. Thanks a bunch.

    We are using Windows 7
    dual quadcore intel xeon processors 8gb ram
    10000rpm internal drives. quadroefx 1800 video card
    The drive is 4tb
    We have tried exporting to many different locations with no luck
    Its a very nice video editting system. We just need to figure out this exporter

  • Write xmp sidecar files without need to export masters - script

    I've written a script to write xmp sidecar files for referenced and online images (the 2 conditions in the script) of the selected images. I looked for a while at system events and other stuff to be able to write the xmp file, but i'm not a programmer, so in the end i chose the long and dirty way to do it.
    This script will export all iptc expanded fields as aperture does (creating basically the same file). It can be easily adjusted to include other tags, even custom ones. I don't know how to get at the adjustments for images, otherwise those could be included as well.
    If anyone has the energy to clean this up and make it faster, feel free to do so. Next, I'm going to try to write a script to do the opposite, import xmp sidecars for imported online and referenced files.
    Here it goes (thanks to Brett Gross for the database part to find the master filename):
    --script to create sidecar xmp files for referenced files without having to export masters. parts of the script (finding the file name) are by brett gross
    property p_sql : "/usr/bin/sqlite3 "
    global g_libPath
    on run
    my getLibPath()
    --counter for processed images, reset, just in case
    set mastercount to 0
    tell application "Aperture"
    if not (exists selection) then
    display dialog "You have to select at least one image" buttons {"OK"} default button 1
    return
    else
    display dialog "You have selected " & (count of selection) & " images." & return & "Continue?" default button 1
    end if
    set theSel to selection
    --run through the selected images
    repeat with currentpic from 1 to count of theSel
    tell item currentpic of theSel
    -- only apply to referenced and online images
    if referenced and online then
    set mastercount to mastercount + 1
    set curID to id
    --find the master file path and name - this part by brett gross, thanks
    set libPOSIX to POSIX path of g_libPath
    set libDBPOSIX to (libPOSIX & "/Aperture.aplib/Library.apdb") as string
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZFILEUUID from ZRKVERSION where ZUUID='" & curID & "'\""
    set ZFILEUUID to do shell script theScript
    # ---------- Get the master's path
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZIMAGEPATH from ZRKFILE where ZUUID='" & ZFILEUUID & "'\""
    set ZIMAGEPATH to do shell script theScript
    # ---------- Get the master's disk name
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZFILEVOLUMEUUID from ZRKFILE where ZUUID='" & ZFILEUUID & "'\""
    set ZFILEVOLUMEUUID to do shell script theScript
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZNAME from ZRKVOLUME where ZUUID='" & ZFILEVOLUMEUUID & "'\""
    set diskName to do shell script theScript
    set imgPath to (diskName & "/" & ZIMAGEPATH)
    --end brett gross part
    --strips extension, seems to work for files and paths with more than one period
    set oldlim to AppleScript's text item delimiters
    set AppleScript's text item delimiters to "."
    try --remove last extension only
    set contador to text item -1 of imgPath
    set noExtension to Unicode text 1 thru -((count of contador) + 2) of imgPath
    on error --handle files with no extensions
    set noExtension to imgPath
    end try
    set AppleScript's text item delimiters to oldlim
    --create the file and path name with the .xmp extension for writing
    set xmpPath to "/Volumes/" & noExtension & ".xmp" as Unicode text
    --convert posix path to alias for easier write and read handling
    set xmpPath to POSIX file xmpPath as file specification
    -- header for xmp file
    set xmpheader to ("<?xpacket begin='' id=''?>
    <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9-9, framework 1.6'>
    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>") & return
    -- footer for xmp file
    set xmpfooter to ("</rdf:RDF>
    </x:xmpmeta>
    <?xpacket end='w'?>") & return
    --xmp content, part 1
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Contact") or (exists IPTC tag "Country/PrimaryLocationCode") then
    set xmpcontentpartone to ("<rdf:Description rdf:about='' xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'>") & return
    try
    set CountryCode to value of IPTC tag "Country/PrimaryLocationCode"
    set xmpcontentpartone to xmpcontentpartone & tab & "<Iptc4xmpCore:CountryCode>" & CountryCode & "</Iptc4xmpCore:CountryCode>" & return
    end try
    try
    set CreatorContactInfo to value of IPTC tag "Contact"
    set xmpcontentpartone to xmpcontentpartone & tab & "<Iptc4xmpCore:CreatorContactInfo>" & CreatorContactInfo & "</Iptc4xmpCore:CreatorContactInfo>" & return
    end try
    set xmpcontentpartone to xmpcontentpartone & ("</rdf:Description>") & return
    else
    set xmpcontentpartone to ""
    end if
    --xmp content, part 2
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Category") or (exists IPTC tag "City") or (exists IPTC tag "Country/PrimaryLocationName") or (exists IPTC tag "Credit") or (exists IPTC tag "DateCreated") or (exists IPTC tag "Headline") or (exists IPTC tag "Province/State") or (exists IPTC tag "Source") or (exists IPTC tag "SpecialInstructions") or (exists IPTC tag "SupplementalCategory") or (exists IPTC tag "Writer/Editor") then
    set xmpcontentparttwo to ("<rdf:Description rdf:about='' xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'>") & return
    try
    set Category to value of IPTC tag "Category"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Category>" & Category & "</photoshop:Category>" & return
    end try
    try
    set City to value of IPTC tag "City"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:City>" & City & "</photoshop:City>" & return
    end try
    try
    set Country to value of IPTC tag "Country/PrimaryLocationName"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Country>" & Country & "</photoshop:Country>" & return
    end try
    try
    set Credit to value of IPTC tag "Credit"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Credit>" & Credit & "</photoshop:Credit>" & return
    end try
    try
    set DateCreated to value of IPTC tag "DateCreated"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:DateCreated>" & DateCreated & "</photoshop:DateCreated>" & return
    end try
    try
    set Headline to value of IPTC tag "Headline"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Headline>" & Headline & "</photoshop:Headline>" & return
    end try
    try
    set State to value of IPTC tag "Province/State"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:State>" & State & "</photoshop:State>" & return
    end try
    try
    set Source to value of IPTC tag "Source"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Source>" & Source & "</photoshop:Source>" & return
    end try
    try
    set Instructions to value of IPTC tag "SpecialInstructions"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Instructions>" & Instructions & "</photoshop:Instructions>" & return
    end try
    try
    set SupplementalCategory to value of IPTC tag "SupplementalCategory"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:SupplementalCategory>" & SupplementalCategory & "</photoshop:SupplementalCategory>" & return
    end try
    try
    set CaptionWriter to value of IPTC tag "Writer/Editor"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:CaptionWriter>" & CaptionWriter & "</photoshop:CaptionWriter>" & return
    end try
    set xmpcontentparttwo to xmpcontentparttwo & ("</rdf:Description>") & return
    else
    set xmpcontentparttwo to ""
    end if
    --xmp content, part 3
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Byline") or (exists IPTC tag "Caption/Abstract") or (exists IPTC tag "CopyrightNotice") or (exists IPTC tag "Keywords") or (exists IPTC tag "ObjectName") then
    set xmpcontentpartthree to ("<rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1/'>") & return
    try
    set creator to value of IPTC tag "Byline"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:creator><rdf:Seq><rdf:li>" & creator & "</rdf:li></rdf:Seq></dc:creator>" & return
    end try
    try
    set description to value of IPTC tag "Caption/Abstract"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:description><rdf:Alt><rdf:li xml:lang='x-default'>" & description & "</rdf:li></rdf:Alt></dc:description>" & return
    end try
    try
    set rights to value of IPTC tag "CopyrightNotice"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:rights><rdf:Alt><rdf:li xml:lang='x-default'>" & rights & "</rdf:li></rdf:Alt></dc:rights>" & return
    end try
    --keywords, slightly different, as they need to be written as a list and not as a string
    --i don't think it's a problem if we create an empty list if there are no keywords present.
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:subject><rdf:Bag>" & return
    --make list item for every keyword
    try
    repeat with n from 1 to count of keywords
    set cursubject to name of (keyword n)
    set xmpcontentpartthree to xmpcontentpartthree & tab & tab & "<rdf:li>" & cursubject & "</rdf:li>" & return
    end repeat
    end try
    set xmpcontentpartthree to xmpcontentpartthree & tab & "</rdf:Bag></dc:subject>" & return
    try
    set title to value of IPTC tag "ObjectName"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:title><rdf:Alt><rdf:li xml:lang='x-default'>" & title & "</rdf:li></rdf:Alt></dc:title>" & return
    end try
    set xmpcontentpartthree to xmpcontentpartthree & ("</rdf:Description>") & return
    else
    set xmpcontentpartthree to ""
    end if
    --part four. aperture doesn't seem to export anything there
    set xmpcontentpartfour to "<rdf:Description rdf:about='' xmlns:photomechanic='http://ns.camerabits.com/photomechanic/1.0/'>
    </rdf:Description>" & return
    --part five. rating
    set xmpcontentpartfive to "<rdf:Description rdf:about='' xmlns:xap='http://ns.adobe.com/xap/1.0/'>" & return
    try
    set Rating to main rating
    set xmpcontentpartfive to xmpcontentpartfive & tab & "<xap:Rating>" & Rating & "</xap:Rating>" & return
    end try
    set xmpcontentpartfive to xmpcontentpartfive & "</rdf:Description>" & return
    --join everything
    set xmptext to xmpheader & xmpcontentpartone & xmpcontentparttwo & xmpcontentpartthree & xmpcontentpartfour & xmpcontentpartfive & xmpfooter
    --write file
    my writexmpFile(xmptext, xmpPath)
    end if
    end tell
    end repeat
    display dialog "Processed " & mastercount & " referenced and online image(s)." buttons {"OK"} default button 1
    end tell
    end run
    -- write xmp sidecar file routine
    on writexmpFile(theContents, xmpFileName)
    --tell application "Finder"
    try
    open for access xmpFileName with write permission
    set eof of xmpFileName to 0
    write (theContents) to xmpFileName starting at eof
    close access xmpFileName
    on error
    try
    display dialog xmpFileName
    close access xmpFileName
    end try
    end try
    --end tell
    end writexmpFile
    --this part copied from Brett Gross-------------------------------------------------------------------------- --------------------------------
    on getLibPath()
    tell application "System Events" to set p_libPath to value of property list item "LibraryPath" of property list file ((path to preferences as Unicode text) & "com.apple.aperture.plist")
    if ((offset of "~" in p_libPath) is not 0) then
    -- set p_posix to POSIX file p_libPath
    set p_script to "/bin/echo $HOME"
    set p_homePath to (do shell script p_script)
    set p_offset to offset of "~" in p_libPath
    set p_path to text (p_offset + 1) thru -1 of p_libPath
    set g_libPath to p_homePath & p_path
    else
    set g_libPath to p_libPath
    end if
    end getLibPath
    --end brett gross part

    imigra wrote:
    I've written a script to write xmp sidecar files for referenced and online images (the 2 conditions in the script) of the selected images. I looked for a while at system events and other stuff to be able to write the xmp file, but i'm not a programmer, so in the end i chose the long and dirty way to do it.
    This script will export all iptc expanded fields as aperture does (creating basically the same file). It can be easily adjusted to include other tags, even custom ones.
    Excellent stuff!
    I don't know how to get at the adjustments for images, otherwise those could be included as well.
    They are stored as binary data in the Version XML files at the bottom level of the Library package. You can also have a look around in the ZRKIMAGEADJUSTMENT table, but again the actual settings for each adjustment are in binary form.
    If anyone has the energy to clean this up and make it faster, feel free to do so.
    As far as I can remember, Aperture uses the 'proper' IPTC tag names when accessing them via AppleScript, so you may be able to do a loop through all the IPTC tags for each image, rather than picking out each specific one. But that would need checking. The EXIFTools site is a good place to find out about the different ways that IPTC data can be described.
    Next, I'm going to try to write a script to do the opposite, import xmp sidecars for imported online and referenced files.
    Don't rush unless you feel like it - I've already started planning out a free (as in beer and speech) XMP importer with a GUI so that you can choose how to map the XMP CORE tags that don't exist in Aperture. You've given me an extra idea, though - if we can decide on a set of custom tags, my importer could map the XMP CORE tags to them and your exporter could export those tags.
    Thanks for the work!
    Ian
    P.S. I'll check through your script tomorrow, some of the database tables changed between 1.5.6 and 2.0, so you might need to add in a version check to be really thorough.

  • Easiest way to write XMP data or files into a PDF file

    Hi,
    I wrote a little Adobe Air application, which is intended to generate XMP files for being imported into PDF files. Now I'm searching for the most efficient solution to import these XMP files. I'd be happy if I could select a PDF file from my Adobe Air application and write the metadata into the file, but I didn't find any library to this. Another option is something like a hotfolder. I try to avoid to import these files one by one. Could someone please give me a hint?
    I'd be very glad!
    Thank you beforehand!
    Stefan

    Hi,
    Thanks for your suggestion.
    My experience is more in Postgresql, sql server and ms access. So I can handle sql command better than java.
    According to your suggestion, I come out following design.
    Design:
    1. Use SQL Developer to developer a copy stored procedure.
    - The store procedure will copy ONE row of main data and data in related data table.
    - use database link to access remote database.
    - handle transaction and return error message if got error.
    - update data if the data already copied into destination database.
    2. A java program perform following tasks:
    a. Use jdbc install the stored procedure in #1 into database by "CREATE OR REPLACE FUNCTION ..."
    b. load copy data list from a file.
    c. a loop to call installed stored procedure. Pass one main row per time into stored procedure.
    d. print each main row copy result to stdout in the loop and stop if error happened.
    So, I just need to pass the java program to operator.
    Please tell me if you have any better idea or easier way to implement. Maybe, another possible solution is use shell script to execute sql command in sqlplus. :)
    Thanks,
    Regards,
    Hing Cheow Yong

  • Where is saved the Preference for "Write XMP IDs to Files on Import"?

    Hello,
    In a Jsx, I test if the "CreateLayerMarkersFromFootageXMP" is activated in the AE preferences with:
    app.preferences.getPrefAsBool( "Metadata", "CreateLayerMarkersFromFootageXMP" );
    But I cannot do the same for this one:
    "Write XMP IDs to Files on Import", which is also in the Preference Panel, but not saved in the Preference files I think.
    Or if it's saved in, where? And how can I check it in ExtendedScript?
    Thanks.

    It appears that the Metadata section only carries that one pref it seems.
    ["Metadata"]
              "CreateLayerMarkersFromFootageXMP" = 01
    The only other XMP prefs I've found in the AE CC files are:
    "Adobe After Effects 12.1 Prefs.txt"
    ["Metadata"]
              "Strip project XMP history from rendered output" = 00
              "Strip project XMP history from saved projects" = 00
    ["XMP Writing"]
              "Maximum retries" = "5"
              "Seconds between retries" = "1.000000"
    "Adobe After Effects 12.1 Prefs-indep-general.txt"
    ["Metadata"]
              "CreateLayerMarkersFromFootageXMP" = 01

  • File Write Keyword Tag don't create a xmp file

    Hi,
    I use PSE 8 with WIN7 64 Ultimate.
    When I used the  File > Write Keyword Tag command, no xmp file is created. I saw, that the filename was renamed to xxx_edTMP-1.NEF for a short time and than the original name is show. The changedate of the file is not changed Sometimes the file is not renamed the new name is xxxx_edTMP-1.NEF.
    Why?
    Nils

    I assume that you are trying to write tags assigned to a Raw original.
    There is a bug that sometimes PSE does not write tags (or other metadata) to .xmp for Raw files. This usually depends on the type of file; this command never seems to work for .NEF files.
    A workaround is to use John R Ellis's psedbtool

  • Premiere Pro CC v7.0 - MP3s corrupted during import with "Write XMP ID to Files on Import"

    Premiere Pro CC v7.0 - original MP3s corrupted during import with default "Write XMP ID to Files on Import" option
    I have just started using a Trial version of Premiere.
    I have a folder full of corrupted MP3 files after attempting to import them into Premiere.
    After searching these forums I found that some other people have had corruption issues during import of media and it was related to the Preferences->Media->"Write XMP ID to Files on Import" option.
    I attempted to import additional MP3s (this time making backups first) with and without the Write XMP ID option, and have found that this is where the issue is.
    While the MP3 files still fail to be imported, the files are not corrupted in the process when the Write XMP ID option is unchecked.
    Writing to files that are being imported seems to me like unexpected behaviour for any software.
    Adobe please advise!
    Is there any way to recover my original MP3 collection?

    What exactly is wrong with them?

  • "Automatically Write Changes into XMP" Not Saving XMP Files

    I tried finding some other discussions on this but I couldn't seem to find anything...
    I recently checked the "Automatically Write Changes into XMP" setting in my "Catalog Settings". However, as I continue to add pictures to my library and make changes, I do *not* see the XMP files being written to the location of the pictures (Nikon NEF files located on my hard-drive). In fact, I can't find the XMP files anywhere. If I want to output the XMP files I have to do a Ctrl + S (Photo --> Save Metadata to File).
    I did notice that when I unchecked the setting and re-checked it, *some* of the XMP files showed up. However, in my import of 24 photos, only 14 had XMP files. I had to manually "Save Metadata to File" to get the XMP sidecar files to show.
    Am I doing something wrong? Is something not working right? I'm a bit confused. I assumed it would automatically export the sidecar files.
    How often should it be outputting XMP sidecards? If I import a new image should the XMP sidecar file be created? Or is it created the first time I change an original picture?
    I am using Adobe Lightroom 2.0 (Camera Raw 4.5) on a Mac OS X 10.5.5.
    Thanks,
    -Leftquark

    @Eric: hitting cntrl+s works but can be tedeous on large galleries. I've been doing this but it can be a pain.
    @Jeannine: different topic than this thread but to answer anyways... Lightroom automatically saves all changes into your catalogue. You never need to dave your changes (here's the kicker though) as long as you do not move the original file. If you
    move the file than lightroom won't know that it's the same image as the one you've edited. Once you are done editing your image you will need to "export" the image to a new file (you don't wan to overwrite the original). If you don't export than only lightroom will have your edits. Lightroom is "non-destructive" Which means that it doesn't touch your original photo. Lightroom keeps a text file containing the instructions on what you did to make the edited version. Since your changes are just text inatryxtions you have to "export" the image to get your final image in a version you can put online, print, etc. But to answer your original question, I think you prob moves the original image. If not, could you give us more info?

  • Write xmp data to video file

    I would like to somehow write some xmp data (timecode, camera, shutter speed, aperature) to my video files in an automated fashion without using Adobe Bridge. I want to do this so Adobe Premiere and Adobe Bridge can be able to read this data directly from my media files. This seems like a simply thing to want to do but it's proven very difficult. I have not found any commandline utilities that can write xmp data to a video file (exiftool doesn't support it). I have also found that Premiere in most of the time doesn't like to read sidecar xmp files which I can produce easily.
    Any ideas?

    Unfortunately I'm on windows. What I was looking for is adding timecode xmp start code to *.mov files from Canon 7d or 5d so I have timecode to use throughout Premiere which would make my editing much easier as we shoot approximately 100 video clips in the wedding ceremony and need to edit that in multicam w/ 2 other cameras running the entire time.
    I did some more research and was able to add this metadata using xmp to the MOV files however unfortunately premiere completely ignores this data. Seems like premiere only accepts using timecode data for DV or MXF files and no others (tested CS5 and CS5.5). What a shame! It seems like this should be much easier thing to do. I know it's pretty easy using FCP and if Adobe is really trying to lure away FCP users, they should get something this basic running smoothly.

  • Will LR write to a XMP file if...

    ... I set the JPEG, TIFF, PSD or DNG file to read only in Windows?
    I ask because I'm not sure I want to embed this info into the file because of my backup schema. The XMP file is very small compared to the full file.
    Sverre

    Even without shutting of XMP writing, as Lee Jay says he will do, yuo only need to backup the Library dB file, because all the info is stored their, always. The XMP write is for portability to other Adobe apps and those others that can read them properly.
    We have been told by the Adobe team back-up the dB and of course you should have a set of image copy originals backed upas a matter of course, regardless of what app you use.
    Don

Maybe you are looking for