SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

dvtext 0.1 - render DV movies of titles and scrolling credits Copyright (c) 2004 David Simmons
http://davidsimmons.com/soft/dvtext/


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.

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 this page:

    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 this page:

    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:

-----%< example-title.dvt %<-----
!font FreeSansBold.ttf
!type title
!pointsize 48
!ypos 200
Example Title
!pointsize 32
!ypos 300
by David Simmons
-----%< example-title.dvt %<-----

dvtext understands the following directives:

        !type
                Specifies the type of effect to render.
                Currently supported types are "title" and "scroll".

        !font
                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.

        !pointsize
                Specifies the point size to use when rendering the
                text.  This directive affects any subsequent text,
                and may be repeated as needed.

        !ypos
                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.

Bugs

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.

Acknowledgments

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

        The FreeType Project
        http://www.freetype.org/

        Quasar DV Codec: libdv
        Oregon Graduate Institute of Science and Technology
        http://libdv.sourceforge.net/

        transcode
        Thomas Oestreich
        Rainer Johanni (avilib)
        http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/

        Free UCS Outline Fonts (for the included "FreeSansBold.ttf" font)
        http://www.nongnu.org/freefont/


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.