These questions address how to use the Wiretap Client API to read and write video media.
The WireTapNodeHandle and WireTapServerHandle classes both have methods to read frames. Which should I use?
The
WireTapNodeHandle class provides a
readFrame method that obtains a frame at a specified index on the total number of frames, which is the simplest method to use and appropriate in most cases. To interpret a frame, you also need format information, which can be obtained from a node handle (if the node is a clip node) by calling the
WireTapNodeHandle.getClipFormat method.
The
WireTapServerHandle class provides a
readFrame method which can be used if you have access to a frame ID only (without the node ID). For example, this situation can arise when you are interpreting timeline metadata that contains frame IDs only, rather than node ID and frame indexes.
Unless you do not have access to the node handle, you must always use the
WireTapNodeHandle methods to read and write frames. The
WireTapServerHandle method is for random frame access.
How do I read frames from a network-mounted framestore?
There are two options available for reading/writing frames (such as DPX, OpenEXR, and so on). You can read frames through the Wiretap server: Wiretap converts the frames into raw RGB. Or you can read them directly from the storage device:
-
Read the frame through Wiretap – The Wiretap server reads and transmits the data from the filesystem. This might involve an extra network hop from the network drive to the server of the client. However, media is automatically converted by the Wiretap server from the format on the filesystem into raw uncompressed RGB data with no header. The sample program
readFrames.C (included in the Wiretap SDK) shows how to do this.
-
Read the media directly from the network storage device – Wiretap can provide a network file path representation of the frame ID for each frame. Using the frame file path, the Wiretap client can read the formatted file directly off the storage device. The sample program listFrames.C (included in the Wiretap SDK) shows how to do this.
The second option has two important advantages:
- It reduces network usage, since there is no hop through the Wiretap server.
- It has no impact on the Wiretap server. This can be important if the Wiretap server is located on a Creative Finishing workstation. The workstation’s CPU is protected from concurrent Wiretap server activity, but competition for its resources will occur.