Re: hardware/software suggestions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Mark,

Op za 17-08-2002, om 03:17 schreef Mark Hazen:
>  5. I'm not too daft... I'm very comfy building kernels, doing basic 
>     C programming (that's basic as in "not guru level", not BASIC as
>     in "10 PRINT 'HELLO WORLD'") and heavier programming in other
>     languages, and I know hardware, OS'es and software pretty well.
>     In other words, I don't need a "1. red wire into red plug" set
>     of instructions :)

That's a good thing - you'll probably need some of it. ;-).

> Basically put, I want to overlay (using an alpha-channel or chromakey) 
> graphics I generate under Linux on top of video.
[..]
>  [ SVHS (preferred) ]    [ Some device ]    [ SVHS or other ]
>  [   Composite, or  ]===\[  or method  ]===\[ video signal  ]
>  [   analog video   ]===/[ to overlay  ]===/[ output to my  ]
>  [      signal      ]    [   graphics  ]    [  television   ]

Most standard v4l/v4l2-supported cards will do for the input video
signal. I think you should take video input and output separately here.
For input, a cheap BT8x8 card would do. You could also go for the
somewhat better-quality SAA7134-based cards (drivers on
http://bytesex.org/), but that's probably more handwork to get going
and, a problem, it's only v4l2 (afaik). v4l1 is supported via some kind
of backwards compatibility thing module, but I don't know how good it
is. Maybe others know better. Anyway, such cards would do.

The overlay thingy is probably easy to program. Simply make sure that
you capture in a format that's the same as in which your image appears.
Blitting ('keying'?) this overlay on the video image is as easy as that,
there's already some software that does this, you could simply copy the
code. The principle is as easy as 'take pixel from frame 1 and two and
do N*frame1->pixel(x,y) + (1-N)*frame2->pixel(x,y) where N is the alpha
channel in 0.0-1.0 units. You probably get the idea. Software that does
this is, for example, mjpegtools' matteblend.flt, sources are in CVS (at
sourceforge), project 'mjpeg', mjpeg_play module, directory lavtools/,
file matteblend.flt.c.

Playback can be done using a graphics card that has TV-out. Some of
Matrox' cards, e.g. the Matrox G400, have this. It simply behaves as a
second monitor (i configured like that, it can also be a clone of
monitor 1 or whatever), so playing back the video frame fullscreen there
should play it back to TV. Playback can be accomplished using something
simple as SDL. You could also use framebuffer playback or anything that
comes to mind.

Okay, last thing, programming. The question arises whether you want to
invent the wheel *again*, as in creating the full application to do this
yourself. ;-). You could consider using gstreamer for your project.
gstreamer is a library for creating media pipelines. You could, for
example, use a video4linux gstreamer element ('v4lsrc'), and the sdl
video playback element ('sdlvideosink'), which would be part 1 and
three. Gstreamer also has some other playback modules, you're not
limited to SDL. :-). Then, you'd only have to write the second element
yourself. Writing gstreamer plugins is not hard, it just requires some
getting-used-to. Feel free to come around on #gstreamer on
irc.openprojects.net and ask around about this. It should be pretty
easy, the pipeline v4lsrc -> sdlvideosink works, so putting an extra
element in between should make your life a fluent paradise of
your-server-just-crashed or you-got-mail(r)(tm) messages. The best thing
is that you don't have to make all kind of v4l things yourself but you
can use the elements that we've created and that are known to work
pretty good. :-).
Documentation for writing this second element can be found in the
developers/documentation corner on http://www.gstreamer.net/.

>  6. I'd like to be able to do this with a maximum of $200 or so spent
>     on new video hardware. If I can't,how cheap could I get away with?

I don't know how expensive these Matrox or BT8x8 cards are. ;-).

Goodluck with your project!

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
-  // \\   | Running: Linux-2.4.18-3 and OpenBSD 3.0
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux