Chapter 6. Using Sirius Video Utility and Demonstration Programs

Sirius Video utility and demonstration programs make it possible to use Sirius Video for performing certain tasks with little or no programming. This chapter explains

Displaying Video on the Workstation Monitor Using vidtogfx

To display video on the workstation monitor, use vidtogfx, a Sirius Video utility program included in usr/dmedia/bin/SIRIUS. vidtogfx continuously captures a stream of live video from a video source and displays it via the Iris GL in a window on the workstation monitor.

You can set the video source on the panel (vcp) or with a vidtogfx option. To use vidtogfx parameters, use vlinfo to get the device number. For example, vlinfo might display:

name of server: 
number of devices on server: 1

device: Sirius 0
	 nodes = 12
	 Sirius Device, type = Device, kind = 0, number = 0
	 Sirius Digital Video Source 1, type = Source, kind = Video, number = 0
	 Sirius Digital Video Source 2, type = Source, kind = Video, number = 1
	 Sirius Analog Video Source, type = Source, kind = Video, number = 2
	 Sirius Memory Source, type = Source, kind = Memory, number = 0
	 Sirius Graphics Source, type = Source, kind = Graphics, number = 0
	 Sirius Chroma Key Generator, type = Internal, kind = No ui for this, number = 0
	 Sirius Blender, type = Internal, kind = Blender, number = 0
	 Sirius Video Drain, type = Drain, kind = Video, number = 0
	 Sirius Memory Drain, type = Drain, kind = Memory, number = 0
	 Sirius Graphics Drain, type = Drain, kind = Graphics, number = 0
	 Sirius Texture Drain, type = Drain, kind = Texture, number = 0

For example, to display video from a D1 source, type

vidtogfx -n 0


Note: To adjust values in the video source, see Appendix C, “Setting Up Sirius Video for Your Video Hardware,” in this guide. Appendix E, “Example Programs,” gives the complete syntax and code for vidtogfx.c.


Saving Video to Disk Using sir_vidtomem

You can use sir_vidtomem, a Sirius Video utility program included in usr/dmedia/bin/SIRIUS, to save a number of frames from a video source, such as a videotape or live video input, as RGB files on disk. To do so, follow these steps:

  1. Make sure the input device—video camera or videotape—is functioning and connected to the Sirius Video breakout box.

  2. In the vcp Utilities pull-down menu, select “Live Video Input.” The live video window appears.


    Note: If there is a problem with the display in the live video window, the cause might be lack of sync. Select “Live Video Input” a second time.


  3. Use the panel to set parameters for source and drain as needed.

  4. To display the frames in a window on the workstation as a test before you save them, type

    sir_vidtomem -c# -F1 -v# -w -d
    

    where

    • -c# is the number of frames you want to save

    • -F1 specifies frames (not fields)

    • -v# specifies the input node corresponding to the port on the breakout box, such as Digital 1 (0), Digital 2 (1), or Analog (2); the default is Digital 1

    • -w disables writing to files

    • -d displays the video in a window


    Note: For complete command-line options for sir_vidtomem, see Appendix E, “Example Programs,” later in this guide.

    For example, to display 60 frames from a source on parallel digital channel 1, type

    sir_vidtomem -c60 -F1 v 0
    

  5. To save a number of frames to disk (in the /usr/dmedia/bin/SIRIUS directory), type

    sir_vidtomem -c# -F1 -v# 
    

    For example, to save 60 frames from an analog source, type

    sir_vidtomem -c60 -F1 -v2
    


Note: While sir_vidtomem is grabbing fields, the displayed video does not move smoothly. After the frames are grabbed, the video moves smoothly while the frames are being written to disk.


Loading Video From Disk Using sir_memtovid

You can take advantage of the Sirius Video capability to bring in video in various formats and output it in a different format by using sir_memtovid, a Sirius Video utility program included in usr/dmedia/bin/SIRIUS. For example, D1 input that was saved as .rgb files can be output to tape as NTSC.

The arguments for sir_memtovid are similar to those for sir_vidtomem. Specify files with -n filenameprefix. Use -l to run the frames continuously in a loop.

For example, to play all the frames starting with test in a continuous loop, type

sir_memtovid -F1 -l -N test 

You can use vcp to specify source and drain parameters, as for sir_vidtomem.

Displaying Saved Video Using movie

You can use the program /usr/people/4Dgifts/iristools/imgtools/movie to display saved video frames or fields in a window on the workstation monitor.

To play all files starting with a certain prefix, type

movie filename*

For example, movie test* plays all files starting with the prefix test.

After the program has loaded the files into memory, you can use its menu to select “Loop” for repeat continuous play.

Displaying Live Video on a Low-Resolution Monitor

To send live video through the workstation out to a television monitor, follow these steps:

  1. If necessary, connect a live video source and use vcp to set up Sirius Video as explained in Appendix C, “Setting Up Sirius Video for Your Video Hardware.”

  2. Call up the panel:

    /usr/sbin/vcp
    

  3. In the Video Drain section of the vcp, set format and timing for the destination television monitor as necessary. Make sure the controls on the television monitor are congruent with the format (timing) you have set for the video drain.

  4. Select “Live Video Input” in the Utilities menu. The Live Video Input window appears, displaying video from an input source that is connected.

  5. Select “Live Video Output” in the Utilities menu. The Live Video Output window title and white outline appear.

  6. Move the Live Video Output window over the Live Video Input window.

  7. Select “Send Screen” in the Live Video Output window menu to begin sending frames.


    Note: To send almost the entire screen (1280 x 960), select “Send Full Screen.”


Manipulating Video using sirius_distort

You can use the sirius_distort program, which is included in /usr/dmedia/bin/SIRIUS, to manipulate live video. Follow these steps:

  1. Use sir_memtovid to display the video frames you want to manipulate.

  2. In the IRIX shell, call up sirius_distort. The window for sirius_distort appears.

  3. Move the sirius_distort window so that it covers the live video output screen.

  4. Manipulate the image:

    • Use the right mouse button to select Ripple or Rubber effect.

    • Hold down the left mouse button and move the mouse to distort the image.

If desired, output the results to tape or disk following instructions in “Saving Video to Disk Using sir_vidtomem” or “Displaying Live Video on a Low-Resolution Monitor,” respectively.

Manipulating Video using shatter

You can use the shatter program, included in /usr/dmedia/bin/SIRIUS, to manipulate live video. Follow these steps:

  1. Use sir_memtovid to display the video frames you want to manipulate.

  2. In the IRIX shell, call up shatter. The window for shatter appears.

  3. Move the shatter window so that it covers the live video output screen.

  4. Manipulate the image:

    • Hold down the left mouse button and move the mouse to move the image left, right, up, or down, or to rotate it.

    • Hold down the middle mouse button and move the mouse to zoom the image in or out.

    • Use the space bar to release the ball that shatters the image.