Trimming Media from a Terminal (CLI – Command Line Interface – remotely)

It is possible to trim media remotely using a terminal window. Using the terminal window can also give you much better control of a media player in general, for example you could load four our five clips and eject just one in the middle of the list (vs. ejecting the whole list as you get from the ClipTool). To get started, here are the steps involved in connecting to the director via a command line terminal:

  1. From a terminal window (e.g. Putty, Mac Terminal or SecureCRT) invoke the following command (replacing the information in angle brackets with the data applicable to your situation):
ssh <username>@<ip.address>
 (enter the password as prompted)

2. Once in the terminal enter the following command to start the playertest application for the director you wish to control.

playertest <ip.address of director>

3. type the following to activate the specific player you wish to use:

p <name of media port>

Once you’ve connected, there is a spreadsheet on ktoodigital’s gdrive that can be used to calculate the in/out points for each show (in frames). Log into Google Chrome as ktoodigital and bring up the FILE TRIMMING TOOL spreadsheet .

Once you’re in the spreadsheet you will see something like this:

 

You should edit the length of the show by changing the hours, minutes, seconds, and frames as appropriate (items highlighted in light yellow). You should then enter the media ID for the show. The example above is for Asia Insight episode 534. What this does is then creates commands (in blue, which should NOT be edited directly) that you can copy and paste one line at a time into the terminal window (as shown below).

NOTE: The Trimming Tool spreadsheet assumes a starting point at 15 seconds and 23 frames in into the show (which is generally correct if a show is recorded from of the HD01-HD05 sources). This could be adjusted should you find this is trimming too tightly or loosely – however you will get a warning. It then calculates the number of frames after that based upon the length entered above (Hours Minutes Seconds Frames) for the number of frames to set the outpoint. It then loads the clip, and plays the clip.

Below is a screenshot showing what this will look like at the terminal window:

You can then verify that the trim is correct by looking at a monitor or a remote stream looking at the specified media port above. (A later post will talk about using a stream to view output from a media port).

NOTE: Occasionally due to dropframe issues (which my calculator isn’t quite capturing) sometimes the clip length will be off by a frame or two (as it is with this example — off by 2). You can adjust this afterward by using the cliptool if necessary.

When you’ve completed what you need to, you should close the terminal. Other useful commands you can enter at the terminal window are:

Eject <number of clip - starting at 0>

Play 1 (through 32 for play speed - positive or negative numbers for forward/backward)

close (to disconnect from the director)

Quit (to exit the playertest application)

Help (for a list of all commands with their arguments)

Help <command> (for specifics about a given command)

list <MEDIAID> - clipinfo (to get specific information about a given clip)