Re: A call for unity

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



Hello,

On Thu, 2001-11-29 at 19:20, Brian J. Murrell wrote:
> > Concerning the recorder, have a look at gstreamer
> > (http://www.gstreamer.net/).
> 
> I did look at it.  I sure do like the idea.  A real "plug together"
> concept that would hopefully be flexible enough to deal with different
> hardware in a single solution.  I could not successfully get it to
> record from v4l and encode into a file though.  Seemed like the v4l
> input plug was just not there yet.

True... The docs are quite clear about it.... "v4lsrc breaks when
looking at it"... I just started all over again.

> > I have some nice ideas based on gstreamer
> > which are pretty much exactly what you're suggesting. If anyone is
> > interested, I can explain a bit (about my ideas and gstreamer in
> > general).
> 
> OK.
> 
> If you were even successful in getting it to capture from a v4l device
> that would be nice to know.

Well, I was. But v4lsrc is still almost-broken :-).

Okay, as you already said, gstreamer is so interesting because of the
pluggable-objects-nature. Or, better said, because of the
componentizized nature. The idea is that, obviously, you have a v4lsrc
(or a v4lmjpegsrc for DC10+-like cards), and a soundsrc (osssrc). DC10+
and suchlike cards are hardware MJPEG grabbers. Maybe linux also has
support for MPEG cards, I don't know, that'd require a v4lmpegsrc.
A you probably guessed, gstreamer is written in glib2, so we can use
object properties here. The idea is that there's a general v4lelement
(this one handles things like overlay, like the X-server's XV/v4l
plugin, and picture settings (VIDIOC[SG]PICT), audio settings
(VIDIOC[SG]AUDIO), and all things like opening, closing the device and
all that. Then, there's a v4lsrc, v4lmjpegsrc, maybe a v4lmpegsrc (if
there's MPEG-encoder card support for linux), all childs of v4lelement.
They handle the specific things for grabbing video. I'm currently
working on these plugins and have them almost finished (I hope). With al
this, you can capture video (while viewing) using only a single open(),
so it'd work even on 2.2 and 2.4 kernels.

Then, we only have video-grabber plugins. We already have sound grabber
pluins (alsasrc, osssrc) so we can now focus on video-grabbing, sync and
all that. The idea is that I (or if anyone wants to help: we) am/are
going to write a library for gstreamer that does exactly this. Based on
such a library, you could write a 100% graphical video-capture-tool.
Which is, imho, much nicer than all these 1/2 man projects which all
produce a console capture tool. Newbies don't want that, newbies need
graphical tools. Anyway, there's more apps doing the same (xawtv, for
example). The real power of gstreamer is that I just need to write an
encoder plugin and I can then capture video and encode it into that
format. This prevents double code and makes a very wide-ranged of
captures possible, ranging from raw YUV capture (no encoder plugin) to
(M)JPEG (jpegenc) to divx (?).

The recording library would basically be responsible for a few things.
First off, it needs to be able to capture sound from *any* sound source
plugin (also sound plugins that it doesn't know of), video from *any*
video source (this prevents having to patch the library if we write new
v4lsrc-kindof-plugins). Then, it can encode this into any format and
save that as a file to the HD or stream it to a network. Secondly, it
needs to do *good* sync handling (doh). Thirdly, it needs to be able to
call the plugins' functions to setup a screen overlay so that it can
function in a similar way to the Xv/v4l plugin.

The next layer would be a GUI which then gives the user options like
which audio source to use, which video source, which target format to
use, etc. This GUI can be both KDE or Gnome based (or whatever). The
rest of the stuff is all glib2 based. If you need it, you can write TV
some other base library for this database handling that everyone talks
about, but that's obviously not gstreamer's job :-).

The good thing about all this is that it's componentizized, so if you
don't like a small part, you rewrite the small part and do't need to
touch the rest. If you need new functionality (like a new encoder), it's
very little work. Gstreamer already has quite some encoder pugins, so
you can capture in many various formats already.

I personally think this is the best way to write a *good* recorder... If
someone thinks I'm very wrong in some way, tell me, I'm open for
suggestions. I hope that, once the v4l plugins are ready, there's some
people willing to help to build a good recording library and GUIs based
on this. That'd be *much* nicer than all these smaller projects that
each do almost the same.

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
-  // \\   | Running: Linux 2.4.14-XFS and OpenBSD 2.8
- /(   )\  | 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