Tag Archives: Featured

Use a Droplet to Prep Audio for FCP

Use a Droplet to Prep Audio for FCP

So I’ve had a chance to work for a while on FCP, and I have a few things in mind to post on it. First, though, a very simple trick to help with importing properly configured audio into FCP.

The Issue

FCP, like Avid, prefers uncompressed audio over MP3s, M4As, etc. It’s not that it doesn’t work when you import a MP3 into FCP, it just doesn’t work well. You’ll hear all sorts of clicks and dropouts as you play through the track, so to prevent this you need to convert your audio to WAV or AIF before you import. There is a program called Loader that will convert your audio for you, copy it to a specified folder, and then import it, but it costs $79. The other way you can do two out of those three actions (converting, copying to a specified folder) is to make a Compressor droplet. You still have to import it on your own, but to save $79 I think that’s a pretty good trade-off.

Compressor Droplets

Any compression setting in Compressor can be converted into a standalone application called a Droplet. As you might infer, you can drop things like files onto the Droplet, and it will then process that file into whatever setting the Droplet is programmed with. You can also specify a destination folder for that Droplet and tell it to run silently. Each file you drop onto it will queue up and encode immediately, with the resulting file being placed in your predetermined destination folder.

For me, I have two droplets, one for Mono and one for Stereo (both 24-bit/48k AIF)

Stereo Compression Setting

The image above is for the stereo setting, from which I then make a Droplet in the Settings window:

Make a Droplet

Once you click the Make Droplet button, a dialog will come up asking you where you want to save the Droplet itself, as well as which Destination (defined in the Destinations tab) you’d like that Droplet to send its files to:

Saving a Droplet

Once you click Save, your Droplet will appear wherever you saved it (on my Desktop in my case), and you can proceed to drop files onto it. The first time you run the Droplet a dialog will come up confirming your settings, and you should uncheck the “Show at Launch” checkbox in the lower left corner so that the Droplet runs silently in the future.

Once the compression is done (keeping Batch Manager handy is a good idea to check progress, though most audio takes a very short amount of time), you can import your new files into FCP and cut away.

Screenshot of the Hellboy 2 Avid Project Window

Organizing a Project’s Reels and Versions

This article is a little outdated (sorry!). I need to do a thorough rewrite, but in the meantime know that since 2008 I’ve decided to contradict my writing below and just use R1v## as my reel format. When I hit a milestone I make a new bin, label it as Director’s Cut or Assembly or Preview #2, throw the appropriate sequences in there, and then stash the bin in an easy to find folder in my project. It works pretty well, and I’ve found the fewer characters in your reel names, the easier it is on everyone.

 

The determination of how to organize all of the sequences you’ll create during the course of your project is extremely important, but unfortunately it is also nearly impossible to standardize. I work in features primarily, so while my organizational system is based around reels and suits me just fine, it would need a lot of modification were I to go to episodic or reality TV, commercials, etc. Individual editors also have their preferences for organization based off of how they are accustomed to working, and if you’re an assistant editor your degree of influence over the project’s organization will vary depending on how much the editor wants to delegate this type of organization to you.

With all that in mind, I wanted to set forth a description of the system that I use to keep all my reels in order on a feature. I’ve seen quite a few organizational systems used in different editing rooms, both on films I’ve worked on and ones I’ve just visited, and so far this is the best one I’ve seen. Thanks to editor Sean Albertson and 1st assistant editor Seth Clark for introducing it to me on Rocky Balboa.

Organization By Milestone

One of the most frequent organizational structures I see used by others uses a simple version number attached to the name of the reel. The problem with this is that you get up to these massive version numbers (R1AB_v72, R2AB_v117, etc.), and there’s no common element to link all these versions together in a meaningful way. The system I use has two levels of versioning included in the name of the reel; one is to track a milestone like a director’s cut or a preview screening, and the other is to track the individual versions of a reel created leading up to that milestone. For example:

A sequence name I might use is: R3_DC1_v4, which breaks down like:
R3 = Reel Three
DC1 = Director’s Cut 1 (this is the milestone)
v4 = The 4th version of Reel 3 for Director’s Cut 1.

Using this system, I can not only group my bins and sequences according to the progress of the project, but I can also make sure other departments are working with all of the right reels quickly and easily. Additionally, as it’s often the case that a director/studio/editor wants to go back and look at a previous version, with this system the editor can instantly find and pull up an old version from the project window so long as he knows roughly when the version he is looking for was created.

Screenshot of the Hellboy 2 Avid Project Window

Screenshot of Hellboy 2 project organization. In the project window you can see DC1-DC6 folders. The bins on the right show DC7

Defining Reels

This is global across all organizational systems, so feel free to skip this section if you already know about delineating reels.

Once you’ve got all, or at least most, of your scenes cut, you’ll probably want to create reels out of everything. The general guidelines for creating reels are that your first reel be no longer than 1600 feet from Picture Start to Last Frame of Action (LFOA). All remaining reels should be no more than 2000 feet, though there is a little bit of slack on all of these numbers. With the exception of the beginning of R1 and the end of your credits, no reel should start or end on black. Similarly, don’t cut a reel in the middle of a piece of music. The best reel breaks are between scenes that have no picture or audio transition, so that the break is as seamless as possible. You also want to avoid cutting a reel in the middle of a scene, even if there are no picture or audio transitions, since you may find that the color of your reels varies slightly and a reel break in the middle of a scene could produce a color shift.

Defining Milestones

Ok, so assuming that you decide to use this system, it’s important to know when to create a new milestone. I usually create milestones for the Editor’s Cut (EC), the Director’s Cuts (DC1, DC2, etc.), Previews (PV1, PV2, etc.), and Locks (LOCK1, LOCk2, etc.). And if you’re wondering why I allow for multiple locked cuts, I’d like to know what director you’re working for and if he or she is hiring.

You don’t want to create too many milestones or you risk confusing all of the departments that rely on your organizational system. At the same time, don’t create too few since that will defeat the purpose of organizing your reels this way and make finding old cuts much more difficult. I find that the key to creating a new milestone is to decide whether or not you’ve reached a point in the project that you want to save, including if you’re about to make a very significant change that you want to delineate from previous versions. To rephrase the question, you can also ask yourself whether you’re going to need to create an output of this sequence anytime in the future. For those milestones I mentioned above, clearly you want to have easy access to them since by the time all is said and done you will likely have needed to make more than a few outputs for the studio/director/sound dept/etc.

A final note: If you like, you can simplify the creation of milestones by sticking to a single abbreviation like “DC”.  On Hellboy 2 my milestones went from DC1 – DC7 because everything was happening so quickly and there were constantly new hires coming in for sound, so I felt it was safer to keep the system as simple and predictable as possible. The downside of this is that it’s not as clear to anyone who looks at this project later what each DC number represents, even though I know DC3 was our first preview, and DC6 was our first lock.

Defining Versions

How you elect to version your sequences is something that needs to be figured out between the editor and assistant editor. Some editors I work with prefer to manage their own versions and just rely on me to define the milestones. Others prefer that I manage everything and create new versions nightly or weekly. In the end it doesn’t really matter how you version the sequences so long as the system works for you and, at the end of a milestone, you can pop open your reel bins and see what the final version of that reel is for that particular milestone.

Conclusion

Hopefully this has been a clear explanation of how I like to organize my reels on a feature film. Please let me know how it goes if you decide to try this out, and if anything is unclear or needs further explanation, leave a comment below!

Access iTunes From Within Avid

Access iTunes From Within Avid

At this point, my sound effects library has grown to the point where I can’t bring it with me into Avid. It’s just too unwieldy, and I’d end up bringing in a lot of sfx I’d never use. So starting with Hellboy 2, I kept my sfx in iTunes, and would use the iTunes interface to sort and preview my library. When I found an effect I liked, I’d drag it to the desktop and then import it into Avid (in OSX you can’t drag direct from iTunes to Avid, although last time I was on Windows you could).

Now, I’ve taken to using a feature of Finder (Leopard-only) that I’ve long overlooked: the ability to filter Finder by media type. In your sidebar, under “MEDIA”, you will find the Music item. Clicking on this accesses your iTunes library, including any playlists (I keep all my sfx in a smart playlist so I can quickly filter out the sfx), and even allows you to Quick Look them by hitting the spacebar. Find the track(s) you want and off you go, without ever leaving Avid.

Search iTunes from within Avid's Import dialog

Search iTunes from within Avid's Import dialog

The Caveats (as usual)

When using Quick Look you can’t change tracks as easily as in iTunes or standalone Finder, but it still works. You just have to hit spacebar twice when you want to preview a different track (once to stop, another to start a new track). Doing it this way prevents you from having to switch applications and incur the wrath of the 5-10 second catch-up process that Avid does every time you switch back to it with a large Unity project open.

Also, this method works great when you’re searching for a small number of sfx of the same type (variations of crowd, e.g.). It doesn’t work as well if you’re searching for a bunch of different types of sfx, since every time you do a new search it will forget what files you’ve already selected. You’d have to search for one type of sfx, import, rinse and repeat.

Converting Avid Locators to DVD Studio Pro Chapter Markers

Converting Avid Locators to DVD Studio Pro Chapter Markers

I have two methods for making DVDs for directors, depending on how quickly the DVD is needed and what quality level or features are required. For faster but lower-quality DVDs, I just play out to a standalone DVD Recorder. For higher-quality DVDs I usually export a Quicktime, run it through Compressor, and ultimately bring it into DVD Studio Pro. When I go the DVD Studio Pro route, I also like to take the opportunity to appropriately chapter my DVDs. It’s a pretty quick and easy thing to do, and provides a more meaningful set of chapter points than the automated ones you get on a standalone recorder. My favorite method for quickly chaptering a Quicktime uses Avid locators to provide Compressor and DVD Studio Pro with my chapter points. Below is the process I use, or for the shortcut just use the online tool I created.

TOOL: Locator to Chapter Marker Converter

Converting Avid Locators to Compressor/DVDSP Chapter Markers

In order to convert Avid locators to chapter markers, a little knowledge of regular expressions is required. You also need an advanced text editor that can handle regular expressions (I use the free and multi-platform jEdit). You do not need to add locators to your sequence before you export it. Exporting your sequence and making locators suitable for chaptering can be done in either order. You do need to have exported and processed your locator file before you go into Compressor, though.

Adding Locators to Your Sequence

To prepare your sequence, change the sequence Start time to 00:00:00:00. I normally clear out all the other locators in my sequence as well, and since I always copy a sequence to a new bin before I export it, removing the locators isn’t an issue for me. If you’d like to keep your existing locators, then just add a new video track and put all of your chapter locators there.

Once your pre-existing locators are cleared and/or you’ve got yourself a new video track to work with, go ahead and add a locator at every point you’d like to make into a new chapter on your DVD. Once all your locators are added, go to the Locators window and export them to a text file. If you’ve chosen to add your locators to a new track while keeping existing locators on other tracks, then sort the Locators window by track, select all the locators you just added, and export only those Selected locators to a text file.

Exporting Avid Locators

Exporting Avid Locators

Converting the Locators Text File to a Chapter Marker File

Once you’ve got the text file with your exported locators, it’s time to open it in your advanced text editor. An exported locator file initially looks like this:

Evan Schiff    00:02:18:09    V4    white    Chapter1
Evan Schiff    00:03:11:11    V4    white    Chapter2
Evan Schiff    00:04:57:18    V4    white    Chapter3
Evan Schiff    00:06:41:16    V4    white    Chapter4
Evan Schiff    00:07:37:06    V4    white    Chapter5
Evan Schiff    00:08:29:05    V4    white    Chapter6
Evan Schiff    00:12:33:04    V4    white    Chapter7
Evan Schiff    00:13:33:23    V4    white    Chapter8
Evan Schiff    00:15:19:11    V4    white    Chapter9
Evan Schiff    00:16:14:15    V4    white    Chapter10
Evan Schiff    00:17:44:20    V4    white    Chapter11

Using a regular expression search/replace, you can instantly reformat your locator file to conform to Compressor and DVDSP’s required marker file format, which looks like the text below:

00:02:18:09 Chapter1
00:03:11:11 Chapter2
00:04:57:18 Chapter3
00:06:41:16 Chapter4
00:07:37:06 Chapter5
00:08:29:05 Chapter6
00:12:33:04 Chapter7
00:13:33:23 Chapter8
00:15:19:11 Chapter9
00:16:14:15 Chapter10
00:17:44:20 Chapter11

If you don’t label your locators, all you’ll see in the marker file is timecode. This is fine, the only required data is the timecode, and DVDSP will automatically add chapter labels if you don’t supply them.

To reformat the file, you would use the following regular expression:

^[\w\s]*(\d{2}\:\d{2}\:\d{2}\:\d{2})\tV\d\t\w+\t(.*)$

Your text editor’s dialog box would look something like the image below. I usually do a couple Replace & Find clicks just to make sure the pattern is working before I hit Replace All and save the file.

Regular Expression Search/Replace

N.B. In the Replace dialog box, your text editor may use either $1 or \1 to make back-references.

Importing Markers into Compressor

After you’ve saved your new marker file, open up Compressor and load your Quicktime into it. Make sure the Quicktime is selected in the main window and displaying in the Preview window. To the right of the Preview window’s timeline, you’ll see the marker button, under which you can Import Chapter List. Select your file, and if everything’s been done correctly, you should see markers pop up in the appropriate places in your movie.

Compressor Menu to Import Markers

Compressor Menu to Import Markers

Successfully Imported Markers

Successfully Imported Markers

Once your markers and DVD export settings are ready to go, Submit the job. Once the render finishes, you can import it into your DVDSP template file, and as soon as you lay it down onto a track you’ll see that the markers/chapter points appear automatically.

Why can’t I just add chapter points directly in DVD Studio Pro?

You can, but there are several limitations you’ll be imposing upon yourself. First and foremost, if you make your m2v without adding the markers first, you will not always be able to add a chapter point at the exact frame you want to. To get technical for a minute, when you encode an m2v file the frames of your source Quicktime are compressed into three types of mpeg frames. These are I-frames, P-frames, and B-frames (read your Compressor or DVDSP User Guide for more detail). You can only place a chapter marker on an I-frame, and if you don’t tell the encoder where you want an I-frame to be, it will put them wherever it sees fit, and this may or may not be on the frame that you want to make into a chapter point.

Second, the Compressor and DVDSP timelines are not nearly as precise as Avid’s, and don’t give you the visual identification of where clips start and end. I find it much faster to put accurate chapter points on the Avid timeline than in either Compressor or DVDSP.

You can put your chapter points wherever you like in DVDSP if you import the Quicktime directly and let DVDSP make your m2v file, but then you lose all the advantages of using Compressor, not to mention still having to deal with DVDSP’s clumsy timeline.

Print a Hierarchical List of Disk Contents

VFX companies often include paper printouts of a hard drive’s contents when they send material to/from Production, the DI, and other vendors. Occasionally, it’s useful for Editorial departments to do the same. Having a printout attached to a hard drive you’re sending out lets your vendor see exactly what’s on the drive without having to plug it in, and can be used to log a drive in or catalog it while it’s offline.

Strangely, there’s a lack of software available to do such a simple task as printing a directory listing. Searching through Google, I found a few applications for OSX that offered this functionality, but either the application wasn’t exaclty what I was looking for, or it added too many flourishes like icons and such.

So, I turned to the Terminal. Using a pattern I found in a forum on Unix.com, I modified the arguments and incorporated it into an Automator workflow (attached). This workflow displays a recursive list of directories (if you want only files or both files and directories see the bottom of this post), and is broken into the following steps:

  1. Asks for the root folder you’d like to make a listing from. This would usually be the root of your external hard drive.
  2. Asks how many levels of recursion you’d like.
    • Example: In one instance I was backing up P2 cards. I only needed to list the folder name of each P2 card I was including, and not the CONTENTS, VIDEO, VOICE, PROXY, ICON, and AUDIO folders that exist as subfolders of a P2 card’s root directory. So using this function with a recursion level of 2, my printout stopped processing directories after 2 levels of hierarchy.
  3. Runs the shell command:
find "$2" -type d -maxdepth $1 ! -name '.*' -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<2  && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}'  FS='/'
  1. Saves a text file with the listing in the same directory you chose in Step 1, and then opens that file so you can browse and print it.

The output looks like this:

|      |---Warrior Back Up
|      |              |---Dailies by Tape
|      |              |              |---CT001
|      |              |              |---HI-8
|      |              |              |---VT001
|      |              |              |---VT002
|      |              |              |---VT003
|      |              |              |---VT004
|      |              |              |---VT005
|      |              |              |---VT006
|      |              |              |---VT007
|      |              |              |---VT008
|      |              |              |---VT009
|      |              |---P2 Backup
|      |              |        |---MISC
|      |              |        |---PRODUCTION
|      |              |        |---REHEARSAL FIGHTS
|      |              |        |---TESTS

Future Refinements

Suggestions welcome, but things I'm already thinking to add to this workflow later on are:

  1. An option to show files as well as folders. You can change this in the workflow yourself by changing "-type d" to "-type f" for a files-only listing, or remove "-type d" completely for both files and folders.
  2. A dialogue to ask if you want to print the listing automatically

An Introduction to Regular Expressions

Regular Expressions are definitely one techie level up from your traditional tech tip, but they’re definitely worth the time to learn, even if you only learn the basics. A regular expression is very much like a math formula, and you use them when you want to find (and replace) pieces of text using a condition instead of knowing the text in advance.

Conceptual Examples

For example, let’s say you have a file that contains a bunch of phone numbers. And let’s say those phone numbers are all written out as “8005551212”, but you want them to look like “(800) 555-1212.” Using a text editor that supports a regular expression Find & Replace, you could easily reformat all of those phone numbers to include parentheses and a dash, without going row by row to manually change them all. Since you know that your phone number is a string of 10 continous digits, you can tell your text editor to find all instances of 10 numbers in a row, and to insert a ‘(‘ before the first digit, a ‘) ‘ after the third, and a ‘-‘ after the sixth.

A second example is as follows. You have a database full of vfx shot names and shot durations. You also have a sequence full of vfx shots you need to turnover, and every one of them needs a title added to it dictating the shot name and how many frames it is. You can export the information you need from your database, but only as a comma-separated values file (.csv). This would give you results such as:

VFX_001,25
VFX_002,38
VFX_003,119
VFX_004,350
VFX_005,8

To create all those titles, you know that you can use the Autotitler function in Avid Marquee, but the text format it requires is different from CSV, resembling something like this:

VFX_001
25

VFX_002
38

VFX_003
119

VFX_004
350

VFX_005
8

So to reformat your CSV file into the format that Marquee requires, you can tell your text editor to replace every comma in your file with a line break, and to turn every pre-existing line break into a double line break.  You can do this with one regular expression that both replaces the comma and adds a second line break, but I sometimes like to break it up into separate steps to keep things simple.

To demonstrate how to do this find/replace, I’m going to double the line break before I replace the comma. This way I can be sure that I don’t add more line breaks than I need. So the first find and replace would look like this:

Find: \n
Replace: \n\n

In regular expressions, “n” is the notation you can use for line breaks (sometimes also “r” is used either instead of or in conjunction with “n”, but you can google the difference on your own). So what this find/replace does is search for a line break and replace it with two. Then, you can probably guess what to do with the commas:

Find: ,
Replace: \n

This will give you the format you need for the Avid Autotitler.

Lastly, you can also use Regular Expressions in many file renaming utilities (NameMangler is one I use), so if you need to rename a bunch of files in order to conform to a certain pattern, regular expressions can help. One instance where you might use this would be to conform a bunch of irregularly named files in order to put them in sequence for import into an Avid bin.

Regular Expression “Variables”

What the example above is intended to demonstrate is the concept of searching for a pattern of text, rather than knowing what text you’re searching for in advance.  And in order to search for patterns, you must be able to use placeholders to represent certain characters or groups of characters.

This Regular Expression Reference lists the different placeholders you can use when searching text. The ones you’ll use most often are:

  • \d : Finds any numerical character (ie. 0-9)
  • \w: Finds any word, with a word being defined as a group of alphanumeric characters or an underscore, but not including a space
  • \s: Finds any whitespace, including a space, tab, or line break
  • \t: Finds any tab character
  • [ and ] : If you wish to limit the characters you’re searching for, put those characters inside of [ and ]. So for example, [A-Za-z5-8] would find any character from A-Z regardless of uppercase or lowercase, as well as any number between 5 and 8

You will often need to specify how many characters you’re searching for, in which case you’ll need these basic placeholders:

  • ?  : A question mark after a character or character class denotes that you are looking for 0 or 1 instance of that character
  • *  :  An asterisk denotes you are looking for 0 or more of that character
  • +  : A plus sign denotes you are looking for 1 or more of that character
  • { and }  : These brackets allow you to say exactly how many characters you want to match. For example, “\d{2}” tells the program you’re searching for a string of exactly two digits.  “\d{2,8}” tells the program you’re searching for between 2 and 8 digits, and “\d{2,}” specifies that you’re searching for at least 2 digits.

And lastly, you’ve seen the backslash (\) used a lot here, and that’s worth explaining. In regular expressions, the backslash functions as what’s called an escape character. The rules of regular expressions are a bit complex, and many characters you may want to search for have functional meanings, like the fact that an asterisk (*) tells the program to match 0 or more characters. If you want to search for an asterisk, though, you may need to escape it. And you do that by putting a backslash before the asterisk, like so: \* .  By using the backslash, you are either telling the program to ignore the special meaning that a particular character has, or to match a character that is not easily defined (like \t, which represents a tab character).

Back References

The last concept I want to explain can be tricky to get your head around while you’re still digesting everything else, but it’s a very useful thing to know, and is called a back reference. Let’s take the timecode example below… In this situation, you have a bunch of timecodes without colons (:) separating the hours, minutes, seconds, and frames (ie. 01020304). You want to insert the colons, but you need a way to tell the program not to throw out the digits that make up the timecodes when replacing the timecode text. So to do that, you have to save those digits during the Find part of the process for use during the Replace part. You do this by enclosing the text you want to save in parentheses, as so: (\d{2})

Then, in your Replace expression, you can tell the program to insert the text it’s saved by including $1, $2, $3, and $4. The first parentheses in your Find expression are referenced by $1, the second by $2, and so on. And when replacing the timecodes, if I put a set of parentheses around every 2 digits, that will allow me to then insert colons between those pairs of digits, thus giving me properly formatted timecode in the form of 01:02:03:04.

Examples

The easiest way, I think, to grasp how you use all these placeholders is to show you some examples, some of which come from this Regular Expressions site.

Email Address:

This will match most email addresses,

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b

and is broken down like this:

  1. \b matches a word boundary (most likely a space)
  2. [A-Za-z0-9._%+-]+ matches any alphanumeric character, regardless of case, as well as the punctuation also enclosed within the brackets. The + sign at the end states that you are looking for 1 or more characters that match this pattern, since most email addresses are more than one character long.
  3. @ simply matches the @ sign in an email address
  4. [A-Za-z0-9.-]+ will match the server name in your email address (ie. it will match the “gmail” in “me@gmail.com”)
  5. \. will match the dot between your server name and your top-level domain (ie. it will match the “.” in “me@gmail.com”)
  6. [A-Za-z]{2,4} will match the .com, .org, .net, .info, or whatever you happen to have, by matching 2-4 alphabetical characters
  7. \b again matches a word boundary, presumably a space or line break

Timecode:

This will match timecode, which I’ve used in the past to reformat a subtitle file from an Excel-exported CSV into a DVD Studio Pro formatted .stl file. Below is my source file, which as you see is missing the “:” in all of the timecodes.  The .stl file requirements ask that there be a space on eiher side of the commas separating the TC and subtitle text, which I did in Excel by concatenating several cells into one column with the appropriate comma spacing.

Source CSV File:
01052021 , 01052328 , …but now I wonder if it is just the fear talking.
01052419 , 01052800 , I'd like to say I'm the son of a famous person.
01052812 , 01053106 , Or at least someone who is politically affiliated.
01053128 , 01053406 , But that is not the truth.
01053427 , 01053619 , So the only reason I can  think of…
01053800 , 01053922 , …is money.
01055425 , 01055914 , -Be reasonable. | -Don't you understand we make the rules here?
01060003 , 01060209 , We will give you exactly what you want.
01060210 , 01060517 , -Make sure of it. | -It has been 19 days!
01060518 , 01060625 , That doesn't matter anymore.
01060626 , 01060815 , It does matter.
01061309 , 01061603 , I already gave you till noon.
01062605 , 01062800 , Don't do this.
01063622 , 01063729 , Wait.

To find and replace the timecodes, I would use these patterns:

Find: (\d{2})(\d{2})(\d{2})(\d{2})
Replace: $1:$2:$3:$4

Breakdown:

  1. (\d{2}) searches for strings of 2 digits, and the fact that the \d{2} is within parentheses means that the program will save the two digits it finds so that I can reinsert them when replacing the text. Since I know my timecode is 8 digits long, I put four of these statements in a row so that I can keep the hours, minutes, seconds, and frames separate.
  2. $1:$2:$3:$4 replaces every 8-digit timecode string the program finds with the first two digits it saved from the parentheses, followed by a colon, followed by the second pair of digits, then a colon, etc. This is a back reference, as mentioned above.

Conclusion

I’ll add to this article as new examples and uses arise, but hopefully this and Google will get you started on figuring out all the different ways you can use Regular Expressions. If you’re confused about when to use them, just stop yourself when you find that you’re in a position of having to make a bunch of tedious edits to a text file. It may be that you can save yourself a lot of time and typing by using a Regular Expression Find/Replace.

Additional References:

PHP: Regular Expression Details

Add Virtual Cuts to a Clip Based on the Tracks Beneath

Ever needed to add cuts to a clip at the edit points of each shot inside that clip? Yeah, me too. I’m sure this has uses outside of the feature film world, but since features are what I know, I’ll explain this using an example from doing a DI.

Imagine that your DI house has just finished assembling a reel, and they send you a check tape. You ingest the check tape into your Avid, and cut it into your reel’s sequence on the top-most video layer. All is well and good, except that you have one, unbroken 20-minute clip on your timeline. Sure, you’ve got the video tracks beneath it with your dailies, but you’d really like to add edits to that 20-minute clip where each shot starts and ends.

Fortunately, this is pretty easy to do, but Avid has hidden it away inside of the Pan & Scan effect (as of MCA 3.1.2). Here’s how it goes:

  1. Load up the sequence that corresponds to your unbroken clip. For features, this would be loading up the Reel 2 sequence that your Reel 2 DI check tape is supposed to match, for example.
  2. Add a new video track, and cut in the clip you’d like to slice up so that it is in sync with the video tracks underneath
  3. Add a Pan & Scan effect to the clip you just cut in
  4. Make sure that all your track selectors are active
  5. Go to the settings for the Pan & Scan effect, and under the Action menu, click Subdivide. This will add virtual cuts in your clip wherever there is a cut in the active video layers beneath it.
  6. Using the segment tool, select all of the segments on your newly-sliced clip, and click the Remove Effect button. This will remove the Pan & Scan effect from that track, leaving you with one clip and a bunch of matched-frame edits at the boundaries of each shot.

N.B. I referenced this briefly in Step 5, but I’ll explain it a bit more. When you click the Subdivide button, Avid will insert edits corresponding to whichever tracks are active and have cuts beneath the track with the Pan & Scan effect. So if you want to make your virtual edits based on V1, V2, and V4, but not V3, just don’t have the V3 track selector active when you click Subdivide.

Once you’re finished you should have a timeline looking somewhat like this:

A sample timeline after using the Subdivide effect on the top-most video layer

A sample timeline after using the Subdivide effect on the top-most video layer

Backing Up Unity Media

Every once in a while it becomes necessary to back up all of the media on your Unity, and this is a fairly big task. It can be terabytes of data that you need to transfer to a backup drive or drives, and there are better ways of doing this than just drag and drop. So whether the backup is needed at the end of the show for archival purposes, or somewhere in the middle because you’re switching cities and need to ship the Unity to a new office, here’s a little script I wrote to help accomplish this task safely and reliably. Some knowledge of Terminal is required (but not too much).

Backup Strategies

The script I’ve detailed here does rely on a bit of manual work. You will need to do the math to figure out which and how many workspaces from your Unity will fit onto the external drive(s) you have available. The Unity Administration Tool should help you out with that.

This script should be modified and run once per external drive. So once you know how you want to distribute your Unity workspaces across your external drives, then you should only set this script up for one volume at a time. When it finishes and is successful, change the Target Volume and Source Directories in the script file and execute it again.