fbpx
3 Post Moderation Rule for New Boarders (25 Jan 2021)

New boarders will have their posts moderated - Don't worry if you cannot see your post immediately.

FCPX BATCH TITLE REPLACEMENT

More
20 Dec 2022 13:23 - 28 Dec 2022 21:01 #123366 by Charles C.
I wanted to share a method to make batch replacements of Titles (and probably Generators) inside an FCP project. It's free, requires no plugin or add-on, and relies only on the manual modification of an .fcpxml

I figured this method while trying to add custom subtitles to a project. I used Simon Says to transcribe a long interview, and my goal was to import the generated subtitles as Titles into my FCP project, so I could use a custom Title designed in Motion to meet my client requirements. The problem was that at the moment of export, I didn’t find any option in Simon Says to select a specific Title “effect” in my library.
(I mention “effect” to refer to Titles created in Motion, to avoid using “style” which is a kind preset that can be changed inside FCP. “style” is pretty useful but can only affect some basic features of the text, and in my specific situation it was insufficient, as my subtitles integrated some custom shapes).

So coming out of Simon Says, I had a .fcpxml that I dragged into my Event and that created a new project that featured my video + audio tracks, as well as multiple new Titles, each containing one line of subtitle. The Titles “effect” used on the subtitles seem to be some kind of standard one.

Below is the method I used to replace those Titles “effect” with new ones, while keeping the text content in place :

1. GENERATING THE .FCPXML
You will first need to export a .fcpxml of the project containing the Titles (subtitles in my case) that you are trying to modify. Let’s call this project : Project A.

  • a) If you are coming out of Simon Says, you can drag the “Titles” icon onto your desktop, and if you’re in FCP, just export the .fcpxml of your project from here.
  • b) Now, I found that the easiest way is to create a second .fcpxml that contains the Title “effect” that you want to integrate into Project A. So in FCP, create a new project and drag your desired Title “effect” inside it. This will be Project B. Then, export an .fcpxml
  • c) Open both .fcpxml with TextEdit and place them next to each other. (To access the .fcpxml right-click on the generated file and choose “Show folder content” to access the editable text document.)
2. SEARCH AND REPLACE THE EFFECT
  • a) You will now need to identify the effect identification in Project A. On my computer it is :
Code:
<effect id="r3" name="Titre standard" uid=".../Titles.localized/Bumper:Opener.localized/Basic Title.localized/Basic Title.moti"/>
Code:
  • That line tells us that the Title effect is identified as “r3” in this document, and that its “name” is “Titre Standard” (my computer’s default language is French). Then it indicates it’s “uid”, which is its path inside my computer.
  • You are looking to replace this line with its equivalent that you will find in Project B.
  • b) Find and copy the same line found in Project B. I find this line :
Code:
<effect id="r3" name="NEOS - SUBTITLES V1" uid="~/Titles.localized/Perso/NEOS/NEOS - SUBTITLES V1/NEOS - SUBTITLES V1.moti" src="file:///Users/username/Movies/Motion%20Templates.localized/Titles.localized/Perso/NEOS/NEOS%20-%20SUBTITLES%20V1/NEOS%20-%20SUBTITLES%20V1.moti"/>
  • Although the line is much longer, the structure is exactly the same. “NEOS - SUBTITLES V1” is the name of the Title I created in motion, and is indeed the one I want to apply to every Title in my project.
  • Copy this line you just identified.
  • (If for whatever reason the “effect id” wasn’t the same as in Project A, no problem, just copy everything but the “effect id” part. The important part is not to change the effect id of Project A, or it will mess things up.)
  • c) Paste the line of Project B onto the line of Project A, so it replaces it.
  • d) Here you can either jump to Section 5 and finish the work inside FCP, or continue with sections 3 and 4 if you don’t mind tweaking the .fcpxml a little bit more. The result is the same in the end, I personally prefer to complete the whole thing by manipulating the .fcpxml…
  • If you decide to jump to section 5, you can now save and close both .fcpxml

3. SEARCH AND REPLACE TITLE POSITION

The second thing you need to replace, is the position of the text inside the Titles. Unlike section 2 of this tutorial, which requires you to copy/paste one unique line, you will need to replace this new line in every Title mentioned in the .fcpxml. Doing it manually would kill the purpose of this tutorial, so we will do that fast and easy with the “Search and Replace” function of TextEdit.
  • a) In Project A, just under the line you pasted earlier in Section 2, you will find a line starting with “<param name=“. Copy this line. For me it is :
Code:
<param name="Position" key="9999/999166631/999166633/1/100/101" value="0 -420.272"/> <param name="Aplatir" key="9999/999166631/999166633/2/351" value="1"/> <param name="Alignement" key="9999/999166631/999166633/2/354/999169573/401" value="1 (Au centre)"/>
  • b) In your menu bar click on : Edit / Search / Search & Replace. In the first text box (labeled Search, with a magnifying glass), paste the line you just copied. That will show every occurence of this line that is present in this .fcpxml
  • c) Now go to Project B, and find and copy the equivalent line that starts with “<param name=“. For me it is :
Code:
<param name="Position" key="9999/10047/11445/1/100/101" value="0 -915.598"/> <param name="Alignement" key="9999/10047/11445/2/354/11446/401" value="1 (Au centre)"/>
  • d) Going back to Project A, in the second text box (labeled replace), paste the line from Project B.
  • e) Click “All” on the right, which will replace all of the lines in Project A by the one of Project B.

4. SEARCH AND REPLACE TITLE STYLE

Exactly the same process as in the previous section, but with another line that describes the style of the Titles.
  • a) In Project A, under the line you pasted previously, you will find a line starting with “<text-style font=”. Copy this line. For me it is :
Code:
<text-style font="Helvetica" fontSize="63" fontFace="Regular" fontColor="0.574149 0.574162 0.574155 1" alignment="center"/> </text-style-def>
  • b) In your menu bar click on : Edit / Search / Search & Replace. In the first text box (labeled Search, with a magnifying glass), paste the line you just copied.
  • c) Now go to Project B, and find and copy the equivalent line that starts with “<text-style font=”. For me it is :
Code:
<text-style font=“Futura Light" fontSize="126" fontFace="Light" fontColor="1 1 1 1" alignment="center"/> </text-style-def>
  • d) Going back to Project A, in the second text box (labeled replace), paste the line from Project B.
  • e) Click “All” on the right, which will replace all of the lines in Project A by the one of Project B.
  • f) You can now save and close both .fcpxml

5. GOING BACK TO FCP

  • a) Import the .fcpxml of Project A into your FCP event. You can choose to replace or not the project that has the same name. I chose not too, just to be sure.
  • b) If everything went well, your project should now display the new Titles exactly as intended.
  • c) If you jumped here directly from section 2, then you will need to apply the right Title “style” to the Titles of your project. Basically you need to go to the Title of Project B, save its style as a new Preset, then go back to the freshly imported Project A (the one you modified in this guide), and in its timeline select all the relevant Titles and apply this preset to them.
DISCLAIMER
If you don’t have many Titles in your project, you can just drag and drop the new Title “effect” from the library directly on a Title in the timeline, and click “Replace from start”. But if you have hundreds of subtitles, the method described here might be better suited.
I have not tested this method with Generators, but I suppose it should also work. I don’t see why not. Please note that in my exemple, there was only one style of Title per project. I don’t exactly know what will be displayed in an .fcpxml with many different Titles “effect”, but I believe that if you stick to this guide, it should work fine, as the “Search and Replace” method will be looking for the exact text you have copied, avoiding other irrelevant Titles. The trick is to identify the Title correctly in the .fcpxml

Please feel free to add or correct anything in this thread. I have little to no knowledge in coding and I feel this method could be greatly improved.
Last edit: 28 Dec 2022 21:01 by Charles C.. Reason: Reformatting for better readability

Please Log in to join the conversation.