Subject: SGI movie Frequently Asked Questions (FAQ)
Newsgroups: comp.sys.sgi.misc,comp.answers,news.answers
From: sgi-faq@viz.tamu.edu (The SGI FAQ group)
Date: 20 Nov 1994 07:02:59 GMT

Archive-name: sgi/faq/movie
Last-modified: Sat Nov 19 10:52:36 CST 1994

    SGI movie Frequently Asked Questions (FAQ)

This is one of the Silicon Graphics FAQ series, which consists of:

    SGI admin FAQ - IRIX system administration
    SGI apps FAQ - Applications and miscellaneous programming
    SGI audio FAQ - Audio applications and programming
    SGI graphics FAQ - Graphics and user environment customization
    SGI hardware FAQ - Hardware
    SGI Impressario FAQ - IRIS Impressario
    SGI Inventor FAQ - IRIS Inventor
    SGI misc FAQ - Introduction & miscellaneous information
    SGI movie FAQ - Movies
    SGI Performer FAQ - IRIS Performer
    SGI pointer FAQ - Pointer to the other FAQs

Read the misc FAQ for information about the FAQs themselves.  Each FAQ
is posted to comp.sys.sgi.misc and to the news.answers and comp.answers
newsgroups (whose purpose is to store FAQs) twice per month.  If you
can't find one of the FAQs with your news program, you can get it by
anonymous FTP from one of these sites:

    rtfm.mit.edu:/pub/usenet/comp.sys.sgi.misc/
    rtfm.mit.edu:/pub/usenet/news.answers/sgi/faq/
    rtfm.mit.edu:/pub/usenet/comp.answers/sgi/faq/
    viz.tamu.edu:/pub/sgi/faq/

Note that rtfm.mit.edu is home to many other FAQs and informational
documents, and is a good place to look if you can't find an answer
here. If you can't use FTP, send mail to mail-server@rtfm.mit.edu with
the command 'send usenet/news.answers/ftp-list/faq' on a line by itself
in the text, and it will send you a document describing how to FTP by
mail. You can also read a hypertext version of the FAQs at

    http://www.cis.ohio-state.edu/hypertext/faq/usenet/sgi/top.html

The SGI FAQs are freely distributable and we encourage wide circulation.
The contents are accurate as far as we know, but the usual disclaimers
apply. Please send additions and changes to sgi-faq@viz.tamu.edu.

Topics covered in this FAQ:
---------------------------
!  -1- Is there a QuickTime movieplayer available for SGI (IRIX
       4.0.5F)???
!  -2- I cannot play a QuickTime movie on my Silicon Graphics computer.
       How can I make it work?
   -3- I cannot play a QuickTime movie created on a Silicon Graphics
       computer on my Macintosh.  How can I make it work?
!  -4- What version of QuickTime does Silicon Graphics support?
!  -5- How can I create a QuickTime file on an SGI?
!  -6- I need to play MPEG movies.  Does SGI offer MPEG support?
   -7- I created a movie with Capture, but now I can't edit it with
       Movie Maker or play it with Movie Player.
!  -8- How can I write a program to create, edit, convert, or play
       movies?  Where can I get a copy of the SGI Movie Library?
!  -9- I can't use images exported with Moviemaker in any of my
       applications.  What image format does Moviemaker use?
! -10- Can anyone provide details on the SGI movie format?
  -11- Can anyone provide details on the QuickTime movie format?
! -12- How can I convert from SGI movie format to MPEG?
! -13- How can I convert from Microsoft AVI movie format to SGI movie
       format?
! -14- Is there a way to bring up a movie (using movieplayer) within
       Showcase using a button click...and having it place itself
       automatically in a certain location and start?
  -15- I am using Mosaic.  When I try to view a movie, movieplayer
       starts, but then shows a message: no movie.  How can I make it
       work?
+ -16- I have the Galileo (or Indy Video) option, but I can't get
       Capture to use it.  When I run it, the IndyCam shows up.  What do
       I do?
+ -17- I cannot get the right video to show in the Capture tool! I get
       the a video input other than the one I want or the screen is
       black.  What do I do?
+ -18- Why does Capture tell me to "Please Stand By", instead of
       capturing video?
+ -19- Capture just grabbed a file for me, but now I can't find it.
       Where did Capture hide it?
+ -20- Under IRIX 5.3, my system has a video board and/or IndyCam, but
       Capture won't let me use it.  It just greys out the video options
       on its menu.  How can I make it work?
+ -21- I created a movie with audio using makemovie, but the soundtrack
       plays back really garbled and choppy.  What do I do?
+ -22- Does anyone know the maximum size a movie file that MovieMaker or
       MoviePlayer can handle?  Is it limited by free memory, or will it
       play from the hard drive?
+ -23- How do I write a program to access the pixels of a video frame in
       a movie file for image processing purposes?
+ -24- How do I write a program which can write individual frames from a
       movie file out to a still image file?
+ -25- I'm using the Movie Library to create QuickTime movies using
       Apple's Video compression.  When are default key-frames placed in
       a QuickTime movie made with the SGI movie library?
+ -26- The Movie Library has calls to play a movie in a file, memory or
       a file descriptor.  But all of them seem to assume that the
       complete movie is available locally.  How can I play a movie all
       of which is not available locally?
+ -27- When programming with the Movie Library, can we insert and delete
       frames from a playing movie?
+ -28- When writing frames to a movie with the Movie Library, if we fix
       the image track parameters, does the byte size of the frame
       remain constant across frames?
+ -29- How do I write a program to play a movie entirely from memory?
+ -30- How do I capture movies from live video within my application?
+ -31- How do I write a program to read and write compressed data to a
       movie file?
+ -32- I want to write a program which creates a JPEG-compressed movie
       file, but I need to control the compression quality.  How do I do
       this with the Movie Library?
+ -33- I want to write a program which can create a JPEG-compressed
       movie file compatible with the Cosmo Compress board, SGI's
       hardware JPEG accelerator.  How do I do this?
+ -34- I simply want to create a JPEG-compressed movie which is
       compatible with the Cosmo Compress board.  I don't want to write
       my own program.  How do I do this?

----------------------------------------------------------------------

Subject: !  -1- Is there a QuickTime movieplayer available for SGI (IRIX
                4.0.5F)???
Date: Tue Nov 15 15:00:28 PST 1994

  SGI provides QuickTime movie support as part of Movieplayer in IRIX
  5.1 and later.  If you can't or don't wish to upgrade, you may wish
! to investigate a public domain program called Xanim which offers
! Quicktime capability.

! The latest version of XAnim is 2.68.3 and is available from the
! following location:

! ftp://export.lcs.mit.edu/contrib/applications/xanim2683.README
! ftp://export.lcs.mit.edu/contrib/applications/xanim2683.tar.Z
  
! Version 2.68.3 does not support audio, but apparently this feature
! is in the works. 
! 
! If you are running IRIX 4.0.5 (any variant) or earlier, please
! consider upgrading to IRIX 5.3 (available December 1993 or January
! 1994).  It contains a more full-featured set of movie tools
! bundled with the system.

------------------------------

Subject: !  -2- I cannot play a QuickTime movie on my Silicon Graphics
                computer. How can I make it work?
Date: Tue Nov 15 15:04:39 PST 1994

  Here is a checklist of things to try:

! - You should be using the 5.2 MR version of the OS or later.

  - The QT movie must be "flattened".  Use the Apple Movie Converter
!   program and choose BOTH "Make playable on non-Apple systems" and
!   "Make self-contained" in the Save As dialog.  The file must
!   also be compressed with an algorithm we support.  For example,
!   do not choose "Cinepak" or "Compact Video".

  - Try changing the compression to something else, say "none" to see
    if that may be the problem.

  SGI has licensed the QuickTime movie file format and 2 compressors
  from Apple.  As a result, one can display QuickTime movies compressed
  with the RLE or RPZA algorithms (Apple Video and Apple Graphics) with
  the bundled SGI movieplayer. SGI currently does not support Cinepak
  compression.  Also, the SGI movie tools currently do not support
  QuickTime movies which contain an edit list.

  Typically, a QuickTime file on the Macintosh stores all of the movie
  parameters and header information in the resource fork, and the
  actual media (sound + video) in the data fork.  To be used on a
  computer which has a conventional file system (such as the Indigo),
  you must first "flatten" the movie on the Macintosh before
  transferring it to the Indigo.  This is what the "Make playable on
  non-Apple systems" option in the Apple Movie Converter does.

  The Apple Movie Converter is part of the QuickTime Starter Kit, a
  software package sold by Apple Computer for Macintosh systems.  It is
  available from retail software distributors.

------------------------------

Subject:    -3- I cannot play a QuickTime movie created on a Silicon
                Graphics computer on my Macintosh.  How can I make it
                work?
Date: Mon Aug 15 11:21:19 PDT 1994

  When going from an SGI to a Mac, the file must have a creator and
  file type.  This can be done in "ResEdit".

  To move a file to the Mac...

  Save the file in a Quicktime format (using quicktime_dev, the
  QuickTime Development option or another tool)
  Move the file to a Mac (using the floptical, or ftp)

    NOTE:  If using ftp, make sure the mode is binary, *not* macbinary

  Open the Mac program "ResEdit"
  Select "Get File info..." from File menu
  Type "MooV" into file type field, and "TVOD" into creator field
  Close dialog (Choose Yes to save changes)
  Quit "ResEdit"

  It should just work from here.

  In IRIX 5.3 the file type and creator will be created automatically
  if you drag the file to a Mac volume using the Indigo Magic desktop.

------------------------------

Subject: !  -4- What version of QuickTime does Silicon Graphics support?
Date: Tue Nov 15 15:13:01 PST 1994

  Silicon Graphics does not provide support for the QuickTime
  programming library, but only for the QuickTime file format.

  The definition of the QuickTime file format has not changed since its
  original release.  Apple's enhancements have mostly been in the form
  of performance improvements and new features to QuickTime which have
  not changed the basic file format.  So, in some sense SGI supports
  every version of QuickTime.  But to answer the question practically,
  we do not support some features which Apple introduced in later
! releases of QuickTime, such as the Cinepak codec.  Nor do we support
! "non-flattened" movies which contain separate resource and data
! forks.

------------------------------

Subject: !  -5- How can I create a QuickTime file on an SGI?
Date: Tue Nov 15 15:15:04 PST 1994

! SGI does not provide a method to create QuickTime movie files in
! the 5.2 release of the Movie Tools.  If you obtain the
  Digital Media Development Option, together with the QuickTime
  Development option, you can obtain a tool which will create QuickTime
  files on an SGI system.  We are not able to include this tool with
  the basic IRIX distribution due to our licensing agreements with
  Apple Computer.

  See elsewhere in this FAQ for more information on both the Digital
  Media Development Option and the QuickTime Developer's Option.

! IRIX 5.3 contains a version of Movie Maker which can export to
! the QuickTime file format.
! 
! There is a commercially available tool which will allow creation
! of both SGI and QuickTime movies under IRIX 5.2 called Image
! Independence. It is a batch image converter with A GUI and
! command-line versions. It lists for $495, comes with over 20
! image formats, is fast and flexible. It can be purchased from
! Elastic Reality, Inc. at (608) 273-6585.  It can also convert
! movies from one type to another, or split movies into
! separate frames.

------------------------------

Subject: !  -6- I need to play MPEG movies.  Does SGI offer MPEG
                support?
Date: Tue Nov 15 15:15:04 PST 1994

  The current SGI movieplayer does not support MPEG movies.  Support
! for MPEG playback and file conversion will appear as an optional
! product, shortly after IRIX 5.3 becomes available.

  For free, you have several options.

  1) You can use the Berkeley mpeg_play. You can get the file
  mpeg_play.Z by anonymous ftp from

!     ftp://sgigate.sgi.com/pub/Mosaic/mpeg_play.Z

  Please use the binary transfer mode to get that file, and then
  enter:

      uncompress mpeg_play.Z

  to get mpeg_play.  You can use mpeg_play to play MPEG files specified
  in Mosaic documents.

  2) Another MPEG player is available via FTP.  Here is its URL:

!     ftp://geom.umn.edu/priv/daeron/src/mpeg_play-src.tar.Z

  This MPEG player has Motif frame controls.

! 3) You might want to check out sgimpeg, a program based on
  mpeg_play, with all graphics replaced with IrisGL calls.  It also
  features some limited frame controls. The full package, bit, also
  offers conversions of any frames within the MPEG stream to
  jpeg/pnm/rgb and other formats.  Both bit and sgimpeg are available
  from

!     ftp://monte.svec.uh.edu/pub/bit/

  via anonymous ftp.
  
+ [ Editors note: at the time of latest revision, sgimpeg was not
+   available at this Internet location. ]
+   
+ 4) Here is yet another MPEG player from Greg Ward (greg@pet.mni.mcgill.ca):

+ I have also written a GL-specific MPEG player -- same general
+ idea as sgimpeg, but it has a cruder user interface (all keyboard) and
+ a lot more features (memory or disk buffering, pixel doubling/tripling/
+ whatever, pause, single step forward or backward).

+ It's available by anonymous ftp from yorick.mni.mcgill.ca, in /pub/mpeg.

------------------------------

Subject:    -7- I created a movie with Capture, but now I can't edit it
                with Movie Maker or play it with Movie Player.
Date: 20 May 1994 00:00:01 EST

  Check to see that you are using compatible versions of the tools.
  Odds are that you created the movie with Capture (an application in
  IRIX 5.1 and later), but are trying to use the tools from an IRIX
  4.0.5 to view and manipulate them.

  The IRIX 5.x versions of the movie tools can read files created by
  the 4.0.5 tools, but the reverse is not true.

------------------------------

Subject: !  -8- How can I write a program to create, edit, convert, or
                play movies?  Where can I get a copy of the SGI Movie
                Library?
Date: Wed Nov 16 13:04:20 PST 1994

! The Digital Media Development Option contains the Video,
! Audio, Audio File, MIDI, CD, DAT, Movie, and Compression
! Libraries.  It allows you to perform tasks like these
! inside your application:

! - perform audio, video, MIDI I/O on SGI machines (including
!   programming the IndyCam)

! - convert audio/video data between different formats
!   (this includes software and hardware
!   compression/decompression for audio and video)

! - read/write digital media file formats (SGI movie,
!   QuickTime, AIFF/AIFF-C sound files)

! - read/write DAT audio tapes using SGI SCSI DAT drive, read
!   CD audio disks using SGI SCSI CD drive.

  The part number for the Digital Media Development Option is
! SC4-DMDEV-2.0.   If you would like to develop applications
! which manipulate QuickTime files, you must also order the
! companion product, QuickTime 1.0 Compressor Library, part
! number SC4-QTCL-1.0.  The Digital Media Development Option
! requires IRIX 5.2 or later (both part numbers above are
! for the IRIX 5.2 versions).

! In order to use the Digital Media Development Option, you
! also need to have IDO 5.2.  This is the basic IRIS
! developer option, including compilers, basic C library
! headers, graphics libraries, etc.

! In the United States, you can order these products by
! calling Silicon Graphics toll-free at 1-800-800-SGI1
! (1-800-800-7441).  If you live in a country other than the
! United States, contact your nearest Silicon Graphics
! office, or call one of these regional telephone numbers:

! Europe		(41) 22-798.75.25 	(Geneva, CH)
! North Pacific		(81) 3-5420.71.10
! South Pacific		(61) 2-879.95.00
! Latin America		1(415) 390.46.37
! Canada		1(416) 625-4747

! Starting with IRIX 5.3 (due December 1994), the Digital
! Media Development Environment will be included as a
! standard piece of IDO, and you will no longer need to order
! it separately.  However, the QuickTime 1.0 Compressor
! Library will remain a separate product, due to SGI's
! licensing agreements with Apple Computer, Inc.

------------------------------

Subject: !  -9- I can't use images exported with Moviemaker in any of my
                applications.  What image format does Moviemaker use?
Date: Tue Nov 15 15:18:49 PST 1994

  Moviemaker exports images using the ImageVision FIT file format.
  This library is supported by the SGI ImageVision Library and its
  assorted tools.

  To convert FIT files to another file format, such as SGI rgb or TIFF,
  use the imgcopy(1) program, part of the ImageVision Tools (imgtools)
  product.  The ImageVision Tools are bundled with the basic IRIX
  distribution.

  The following shell script will convert a batch of image files to SGI
  format, using imgcopy:

  #----------------------- cut here ---------------------------
  #!/bin/csh
  #
  # iv2sgi - convert a batch of imagevision-supported files to SGI
  # .rgb format using imgcopy
  #
  # usage: iv2sgi <filenames>
  #

  foreach image ($argv)
      imgcopy -fSGI $image $image.rgb
  end
  #----------------------- cut here ---------------------------

  Moviemaker 2.1, to be available in the IRIX 5.3 release,
  will support image export in SGI and TIFF, as well as FIT formats.

+ NOTE: the IRIX 5.3 version of Moviemaker contains a bug which
+ prevents it from exporting images to TIFF format.  Exported images
+ will look all black or all white.  If this is important to you,
+ you can contact SGI's Technical Assistance Center and ask for a
+ patch release of Moviemaker to correct this problem.  (This bug
+ was found too late to correct for the 5.3 release).

  Finally, if you have the SGI Developer's Toolbox 4.1 CD, you can
  obtain a program called Moviemaster.  Moviemaster converts between
  movies and images. 32 different image formats are currently
  supported. All sgi movie formats are supported.  Moviemaster can
  extract frames from a movie, build a movie from frames, or image
  convert from one format to another.  This program will also be
! available under the name "Movieconvert" in the IRIX 5.3 release.

------------------------------

Subject: ! -10- Can anyone provide details on the SGI movie format?
Date: Tue Nov 15 15:21:19 PST 1994

  The contents of the SGI movie file format are not documented.  To
  create and manipulate SGI movie files in your own application, we
  recommend that you use the SGI Movie Library, part of the Digital
! Media Development environment.  This will not only save you work in your
  application, but will ensure that your program remains compatible
  with any revisions SGI makes to its movie file format.

  If you need to manipulate movie files for cross-platform purposes, we
  recommend that you obtain the QuickTime Developer's Option to create
  QuickTime movies which can be used cross-platform.

  See elsewhere in this FAQ for more information on both the Digital
! Media Development Environment and the QuickTime Developer's Option.

------------------------------

Subject:   -11- Can anyone provide details on the QuickTime movie
                format?
Date: 20 May 1994 00:00:01 EST

  For more details on the Apple implementation of QuickTime and its
  file format, see "Inside Macintosh:  QuickTime" (ISBN 0-201-62201-7)
  and "Inside Macintosh:  QuickTime Components", both by Apple Computer
  and published by Addison-Wesley.  The former book contains a detailed
  description of the QuickTime file format.

------------------------------

Subject: ! -12- How can I convert from SGI movie format to MPEG?
Date: Tue Nov 15 15:21:19 PST 1994

! There is a publically available program which can convert SGI
! movie files to MPEG.  It was developed by Andreas Paul
! <paula@informatik.tu-muenchen.de>.  It can be obtained from:

! ftp://ftp.rus.uni-stuttgart.de/pub/systems/sgi/animation/mv2mpeg_final.tar.gz

! It is for IRIX 5.x systems, and supports all versions of the SGI
! movie file format.

! If you are using IRIX 4.0.x, then get mov2mpeg from
  
! ftp://ftp.gvu.gatech.edu/pub/gvu/mosaic-info/mosaic/mov2mpeg.tar.gz


! Another way to do this is to export all of the images and
! audio track from the SGI movie file by using moviemaker or makemovie,
! and feed the result (a sequence of still frames) into one of the
! public domain MPEG encoders available on the net.

  For more information on MPEG, and a list of places where you can
  obtain MPEG encoder software, consult the MPEG Frequently Asked
  Questions document. You can FTP it from

!     ftp://ftp.cs.tu-berlin.de/pub/msdos/dos/graphics/mpegfa11.zip
!     ftp://ftp.cs.tu-berlin.de/pub/msdos/dos/graphics/mpegfa20.zip
!     ftp://ftp.cs.tu-berlin.de/pub/msdos/dos/graphics/mpegfa30.zip
!     ftp://ftp.cs.tu-berlin.de/pub/msdos/dos/graphics/mpegfa31.zip

  These documents are versions 1.1, 2.0, 3.0, and 3.1 of the MPEG FAQ
  document.

------------------------------

Subject: ! -13- How can I convert from Microsoft AVI movie format to SGI
                movie format?
Date: Tue Nov 15 15:23:16 PST 1994

  Currently, there is no utility available to peform this conversion.
  Our current focus is on providing MPEG support in the Movie Tools, so
  look for MPEG to appear before AVI support.
  
+ XAnim is a public domain program which can play movies in the AVI
+ movie format.  See above for information on how to obtain this tool
+ via the Internet.

------------------------------

Subject: ! -14- Is there a way to bring up a movie (using movieplayer)
                within Showcase using a button click...and having it
                place itself automatically in a certain location and
                start?
Date: 20 May 1994 00:00:01 EST

  Not that I know of.  When we want to play a movie, we usually
  hyperscript the object to run a script, and in the script we place
  the movie where we want to.  Here is an example of the script.  Call
  it with the movie name as an argument.

  /usr/sbin/movieplayer -fNv -S$X1,$Y1,360,243 -l 1 -z $ZOOM $1

  Define your zoom factor ($ZOOM) and position ( X1 Y1 ) in front of
  this.

------------------------------

Subject:   -15- I am using Mosaic.  When I try to view a movie,
                movieplayer starts, but then shows a message: no movie.
                How can I make it work?
Date: 20 May 1994 00:00:01 EST

  Check the following:

  - Is your system running IRIX 4.0.5?  The movieplayer in IRIX 4.0.5
    does not support QuickTime movies.  You will need to upgrade to
    IRIX 5.2 in order to receive QuickTime support in movieplayer.

  - Check to see that the movie file was copied over completely by
    Mosaic.  Sometimes Mosaic will fail to transfer the file completely
    if the network load is very high.
+   
+ - Finally, the following information submitted by Dave Babcock
+   (daveb@merlin.mti.sgi.com) may prove helpful:

+ xmosaic includes the capability to automatically play SGI movie files
+ referenced by a html document.  Unfortunately, there is a "bug" which
+ keeps it from actually working.

+ Fortunately, there is an easy fix.  Just edit the
+ /usr/local/lib/mosaic/mailcap file and change the following line:

+   video/x-sgi-movie; movieplayer -l 1 %s; compose=moviemaker %s; \

+ to be:

+   video/x-sgi-movie; movieplayer -f -l 1 %s; compose=moviemaker %s; \

+ that is just add the -f.

+ For those who care, the problem is: mosaic copies the movie file to a local
+ temp file; spawns movieplayer passing it the name of the temp file; when it
+ sees movieplayer "terminate" mosaic nicely deletes the temp file.  But by
+ default movieplayer runs in background mode which mosaic interprets as it
+ being done and deletes the temp file just before the background task trys to
+ open the temp file.  The symptom is that you get the error message:

+   Could not open: /usr/tmp/gaaa000-0.mv: No such file or directory
+   could not open movie file

+ and nothing happens.

------------------------------

Subject: + -16- I have the Galileo (or Indy Video) option, but I can't
                get Capture to use it.  When I run it, the IndyCam shows
                up.  What do I do?
Date: Tue Nov 15 15:36:26 PST 1994

+ When run on a system with more than one video device (for example,
+ an Indy with both Indy Video and the built-in IndyCam support),
+ Capture will use the IndyCam by default.

+ To force Capture to run using Galileo or Indy Video, enter the following
+ command line at a shell prompt:

+ capture -ev1

+ Make sure that you are using Capture with IRIX 5.2 or later.

------------------------------

Subject: + -17- I cannot get the right video to show in the Capture
                tool! I get the a video input other than the one I want
                or the screen is black.  What do I do?
Date: Tue Nov 15 15:39:30 PST 1994

+ Capture does not allow you to choose a signal source.  It uses the
+ system video settings.

+ To change the system settings for signal source (and hence the signal
+ source for Capture), do the following:

+ Run vcp or videopanel.
+ 	
+ Choose the device (VINO or Galileo/Indy Video) you are using.
+ VINO is for the Indy's built-in video (both the IndyCam and
+ its analog video input port).  Galileo/Indy Video is available
+ only if you have those optional hardware products installed.
+	
+ Then choose the input.  For VINO, this control is labeled
+ "Default In".  For Galileo/Indy Video, this control is labeled
+ "Input Source".  You may need to close other video apps
+ (including Capture) to do this.
+ 
+ Don't forget to make sure that your camera or VCR is plugged
+ in correctly, and that your camera can see video.  Look into
+ the camera's viewfinder to make sure it is working.
+	
+ Choose "Live Video Input" off the Utilities menu to check.
+ The video you see here is what Capture will use.  Close this
+ window when you are satisfied.
+	
+ If you closed Capture, start it again (don't forget -ev1 on
+ the command line if you are using Galileo/Indy Video; see
+ above).  You should get the video you want.

------------------------------

Subject: + -18- Why does Capture tell me to "Please Stand By", instead
                of capturing video?
Date: Tue Nov 15 15:39:30 PST 1994

+ Capture presents the "Please Stand By" message in two circumstances:

+   1) It is processing video that you just captured.
+   2) Your system has video support, but Capture for some
+      reason cannot use it.

+ Symptom 1) is normal operation for the program, and is nothing
+ you should worry about.

+ Symptom 2) can happen for several reasons.  Check the following:

+   - Make sure to close down all other applications which use
+     video.

+   - If you are using the IndyCam, make sure it is plugged in
+     to the back of the machine.  Perhaps the connector may have
+     worked itself loose.

+   - If you still get the "Please Stand By" message, reboot the
+     system.  It might be possible that the system video services
+     had become wedged for some reason; a reboot fixes this
+     problem.

+   - Make sure that you have the signal source set correctly,
+     and that video shows up onscreen from the Video Control
+     Panel.  See above question, "I cannot get the right
+     video to show in the Capture tool!" for details on how
+     to do this.

------------------------------

Subject: + -19- Capture just grabbed a file for me, but now I can't find
                it.  Where did Capture hide it?
Date: Thu Nov 17 09:08:40 PST 1994

+ Capture always places its file in the directory it was run
+ from.  If you ran it from the Indigo Magic desktop, odds are
+ that it placed the file in your home directory.

+ To find out the name of the file, look in the title bar, or
+ choose "Settings" from the "Actions" menu and look in the
+ first typein blank.

------------------------------

Subject: + -20- Under IRIX 5.3, my system has a video board and/or
                IndyCam, but Capture won't let me use it.  It just greys
                out the video options on its menu.  How can I make it
                work?
Date: Thu Nov 17 09:08:40 PST 1994

+ Odds are that you do not have video support installed on your system.

+ Here is what you need to have installed, at a bare minimum:

+ I  dmedia_eoe.sw.common 11/07/94  Common Execution Environment Components
+ I  dmedia_eoe.sw.compression  11/07/94  Compression Execution Environment
+ I  dmedia_eoe.sw.video  11/07/94  Video Execution Environment

+ For IndyCam users, you also need the following:

+ I  vino.sw.eoe          11/07/94  Indy Video-In Execution Software


+ For Galileo/Indy Video users, you also need the following:

+ I  galileo.sw.eoe       11/07/94  Galileo Video Execution Software


+ For users with the Cosmo Compress option, you also need these
+ systems installed:

+ I  cosmo.sw.eoe         11/07/94  Cosmo Compress Execution Software
+ I  dmedia_eoe.sw.utilities  11/07/94  Media Record, Playback, Convert Commands

------------------------------

Subject: + -21- I created a movie with audio using makemovie, but the
                soundtrack plays back really garbled and choppy.  What
                do I do?
Date: Thu Nov 17 09:08:40 PST 1994

+ You created a movie with image and audio tracks of unequal length.
+ This probably happened because you chose a frame rate for the
+ movie which caused the image track to not match the length of the
+ audio track.

+ There are a few solutions for this problem.  The easiest is to
+ choose a frame rate which makes the image track match the audio
+ track in length, and then use makemovie to create a new movie file
+ with the correct frame rate.  Another way is to pad the shorter
+ track (image or audio) out with additional content to match the
+ longer one.

+ In IRIX 5.3, Moviemaker will automatically detect movies like these
+ and offer to correct them for you.  You can choose either of the
+ above methods of correction.  If you choose to pad out the shorter
+ track, Moviemaker adds blank material, which you can later edit.

------------------------------

Subject: + -22- Does anyone know the maximum size a movie file that
                MovieMaker or MoviePlayer can handle?  Is it limited by
                free memory, or will it play from the hard drive?
Date: Thu Nov 17 09:08:40 PST 1994

+ Movieplayer plays movies from the hard drive.  Moviemaker edits
+ movies directly on disk.

+ It is entirely possible to write an appplication which plays
+ movies entirely from memory (see below for details), but
+ Movieplayer does not support that.

------------------------------

Subject: + -23- How do I write a program to access the pixels of a video
                frame in a movie file for image processing purposes?
Date: Wed Nov 16 13:04:20 PST 1994

+ Basic overview:

+ You need to write the program using the Movie Library.
+ Open the file using mvOpenFile(3mv), get a handle to the
+ image track using mvFindTrackByMedium(3mv), then read the
+ individual image frames using mvReadFrames(3mv).

+ Details on the format of image data:

+ The following libmovie calls return information to describe
+ the format of the data returned by mvReadFrames():

+ int           mvGetImageWidth      ( MVid imageTrack );
+ int           mvGetImageHeight     ( MVid imageTrack );
+ double        mvGetImageRate       ( MVid imageTrack );
+ const char*   mvGetImageCompression( MVid imageTrack );
+ DMinterlacing mvGetImageInterlacing( MVid imageTrack );
+ DMpacking     mvGetImagePacking    ( MVid imageTrack );
+ DMorientation mvGetImageOrientation( MVid imageTrack );

+ For interlacing, packing and orientation, the types of
+ formats can be found in <dm_image.h>.

+ Once you have the description of format for the data in the
+ image track, you can treat the buffer of untyped data
+ returned by mvReadFrames() as an array of pixels.  If you
+ need the data in a different format for your image
+ processing or file I/O, you will need to perform the
+ conversion yourself.

+ For writing movies, the process works similarly.  Create a
+ DMparams structure that describes the format of the data
+ you will be writing, and pass that to mvAddTrack().  This
+ creates an image track with the data format you want.  Then
+ pass pixel data in that format to mvInsertFrames().

+ Note that the Movie Library uses the MVid data type to
+ represent both movies, and tracks within the movies.  So
+ when you write a program to read or write image frames,
+ you will have two MVid variables - one for the movie as
+ a whole, and one for the image track embedded within the
+ movie.

+ Check the Digital Media Programmer's Guide and the Movie
+ Library Manual pages for more details, as well as detailed
+ instructions on how to use these calls.

------------------------------

Subject: + -24- How do I write a program which can write individual
                frames from a movie file out to a still image file?
Date: Wed Nov 16 13:04:20 PST 1994

+ Once you have managed to read individual frames from a
+ movie file (see above), you have several options for
+ writing the still frames to an image file.

+ There is an image library, libimage.a, which supports
+ reading and writing the Silicon Graphics RGB file format.
+ Sample programs for using this library appear in the
+ 4Dgifts subsystem.

+ Also, you can purchase the optional SGI ImageVision
+ Library.  ImageVision supports output to several image file
+ formats, including SGI, TIFF, JFIF, and its own proprietary
+ FIT format.  C++ developers can add their own file
+ formats.  ImageVision also provides several powerful
+ operators for converting, procesing, and displaying image
+ data, and also provides hardware acceleration on SGI
+ platforms which support it.  Contact your SGI sales office
+ for more details (see above for details about where to
+ call).

+ Finally, make sure you've installed the Movie Library
+ example programs.  They contain a program called
+ editmovie.c which writes still frames to image files, using
+ ImageVision to write the data to disk.

------------------------------

Subject: + -25- I'm using the Movie Library to create QuickTime movies
                using Apple's Video compression.  When are default key-
                frames placed in a QuickTime movie made with the SGI
                movie library?
Date: Wed Nov 16 13:04:20 PST 1994

+ Currently, key frames are placed by default every fifth
+ frame.  Currently, there is no mechanism to customize
+ this feature.

------------------------------

Subject: + -26- The Movie Library has calls to play a movie in a file,
                memory or a file descriptor.  But all of them seem to
                assume that the complete movie is available locally.
                How can I play a movie all of which is not available
                locally?
Date: Wed Nov 16 13:04:20 PST 1994

+ It's really not possible at the moment.  The Movie Library
+ needs access to both the header/indexing information stored
+ in the movie file, as well as the media data itself in
+ order to play the movie.

+ It may be possible to do this by passing a socket
+ descriptor instead of a file descriptor.  There definitely
+ is a problem of seeking to a particular frame.  If the whole
+ movie is streamed in with no mvSetCurrentFrame() kind of
+ calls, it may work.

------------------------------

Subject: + -27- When programming with the Movie Library, can we insert
                and delete frames from a playing movie?
Date: Wed Nov 16 13:04:20 PST 1994

+ Absolutely not.

------------------------------

Subject: + -28- When writing frames to a movie with the Movie Library,
                if we fix the image track parameters, does the byte size
                of the frame remain constant across frames?
Date: Wed Nov 16 13:04:20 PST 1994

+ In general, no.  The compression codecs return variable size byte
+ counts for the frames they compress.

------------------------------

Subject: + -29- How do I write a program to play a movie entirely from
                memory?
Date: Wed Nov 16 13:04:20 PST 1994

+ Typically, you open the movie file using the Unix open() system
+ call.  You then allocate a memory buffer as large as you need, and
+ use the read() system call to read the entire movie into the memory
+ buffer.  Then pass the pointer to this memory region to mvOpenMem()
+ and you're set.

+ If you want to get more fancy, you can use the mpin() system call
+ to attempt to lock your memory buffer in physical memory, so
+ it does not get swapped out.  Or, you can use the mmap() system
+ call to associate your disk file with a memory pointer, and pass
+ the memory-mapped region to mvOpenMem().  This has certain advantages
+ which are outside the scope of this FAQ; consult the manual pages
+ and a good book on Unix system-call level programming for details.

------------------------------

Subject: + -30- How do I capture movies from live video within my
                application?
Date: Wed Nov 16 13:04:20 PST 1994

+ In IRIX 5.2, your only choice is to write your own code using
+ the Audio, Video, and Movie Libraries to capture live video
+ and audio and save it to disk - not an easy task.

+ In IRIX 5.3, your program can use the Capture Tool to do this
+ work.  You can invoke the Capture tool, passing it a file name
+ and a set of options telling it what media to capture and what
+ compression to use.  When the user exits the Capture Tool, you
+ simply open the movie file it recorded for you.  Check the
+ 5.3 manual page for Capture for more details.

------------------------------

Subject: + -31- How do I write a program to read and write compressed
                data to a movie file?
Date: Wed Nov 16 13:04:20 PST 1994

+ Check out the manual pages for the mvGetCompressedImageSize(),
+ mvReadCompressedImage() and mvInsertCompressedImage() calls.
+ They should do what you need.

------------------------------

Subject: + -32- I want to write a program which creates a JPEG-
                compressed movie file, but I need to control the
                compression quality.  How do I do this with the Movie
                Library?
Date: Wed Nov 16 13:04:20 PST 1994

+ Currently, the way to do this is to create a movie file with
+ all the appropriate image track parameters (see above).  But instead
+ of simply writing frames to the movie and letting the Movie Library
+ automatically compress the frames for you, you handle the compression
+ yourself.
+ 
+ To do the compression yourself, you open a Compression Library JPEG
+ compressor, set the quality factor, and use it to compress each
+ frame.  Then you write the *compressed* data to the movie file
+ (see above for instructions on how to do this).

------------------------------

Subject: + -33- I want to write a program which can create a JPEG-
                compressed movie file compatible with the Cosmo Compress
                board, SGI's hardware JPEG accelerator.  How do I do
                this?
Date: Wed Nov 16 13:04:20 PST 1994

+ Movies which are compatible with the Cosmo Compress board
+ have the following characteristics:

+   - must be JPEG.
+   - width must be video sized, even multiple of 8.
+   - height must be video sized, even multiple of 8.
+   - image frames must be interlaced.
+   - image frames must be oriented top to bottom.
+   - image packing must be RGB.

+ Here is a piece of code which will check an existing image
+ track for you.  C programmers will hopefully forgive the use
+ of C++ style comments:


+ ///////////////
+ //
+ // Check to see if the video track is one of the subset of
+ // JPEG-encoded tracks that the cosmo board can play.
+ //
+ ///////////////

+ static DMboolean isCosmoCompatible( MVid videotrack )
+ {
+     //
+     // must be JPEG.
+     //
+     if ( mvGetCompression(videotrack) != IMAGE_COMP_JPEG ) {
+   	  return DM_FALSE;
+     }

+     //
+     // width must be video sized, even multiple of 8.
+     //
+     int width = mvGetImageWidth(videotrack);
+     if ( width < 16 || width > 768 || width % 8 ) {
+   	  return DM_FALSE;
+     }

+     //
+     // height must be video sized, even multiple of 8.
+     //
+     int height = mvGetImageHeight(videotrack);
+     if ( height < 16 || height > 2*296 || height % 8 ) {
+   	  return DM_FALSE;
+     }

+     //
+     // image frames must be interlaced.
+     //
+     if ( mvGetImageInterlacing(videotrack) == DM_IMAGE_NONINTERLACED) {
+   	  return DM_FALSE;
+     }

+     //
+     // image frames must be oriented top to bottom.
+     //
+     if ( mvGetImageOrientation(videotrack) != DM_TOP_TO_BOTTOM ) {
+	  return DM_FALSE;
+     }

+     //
+     // image packing must be RGB.
+     //
+     if ( mvGetImagePacking(videotrack) != DM_PACKING_RGB ) {
+   	  return DM_FALSE;
+     }

+     //
+     // we've run the gauntlet.  dmplay can play this movie.
+     //
+     return DM_TRUE;
+ }

------------------------------

Subject: + -34- I simply want to create a JPEG-compressed movie which is
                compatible with the Cosmo Compress board.  I don't want
                to write my own program.  How do I do this?
Date: Wed Nov 16 13:04:20 PST 1994

+ In IRIX 5.3, there are three ways to do this:

+ 1) Use the dmrecord utility to record live video from the Galileo
+ or Indy Video options.

+ 2) Use the Capture tool to record live video from the Galileo
+ or Indy Video options.

+ 3) Use the makemovie utility to generate a cosmo-compatible movie
+ from a collection of still images.  Here is an excerpt from the
+ manual page:

+   To make an odd interlaced, 640x480, JPEG compressed movie with top-to-
+   bottom orientation (of the sort that can be played back on the Cosmo
+   compression board) from image files img1.rgb, img2.rgb, and img3.rgb:

+   makemovie -o movie3.mv -c jpeg -s 640,480 -i odd -t \
+       	 img1.rgb img2.rgb img3.rgb

------------------------------

End of sgi/faq/movie Digest
******************************
-- 
The SGI FAQ group                                sgi-faq@viz.tamu.edu
Finger us for info on the SGI FAQs, or look in viz.tamu.edu:/pub/sgi.

