captrec is a quick and dirty program design to record video and audio
off the BTTV TV viewer by screen capturing the video window.  At least
it would have been quick and dirty if I wasn't stymied at every step.
It supports BT8X8 based video capture cards.  Unlike most OS/2 TV
applications, it does support NTSC.

To use it, first open BTTV TV app, select the channel you want to 
record and set the TV image size to match the size you want to record.
You have to size it manually, but the size is displayed in the status
bar, which makes it easier. captrec creates the movie file to matches
the size of the window it is recording. It has trouble with widths
that are not divisable by 2 and/or 3, depending on the CODEC you are
using and the bytes per pixel of your screen.

It outputs both an .AVI and a .WAV. I should be able to include the 
audio in the .AVI file, but when I try that it generates an access 
violation.  I'll work on fixing this.  The WAV can be combined into
the AVI with the AVI File Utility included with OS/2, although it only
works correctly when the framerate is evenly divisible by the audio
rate.  Also, ffmpeg will combine the video and audio if you specify
both as input files. ffmpeg does work correctly for any framerate.

captrec is a PM application, but it has no user interface. All setting
are set through command line parameters. It will start recording 
immeditely for the duration specified. It creates a small window when
recording. If you close the window it will stop recording.

The default compression CODEC is Ultimotion Real-Time Compression. You
can choose compression CODEC with the /D and /E options. You can use 
the mmiolist to get a list of available CODECs.  This has been tested
with Intel Indeo and SR-MJPEG CODECs. For example, use /D:SRMJPEGC for
SR-MJPEG for /D:MONDO for the uncompressed CODEC.

On my computer I can capture 320x240 video at 30fps using Ultimotion 
compression with only about 10% lost frames. I have a 600MHz CPU. With
a faster computer, better video driver or faster harddisk, I think it 
could do better.  The MJPEG compression should be higher quality, but
my CPU can't keep up.  I think the main bottle neck is the capturing,
which seems very slow on OS/2. Using 16-bit colour for you screen
should help improve performance.

If the video file is approching 2GB in size, it will create a new one,
getting around the 2GB file limit. Unfortunatly, ffmpeg has no method 
of concatinating these files when encoding.

While this application was only tested with BTTV, using the /T 
option it may be possible to use it with other TV applications.

The Video In application that came with OS/2, dispite it's name, can 
be used as a basic video editor even without a proper Video In device
set up, although it's pratical use is limited without a lossess
CODEC beyond uncompressed.

Links:

http://doconnor.reamined.on.ca/record/
      Eventual program homepage

http://www.nord-com.net/s.milcke/bttv_en.htm
      BTTV-Project homepage

http://ftp-os2.nmsu.edu/cgi-bin/h-viewer?sh=1&fname=/pub/os2/apps/mmedia/codec/srmjpg11.zip
      SR-MJPEG CODEC

http://www.c2226.de/programs/gotcha/index.phtml
      The capturing code in captrec is based on the code in Gotcha!

http://ffmpeg.sourceforge.net/download.php
      FFmpeg video encoder

captrec has these parameters:

<filename>
      The filename to record without extension. Default: "out"

/S:<seconds>
      Record duration in seconds

/M:<minutes>
      Record duration in minutes

/D:<CODECDLL>
      DLL name for video compression CODEC. Default: "ULCORT"

/E:<CODECEntry>
      Entry function for video compression CODEC. Default: 
"CodecEntry"

/Q:<Quality>
      Quality between 1(lowest) to 1000(highest)

/F:<Frame Rate>
      Frame rate. Default: 29.97

/R:<Audio Rate>
      Audio samples per second. Default: 22050

/O
      Force mono audio. Default: Stereo

/8
      Force 8-bit audio samples. Default: 16-bit

/T:<title>
      Title of the application to capture. Default: "BTTV"

/W
      Will capture the frame window instead of the client window

/L
      Flips the image, because MMOS/2 and ffmpeg have different opinions
      on how uncompressed video should be handled.