Chapter 8. 4:2:2:4 Sampled Video

VST supports recording and playout of 4:2:2:4 sampled video with alpha. The alpha channel is used as a key channel in most production environments. VST also supports recording the 4:2:2 video and the key channel independently and later combining them into a single 4:2:2:4 clip using two DIVO boards.

Playing and Recording 4:2:2:4 sampled video is described in the following sections:

Setting VST Controls

Recording a specific type of media requires setting the appropriate VST controls so that VST records in the correct mode.

Playing 4:2:2:4 video does not require setting any VST controls; VST detects 4:2:2:4 video and changes the settings based on the media type automatically.

For all of the media and clips being recorded, you generally work with CCIR601 colorspace, which is set as follows:

vtr.media.video.input.colorspace ccir601

VST drives the DIVO board, by default, to use only the single link SDI mode (over Link A of the DIVO board). This mode works with 4:2:2 median and the key channel.

For 4;2:2:4 clips, both links (link A and link B) of the DIVO board need to be used. The DIVO needs to operate in dual-link-sdi mode (Standard Digital Interface), which is set as follows:

vtr.media.video.input.format sdi-dual-link

Controls to Set to Record 4:2:2

Set the following control to record 4:2:2:

vtr.media.video.input.packing R242_8
vtr.media.video.input.colorspace ccir601
vtr.media.video.input.compression.type none
vtr.media.clip.format default
vtr.media.video.input.format sdi

R242_8 specifies 8-bit packing format for 422 clips.

4:2:2 clips are recorded as uncompressed so that they can be edited.

Controls to Set to Record Alpha Channel

Set the following control to record alpha:

vtr.media.video.input.packing 4_8
vtr.media.video.input.colorspace ccir601
vtr.media.video.input.compression.type none
vtr.media.clip.format default
vtr.media.video.input.format sdi

4_8 specifies 8-bit packing format for alpha-only clips.

Controls to Set to Record 4:2:2:4

Set the following controls to record 4:2:2:4

vtr.media.video.input.format sdi-dual-link
vtr.media.video.input.packing R2424_8
vtr.media.video.input.compression.sampling 4224
vtr.media.video.input.colorspace ccir601
vtr.media.clip.format default

  • sdi-dual-link refers to a mode using two standard digital interface (SDI) links for transport of 4224 or 4444 video.

  • R242_8 specifies 8-bit packing format for 422 clips.

  • 4224 specifies 4:2:2:4 sampling.

4:2:2:4 is generally compressed. The bandwidth of Rice compression of 4:2:2:4 sampled video is about 17 MB/sec.

Workflow to Generate a Single 4:2:2:4 Clip

The following procedure describes how to record 4:2:2:4 sampled video with alpha using the following hardware setup shown in Figure 8-1.

Figure 8-1. DIVO Configuration for Recording 4:2:2:4

Figure 8-1 DIVO Configuration for Recording 4:2:2:4

  1. Record uncompressed 4:2:2 sampled video on one SDI input of a DIVO.

  2. Record the uncompressed alpha channel of the same video using one SDI input of a DIVO.

  3. Use the wall clock to play the 4:2:2 and alpha synchronously through two DIVO boards where the output of one, playing the 4:2:2 video, is used as the input of the second DIVO board. Because the second DIVO board can play the alpha and record simultaneously, the second DIVO board combines the 4:2:2 and alpha channel into 4;2:2:4 sampled video.

    Careful attention must be paid to disk bandwidth. The clips must be located on a filesystem that supports a bandwidth of about 22 MB/sec for uncompressed 4;2:2.

The 4:2:2 and alpha are generally not compressed so that they can be edited. The 4:2:2:4 video is generally compressed. Before recording any of these videos, you must set appropriate VST controls, as described in “Setting VST Controls”.

A code example showing how to play and record 4:2:2, alpha, and 4:2:2:4 is given in “Sample MVCP Scripts”.

Sample MVCP Scripts

The following sample code explains how to perform the following tasks:

Recording 4:2:2

Use the following script to record 4:2:2:

send "UADD DIVO_DVC_2 * SHAR"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   -re "U\[0-9\]+"
}
set U1 $expect_out(0,string)

send "SET $U1 MED vtr.media.video.input.colorspace ccir601"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.compression.type none"
expect {
   timeout exitf
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.clip.format default"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.format sdic”
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.packing R242_8f"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA LOAD $U1 b/$CLIP.4220.raw IN CRTE"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   "$CLIP"
}

send "/SEQA CUER $U1 0 +$SECS:00"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA REC $U1"
expect {
   timeout exit
   "200 OK"
}

send_user "\nType return to record the alpha component:\n"
interpreter

Recording the Alpha Channel

Use the following script to record the alpha channel:

# Set up record of alpha component

send "/SEQA SET $U1 MED vtr.media.video.input.packing 4_8"

expect {
   timeout exit
   "200 OK"
}

send "/SEQA LOAD $U1 $CLIP.0004.raw IN CRTE"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   "$CLIP"
}

send "/SEQA CUER $U1 0 +$SECS:00"
expect {
   timeout exit
   "200 OK"
}

#---------------------------------------
# Set up play of 422 component

send "UADD DIVO_0 * SHAR"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   -re "U\[0-9\]+"
}
set U2 $expect_out(0,string)

send "/SEQA SET $U2 MED vtr.media.video.output.format sdi"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U2 MED vtr.edit.preroll 5:00"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U2 MED vtr.edit.postroll 3:00"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA LOAD $U2 b/$CLIP.4220.raw"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   "$CLIP"
}

#---------------------------------------
# Go

send "/SEQA REVU $U2 0 +$SECS:00"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA UUWT $U1 $U2 SYNR"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA REC $U1"
expect {
   timeout exit
   "200 OK"
}

send_user "\nType return to setup the 4224 play and record:\n"
interpreter

Playing Alpha and Recording 4:2:2:4

Use the following script to play the alpha channel and record 4;2:2:4 on the same DIVO board:

# Set up play of alpha component

send "UADD DIVO_DVC_2 *"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   -re "U\[0-9\]+"
}
set U3 $expect_out(0,string)

send "/SEQA SET $U3 MED vtr.media.video.output.format sdi"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA LOAD $U3 $CLIP.0004.raw"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   "$CLIP"
}

send "/SEQA CUE $U3 0 +$SECS:00"
expect {
   timeout exit
   "200 OK"
}

#---------------------------------------
# Set up the record

send "/SEQA SET $U1 MED vtr.media.video.input.colorspace ccir601"

expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.compression.type rice"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.clip.format default"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.format sdi-dual-link"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.packing R2424_8"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA SET $U1 MED vtr.media.video.input.compression.sampling 4224"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA LOAD $U1 $CLIP.4224.rice IN CRTE"
expect {
   timeout exit
   "202 OK"
}
expect {
   timeout exit
   "$CLIP"
}

send "/SEQA CUER $U1 0 +$SECS:00"
expect {
   timeout exit
   "200 OK"
}

send_user "\nType return to do the 4224 play and record:\n"
interpreter
# Go

send "/SEQA REVU $U2 0 +$SECS:00"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA UUWT $U3 $U2 SYNR"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA UUWT $U1 $U2 SYNR"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA PLAY $U3"
expect {
   timeout exit
   "200 OK"
}

send "/SEQA REC $U1"
expect {
   timeout exit
   "200 OK"
}

send_user "\nType return to exit:\n"
interpreter