EDITAR #2
@CJK y @mockman
así que usando vuestras ideas he creado este larguísimo script que hace el truco para el primer valor de offset en el xml y el primer valor de marcador mostrado en el xml
Ahora el objetivo sería ver cómo ejecutar o hacer un bucle con estos manejadores para obtener el valor de inicio de cada Marcador y reemplazarlo con el valor de desplazamiento de cada asset-clip.
Por ejemplo:
<spine>
<asset-clip ref="r2" offset="0s" name="against-gravity_by_evgeny-bardyuzha_Artlist" start="86400s" duration="3866100/352800s" audioRole="dialogue">
<asset-clip ref="r3" lane="1" offset="6489053/3200s" name="Pexels Videos 1730395" duration="2s" format="r4" tcFormat="NDF" audioRole="dialogue">
<conform-rate srcFrameRate="25"/>
</asset-clip>
<asset-clip ref="r5" lane="1" offset="1036856/12s" name="production ID_4882341" start="554/25s" duration="661500/352800s" format="r6" tcFormat="NDF">
<conform-rate srcFrameRate="25"/>
</asset-clip>
<marker start="276489053/3200s" duration="1/48000s" value="Marker 1"/>
<marker start="6912372957/80000s" duration="1/48000s" value="Marker 2"/>
<marker start="31106358853/360000s" duration="1/48000s" value="Marker 3"/>
<marker start="10369005107/120000s" duration="1/48000s" value="Marker 4"/>
<marker start="1244307173/14400s" duration="1/48000s" value="Marker 5"/>
</asset-clip>
</spine>
DESPUÉS DE EJECUTAR script los Resultados deseados a continuación>>> Observe que los valores de desplazamiento coinciden con los valores de los marcadores
<spine>
<asset-clip ref="r2" offset="276489053/3200s" name="against-gravity_by_evgeny-bardyuzha_Artlist" start="86400s" duration="3866100/352800s" audioRole="dialogue">
<asset-clip ref="r3" lane="1" offset="6912372957/80000s" name="Pexels Videos 1730395" duration="2s" format="r4" tcFormat="NDF" audioRole="dialogue">
<conform-rate srcFrameRate="25"/>
</asset-clip>
<asset-clip ref="r5" lane="1" offset="31106358853/360000s" name="production ID_4882341" start="554/25s" duration="661500/352800s" format="r6" tcFormat="NDF">
<conform-rate srcFrameRate="25"/>
</asset-clip>
<marker start="276489053/3200s" duration="1/48000s" value="Marker 1"/>
<marker start="6912372957/80000s" duration="1/48000s" value="Marker 2"/>
<marker start="31106358853/360000s" duration="1/48000s" value="Marker 3"/>
{Hoping the Script ignores this line because no other </asset-clip> exists to change}
<marker start="10369005107/120000s" duration="1/48000s" value="Marker 4"/ >
{Hoping the Script ignores this line because no other </asset-clip> exists to change}
<marker start="1244307173/14400s" duration="1/48000s" value="Marker 5"/>
</asset-clip>
</spine>
Aquí está todo el fcpxml en su formato completo:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.9">
<resources>
<format id="r1" name="FFVideoFormat1080p24" frameDuration="100/2400s" width="1920" height="1080" colorSpace="1-1-1 (Rec. 709)"/>
<asset id="r2" name="against-gravity_by_evgeny-bardyuzha_Artlist" uid="B1689FB76C9E4A9AF0298680A873E1D2" start="86400s" duration="6297088/44100s" hasAudio="1" audioSources="1" audioChannels="2" audioRate="44100">
<media-rep kind="original-media" sig="B1689FB76C9E4A9AF0298680A873E1D2" src="file:///Users/davesmacpro/Music/Music%20for%20Projects/against-gravity_by_evgeny-bardyuzha_Artlist.wav">
<bookmark>Ym9vaxQDAAAAAAQQMAAAAHi61zvH+Xt9eDtxi789DbINi+KCtO1mu9FKykYF+ptlEAIAAAQAAAADAwAAABgAKAUAAAABAQAAVXNlcnMAAAALAAAAAQEAAGRhdmVzbWFjcHJvAAUAAAABAQAATXVzaWMAAAASAAAAAQEAAE11c2ljIGZvciBQcm9qZWN0cwAALwAAAAEBAABhZ2FpbnN0LWdyYXZpdHlfYnlfZXZnZW55LWJhcmR5dXpoYV9BcnRsaXN0LndhdgAUAAAAAQYAABAAAAAgAAAANAAAAEQAAABgAAAACAAAAAQDAABPUwAAAAAAAAgAAAAEAwAAT0AHAAAAAAAIAAAABAMAAEm4BwAAAAAACAAAAAQDAAAPyQcAAAAAAAgAAAAEAwAAN8kHAAAAAAAUAAAAAQYAALQAAADEAAAA1AAAAOQAAAD0AAAACAAAAAAEAABBwaczlkwtyRgAAAABAgAAAQAAAAAAAAAPAAAAAAAAAAAAAAAAAAAACAAAAAQDAAADAAAAAAAAAAQAAAADAwAA9QEAAAgAAAABCQAAZmlsZTovLy8MAAAAAQEAAE1hY2ludG9zaCBIRAgAAAAEAwAAABDQ2e0BAAAIAAAAAAQAAEHEhebagAAAJAAAAAEBAAAxQTAwQjhEMi0zNjIwLTQxQTEtODA0OC02NzBCQUI1ODRFM0MYAAAAAQIAAIEAAAABAAAA7xMAAAEAAAAAAAAAAAAAAAEAAAABAQAALwAAAAAAAAABBQAAzAAAAP7///8BAAAAAAAAABAAAAAEEAAAmAAAAAAAAAAFEAAABAEAAAAAAAAQEAAAMAEAAAAAAABAEAAAIAEAAAAAAAACIAAA/AEAAAAAAAAFIAAAbAEAAAAAAAAQIAAAfAEAAAAAAAARIAAAsAEAAAAAAAASIAAAkAEAAAAAAAATIAAAoAEAAAAAAAAgIAAA3AEAAAAAAAAwIAAACAIAAAAAAAABwAAAUAEAAAAAAAARwAAAIAAAAAAAAAASwAAAYAEAAAAAAAAQ0AAABAAAAAAAAAA=</bookmark>
</media-rep>
<metadata>
<md key="com.apple.proapps.mio.ingestDate" value="2022-12-12 02:32:50 -1000"/>
</metadata>
</asset>
<asset id="r3" name="Pexels Videos 1730395" uid="9E54D5C8D17577E244F9F7835F3A278F" start="0s" duration="36144/600s" hasVideo="1" format="r4" hasAudio="1" videoSources="1" audioSources="1" audioChannels="2" audioRate="48000">
<media-rep kind="original-media" sig="9E54D5C8D17577E244F9F7835F3A278F" src="file:///Users/davesmacpro/Movies/Pexels%20Videos%201730395.mp4">
<bookmark>Ym9va8wCAAAAAAQQMAAAAHLUxWFmj8UGU72GTMAnlCWB/KtAonN8I+RDCiLsmrssyAEAAAQAAAADAwAAABgAKAUAAAABAQAAVXNlcnMAAAALAAAAAQEAAGRhdmVzbWFjcHJvAAYAAAABAQAATW92aWVzAAAZAAAAAQEAAFBleGVscyBWaWRlb3MgMTczMDM5NS5tcDQAAAAQAAAAAQYAABAAAAAgAAAANAAAAEQAAAAIAAAABAMAAE9TAAAAAAAACAAAAAQDAABPQAcAAAAAAAgAAAAEAwAAxRp+AAAAAAAIAAAABAMAADzrPQAAAAAAEAAAAAEGAACAAAAAkAAAAKAAAACwAAAACAAAAAAEAABBwpXm0YAAABgAAAABAgAAAQAAAAAAAAAPAAAAAAAAAAAAAAAAAAAACAAAAAQDAAACAAAAAAAAAAQAAAADAwAA9QEAAAgAAAABCQAAZmlsZTovLy8MAAAAAQEAAE1hY2ludG9zaCBIRAgAAAAEAwAAABDQ2e0BAAAIAAAAAAQAAEHEhebagAAAJAAAAAEBAAAxQTAwQjhEMi0zNjIwLTQxQTEtODA0OC02NzBCQUI1ODRFM0MYAAAAAQIAAIEAAAABAAAA7xMAAAEAAAAAAAAAAAAAAAEAAAABAQAALwAAAAAAAAABBQAAzAAAAP7///8BAAAAAAAAABAAAAAEEAAAaAAAAAAAAAAFEAAAwAAAAAAAAAAQEAAA6AAAAAAAAABAEAAA2AAAAAAAAAACIAAAtAEAAAAAAAAFIAAAJAEAAAAAAAAQIAAANAEAAAAAAAARIAAAaAEAAAAAAAASIAAASAEAAAAAAAATIAAAWAEAAAAAAAAgIAAAlAEAAAAAAAAwIAAAwAEAAAAAAAABwAAACAEAAAAAAAARwAAAIAAAAAAAAAASwAAAGAEAAAAAAAAQ0AAABAAAAAAAAAA=</bookmark>
</media-rep>
<metadata>
<md key="com.apple.proapps.studio.rawToLogConversion" value="0"/>
<md key="com.apple.proapps.spotlight.kMDItemProfileName" value="HD (1-1-1)"/>
<md key="com.apple.proapps.studio.cameraISO" value="0"/>
<md key="com.apple.proapps.studio.cameraColorTemperature" value="0"/>
<md key="com.apple.proapps.spotlight.kMDItemCodecs">
<array>
<string>AVC Coding</string>
<string>MPEG-4 AAC</string>
</array>
</md>
<md key="com.apple.proapps.mio.ingestDate" value="2022-12-09 10:31:28 -1000"/>
</metadata>
</asset>
<format id="r4" name="FFVideoFormat3840x2160p25" frameDuration="100/2500s" width="3840" height="2160" colorSpace="1-1-1 (Rec. 709)"/>
<asset id="r5" name="production ID_4882341" uid="6F199E9ADD1C3E1C25A01431E12EF3E3" start="0s" duration="1943/25s" hasVideo="1" format="r6" videoSources="1">
<media-rep kind="original-media" sig="6F199E9ADD1C3E1C25A01431E12EF3E3" src="file:///Users/davesmacpro/Movies/production%20ID_4882341.mp4">
<bookmark>Ym9va8wCAAAAAAQQMAAAAELPIBuUH6inb74/CLc27nr2yrwiIVd8Ni9hDXz1lgueyAEAAAQAAAADAwAAABgAKAUAAAABAQAAVXNlcnMAAAALAAAAAQEAAGRhdmVzbWFjcHJvAAYAAAABAQAATW92aWVzAAAZAAAAAQEAAHByb2R1Y3Rpb24gSURfNDg4MjM0MS5tcDQAAAAQAAAAAQYAABAAAAAgAAAANAAAAEQAAAAIAAAABAMAAE9TAAAAAAAACAAAAAQDAABPQAcAAAAAAAgAAAAEAwAAxRp+AAAAAAAIAAAABAMAAFvrPQAAAAAAEAAAAAEGAACAAAAAkAAAAKAAAACwAAAACAAAAAAEAABBwpXn7AAAABgAAAABAgAAAQAAAAAAAAAPAAAAAAAAAAAAAAAAAAAACAAAAAQDAAACAAAAAAAAAAQAAAADAwAA9QEAAAgAAAABCQAAZmlsZTovLy8MAAAAAQEAAE1hY2ludG9zaCBIRAgAAAAEAwAAABDQ2e0BAAAIAAAAAAQAAEHEhebagAAAJAAAAAEBAAAxQTAwQjhEMi0zNjIwLTQxQTEtODA0OC02NzBCQUI1ODRFM0MYAAAAAQIAAIEAAAABAAAA7xMAAAEAAAAAAAAAAAAAAAEAAAABAQAALwAAAAAAAAABBQAAzAAAAP7///8BAAAAAAAAABAAAAAEEAAAaAAAAAAAAAAFEAAAwAAAAAAAAAAQEAAA6AAAAAAAAABAEAAA2AAAAAAAAAACIAAAtAEAAAAAAAAFIAAAJAEAAAAAAAAQIAAANAEAAAAAAAARIAAAaAEAAAAAAAASIAAASAEAAAAAAAATIAAAWAEAAAAAAAAgIAAAlAEAAAAAAAAwIAAAwAEAAAAAAAABwAAACAEAAAAAAAARwAAAIAAAAAAAAAASwAAAGAEAAAAAAAAQ0AAABAAAAAAAAAA=</bookmark>
</media-rep>
<metadata>
<md key="com.apple.proapps.studio.rawToLogConversion" value="0"/>
<md key="com.apple.proapps.spotlight.kMDItemProfileName" value="HD (1-1-1)"/>
<md key="com.apple.proapps.studio.cameraISO" value="0"/>
<md key="com.apple.proapps.studio.cameraColorTemperature" value="0"/>
<md key="com.apple.proapps.spotlight.kMDItemCodecs">
<array>
<string>AVC Coding</string>
</array>
</md>
<md key="com.apple.proapps.mio.ingestDate" value="2022-12-09 10:31:28 -1000"/>
</metadata>
</asset>
<format id="r6" name="FFVideoFormat4096x2160p25" frameDuration="100/2500s" width="4096" height="2160" colorSpace="1-1-1 (Rec. 709)"/>
</resources>
<library location="file:///Users/davesmacpro/Desktop/XML%20tests/Test%20project%20for%20xml.fcpbundle/">
<event name="12-9-22" uid="A11C4F20-CFCC-4D32-9B9C-AABF1829B666">
<project name="24 p test rewrite file" uid="717DAFEC-AB91-403C-A451-9E4CC8EC35E8" modDate="2022-12-16 18:04:54 -1000">
<sequence format="r1" duration="26300/2400s" tcStart="0s" tcFormat="NDF" audioLayout="stereo" audioRate="48k">
<spine>
<asset-clip ref="r2" offset="0s" name="against-gravity_by_evgeny-bardyuzha_Artlist" start="86400s" duration="3866100/352800s" audioRole="dialogue">
<asset-clip ref="r3" lane="1" offset="3800/3200s" name="Pexels Videos 1730395" duration="2s" format="r4" tcFormat="NDF" audioRole="dialogue">
<conform-rate srcFrameRate="25"/>
</asset-clip>
<asset-clip ref="r5" lane="1" offset="1036856/12s" name="production ID_4882341" start="554/25s" duration="661500/352800s" format="r6" tcFormat="NDF">
<conform-rate srcFrameRate="25"/>
</asset-clip>
<marker start="276489053/3200s" duration="1/48000s" value="Marker 1"/>
<marker start="6912372957/80000s" duration="1/48000s" value="Marker 2"/>
<marker start="31106358853/360000s" duration="1/48000s" value="Marker 3"/>
<marker start="10369005107/120000s" duration="1/48000s" value="Marker 4"/>
<marker start="1244307173/14400s" duration="1/48000s" value="Marker 5"/>
</asset-clip>
</spine>
</sequence>
</project>
</event>
<smart-collection name="Projects" match="all">
<match-clip rule="is" type="project"/>
</smart-collection>
<smart-collection name="All Video" match="any">
<match-media rule="is" type="videoOnly"/>
<match-media rule="is" type="videoWithAudio"/>
</smart-collection>
<smart-collection name="Audio Only" match="all">
<match-media rule="is" type="audioOnly"/>
</smart-collection>
<smart-collection name="Stills" match="all">
<match-media rule="is" type="stills"/>
</smart-collection>
<smart-collection name="Favorites" match="all">
<match-ratings value="favorites"/>
</smart-collection>
</library>
</fcpxml>
Sólo hay que centrarse en los cambios:
columna vertebral "sección de datos a manipular" columna vertebral zona