render DV movies of titles and scrolling credits
Copyright (c) 2004 David Simmons

NEW - User-contributed patches

Some users have modified the dvtext code to overcome some of the shortcomings. I haven't had time to integrate these changes into the proper dvtext code base, so I'll post the updates and patches as-is, for now.

What is dvtext?

The dvtext program generates DV (Digital Video) movie clips of certain text effects. Currently, two text effects are supported: a fade-in/fade-out title effect, and a "scrolling text" effect suitable for closing credits. There is no support for anything fancy like placing text over your custom video -- text is always rendered onto a solid black background.

dvtext outputs an AVI file containing DV video data. This DV file is suitable for including into your video project if you are using a video editing software package that understands DV, such as Kino.

I wrote dvtext so I could place titles and closing credits onto home videos that I create, when converting footage from my DV camcorder into DVD-Video discs.

This program may be distributed under the terms of the GNU General Public License.

Download dvtext


Example frame from a title effect:

Example frame from a scroll effect:

Compiling dvtext

There are a couple of extra packages which your system must have in order to compile and run dvtext.

  1. Download and install the libdv package from http://libdv.sourceforge.net/. The libdv package is used by dvtext to create compressed video data in DV format.
  2. Download and install the FreeType package from http://www.freetype.org/. If you are running Red Hat Linux or Fedora Core, it's easier to simply make sure you have the "freetype" and "freetype-devel" RPMs installed from your distribution.
  3. Edit the dvtext Makefile to set the location of your FreeType header files. I'm shipping the Makefile with the path set to "/usr/include/freetype2", which is where the freetype-devel package puts the header files on my Fedora Core 1 box.
  4. Type "make". With luck, you'll end up with a "dvtext" binary.

Running dvtext

The dvtext program accepts a single command-line argument -- the filename of a file containing text and rendering instructions (the "dvt" file). The rendered DV data is written to a file called "out.avi" in the current directory.

The provided file must contain the text to be rendered, and possibly additional directives on lines beginning with '!'.

Regard this example dvt file:

!font FreeSansBold.ttf
!type title
!pointsize 48
!ypos 200
Example Title
!pointsize 32
!ypos 300
by David Simmons

dvtext understands the following directives:

Specifies the type of effect to render. Currently supported types are "title" and "scroll".
Specifies the filename of the TrueType font to use when rendering the text. This directive affects any subsequent text, and may be repeated as needed.
Specifies the point size to use when rendering the text. This directive affects any subsequent text, and may be repeated as needed.
Specifies the vertical position to render any subsequent text. (Horizontal position is not needed, since dvtext currently centers all text.)

See the provided "example-credits.dvt" for an example of rendering scrolling credits.


Because dvtext renders sharply-defined text into a compressed video format (DV), which you will compress again when you convert your video to its final format, you may notice some artifacts around the text when viewed on a high definition display. Ideally, the dvtext program would not generate DV output at all, but rather output video in some sort of lossless format.

It would be useful to be able to specify the output filename as a command-line option, instead of always using the hard-coded "out.avi" filename.

Only NTSC resolution is supported at this time.


I used code from the following people/projects in dvtext: