Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Apple Final Cut Pro Legacy HVX200 P2 – change timecode metadata after shooting?

  • HVX200 P2 – change timecode metadata after shooting?

  • Jeremy Allen

    April 25, 2011 at 10:36 pm

    ** Short story:
    I need to subtract 04:15:12:17 from the “Start Timecode” tag in every XML file for every clip on a card. Is there any way to Automate this process?

    ** Long Story:
    I’m editing a Behind-the-scenes piece that was shot over 2 days with 2 cameras. A lot of the footage is B-roll shots, some is interviews and the rest is following whatever action happened. Sometimes the action was covered by both cameras, and this is where my question lies..

    There was no slate used during shooting, and the shooters did not sync their timecodes. Normally I sort the footage in Log & Transfer by Media Start so any double covered footage will line-up pretty close to each other. That way I can log the A cam shot and then quickly log the B cam shot with the same name. The way it is now, I log the A cam shot and then have to search for the corresponding B cam shot, if there is one. I wasn’t on the shoot, so I don’t know what was double covered and what wasn’t.

    So with all that said, is there any way I could go in to the Metadata of the XML files and batch edit the timecodes to match? For instance, let’s say I find a shot on the A cam and the timecode is 16:16:34;01. Then I find the same moment on the B cam at 20:31:46:18. So if I could subtract 04:15:12:17 from the B cam’s timecode for every shot on the entire card, then in theory that would sync the 2 cameras for that card. I should also be able to follow that logic with the starting timecode for the next card and so on until I had both cameras synced for the entire shoot, barring any timecode drift issues.

    Now this all sounds good in theory, but the ultimate question: Is it possible? I know that I can go into the “Clip” folder, open the XML for the clip and change the “Start Timecode” to whatever I want. I can confirm the change by opening the clip in L&T and checking the Media Start Column. What I can’t figure out is how to automate this process across all the B cam shots on all the B cam cards.

    Also, if this isn’t possible, can you lend any advice on logging multi-cam footage that wasn’t properly slated or synced during shooting?

    ———————————————
    8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

    C4D 11.5
    AE CS5 (10.0.2.4)
    FCP 7.0.3
    QT 7.6.4

  • Steve Eisen

    April 26, 2011 at 3:39 am

    Make your life easier, try PluralEyes.
    https://www.singularsoftware.com/products.html

    Steve Eisen
    Eisen Video Productions
    Vice President
    Chicago Final Cut Pro Users Group

  • Andreas Kiel

    April 26, 2011 at 12:19 pm

    Yes if you got common sound PluralEyes probably is the best way to go.

    Otherwise you may use my free sequenceLiner to lay down each camera’s clips in a sequence by their timecode (hopefully you’ve used TOD).
    Once you have found two clips with a reference you can move all clips of a track by typing +/- and enter the amount of the frame offset. From there you can go to make either a huge multiclip by exporting each track as ref movie or go step by step to create single clip multiclips. You may use the Modify Timecode menu then to add add an AUX1 TC to each clip. Copy the TC from the sequence at the current time, select the clip and add/paste this TC to the current frame in AUX1. This will give you a save way of handling – but it’s time consuming.

    One last thing for the understanding of P2: the XMLs on the card allow to read metadata easily, even to add or to change things for some entries. But changing timecode or format or anything which is written directly into the video or audio movie/clip will be ignored, it might even lead to a disaster. So as long as you don’t know exactly what might be caused by changes, better don’t touch the XMLs.

    Andreas

    Spherico
    https://www.spherico.com/filmtools

  • Jeremy Allen

    April 26, 2011 at 3:25 pm

    Thanks for your time Steve and Andreas. I should have mentioned that I know about Plural Eyes, but that would only help after the logging process. I’m looking for a way to make the logging process more efficient, as well as the organization of logged clips and the editing process afterward. Over the years, I’ve developed a workflow that relies heavily on synced timecode for multi-cam shoots. So now that I have 2 cams that aren’t synced, it’s giving my head a fit!

    Andreas, as far as changing the timecode in the XML, I can confirm that it is not ignored inside FCP. Try it yourself. Make a copy of an XML file in the Clip folder. Change the “Start Timecode” value on the original XML file and then open Log and Transfer and find the clip you just modified. When I do this, I see the new timecode that I entered. Even after ingesting, I still see the timecode I entered. You can even see the new timecode if you view the clip in QT and select the appropriate timecode option in the timecode counter area. Also, I don’t *think* the timecode is written directly to the video clip. If you open the MXF file in QT, there is no timecode track. In my understanding, FCP reads the XML file and applies those attributes to the clip when you view it in L&T. The attributes only seem to be merged with the clip after ingesting.

    Now I am not saying that I am an expert on the XML side of things, and changing the timecode could indeed be causing problems that I don’t know about. But on initial inspection it only seems to be doing exactly what I want it to do. I should also mention that I have backups of all my media, so I don’t mind experimenting with this stuff if it helps my efficiency in the end, and possibly helps others in a similar situation down the road.

    So does anyone else have any experience or advice regarding how to batch edit the timecode in the XML metadata?

    ———————————————
    8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

    C4D 11.5
    AE CS5 (10.0.2.4)
    FCP 7.0.3
    QT 7.6.4

  • Steve Eisen

    April 26, 2011 at 4:41 pm

    I’d say you are on your own.

    Steve Eisen
    Eisen Video Productions
    Vice President
    Chicago Final Cut Pro Users Group

  • Andreas Kiel

    April 26, 2011 at 4:45 pm

    Jeremy,

    This is a funny constellation. I do know a lot about P2 and XML, but I never use L&T as I work with the native files. The native files do contain an embedded TC which is interleaved with the video. Mostly that is fine, but sometimes it can drive you crazy – in those cases similar to yours.

    To batch change things in an XML is not that difficult, more difficult is to make TC calculations as you are probably on the NTSC side of the world where video clocks don’t work real time ;-).
    I did a short test with a card and wow – you’re right. FCP takes/overwrites the TC of the file with that one given within the XML when using L&T. Very interesting feature – at least for the current version of FCP.

    If you do know a bit about AppleScript and if your footage is NDF TC, you should be able to read the XMLs, find the TCs at ”, convert them to frames, subtract or add the TC difference (also in frames) then convert back to TC and replace the value in the XML.
    You might even do that in Excel or FileMaker.

    I know that’s not a real help, but might give you a start.

    -Andreas

    Spherico
    https://www.spherico.com/filmtools

  • Jeremy Allen

    April 26, 2011 at 5:30 pm

    Thanks again for your time Andreas..

    Your suggestion is exactly what my train-of-thought has led me to. Just last night and this morning I’ve been learning about AppleScript. It seems like someone with a strong command of AppleScript could get this done fairly easily, but I’m not quite there yet.

    My footage is NDF TC, so that should help. I also have a Timecode Calculator widget for the Mac which is very helpful and I highly recommend it to any editor. I’m using TextMate for XML editing.

    I think for now I will have to log the footage as-is, but I would love to figure this out for the future, and I can’t be the only editor who has had to deal with this particular problem.

    If anyone else could shed any light on using AppleScript to calculate and batch edit the “Start Timecode” in XML files, it would be very much appreciated!

    ———————————————
    8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

    C4D 11.5
    AE CS5 (10.0.2.4)
    FCP 7.0.3
    QT 7.6.4

  • Andreas Kiel

    April 27, 2011 at 10:57 am

    Jeremy,

    Google for the Satimage XMLLib OSAX to handle XMLs with AppleScript. It’s free, well documented, very fast and powerful.
    To learn a bit about XML go to https://www.w3schools.com

    So you can do something like this with AppleScript (for a single file)

    property theFPS : 25
    property frameOffset : 500

    set filePath to (choose file without invisibles)

    set theXML to XMLOpen filePath with bypassing namespace
    set theRoot to XMLRoot theXML
    set startTC to (XMLGetText (XMLXPath theRoot with "//StartTimecode")) as string
    set text item delimiters to ":"
    set {HH, MM, SS, FF} to every text item of startTC

    set sourceFrames to (HH * 3600 * theFPS) + (MM * 60 * theFPS) + (SS * theFPS) + FF
    set newFrames to sourceFrames + frameOffset

    set HH to newFrames div (3600 * theFPS)
    set newFrames to newFrames mod (3600 * theFPS)
    set MM to newFrames div (60 * theFPS)
    set newFrames to newFrames mod (60 * theFPS)
    set SS to newFrames div (theFPS)
    set FF to newFrames mod (theFPS)

    set newTC to {HH, MM, SS, FF} as string
    set text item delimiters to ""

    XMLSetText (XMLXPath theRoot with "//StartTimecode") to newTC as string
    XMLSave theXML
    XMLClose theXML

    You have to change ‘theFPS’ and ‘frameOffset’ to those values you need. With some changes you also can create a batch process and/or droplet with the above code.
    The code will only work for NDF.
    Finally – as always – I’m not responsible for any damage this code can cause 🙂

    Andreas

    Spherico
    https://www.spherico.com/filmtools

  • Jeremy Allen

    April 27, 2011 at 2:03 pm

    Now that’s what I’m talking about! That’s why I love the Cow!

    Wow, Andreas, thanks a million for your time and effort on this. At the rate I’m picking up Applescript, it would have taken me a year to come up with a script like that 🙂

    I really do appreciate your help, and this inspires me to figure out what else I can do with Applescript. Thank you so much!

    ———————————————
    8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

    C4D 11.5
    AE CS5 (10.0.2.4)
    FCP 7.0.3
    QT 7.6.4

Viewing 1 - 9 of 9 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy