[gst-devel] LAME encoder plugin

Erik Walthinsen omega at cse.ogi.edu
Tue Dec 12 10:48:14 CET 2000


I just wrote a basic LAME plugin.  It requires a reasonably recent version
of LAME be installed, which provides libmp3lame.so and lame.h (I'm going
to ask that they rename that file to match the library name...).

It's currently capable of CBR only, but only because I haven't added the
args for all the options.  Once again, someone has realized that a library
is the way to go, and while the library interface is a bit interesting, it
works sufficiently.  The only worry is how on earth VBR is going to work.

As of now, tests/rip.c is capable ripping an audio CD straight to mp3:

./rip output.mp3 750

That rips 10 seconds (75 frames/sec) to the output.mp3 file.  You have to
go into the source to change the bitrate for the moment, and that's all
you can change.  Tomorrow that will all get fleshed out.

Now, if you've been paying attention, you're probably wondering what I'm
doing with cdparanoia and lame.  They are a decent (albeit limitted) test
of the in-development caps system.  cdparanoia will always output 44.1KHz
16bit stereo interleaved.  LAME can take quite a range of input formats.
When the two elements are connected, they should do some negotiation to
find a shared format, at which point cdparanoia imposes its only format on
LAME.

The trick is that LAME then has to set some internal state before it can
do anything.  That's a black box, I don't know what all it's doing, but it
has to be done before any data flows.

Also, I have a bit of an ulterior motive: I'm attempting to rip/encode my
sister's CD collection, and while my new 80GB drives help, it's still
painful.  The closer I can get to doing this stuff with GStreamer, the
better off I am.

         Erik Walthinsen <omega at cse.ogi.edu> - Staff Programmer @ OGI
        Quasar project - http://www.cse.ogi.edu/DISC/projects/quasar/
   Video4Linux Two drivers and stuff - http://www.cse.ogi.edu/~omega/v4l2/
        __
       /  \             SEUL: Simple End-User Linux - http://www.seul.org/
      |    | M E G A           Helping Linux become THE choice
      _\  /_                          for the home or office user




More information about the gstreamer-devel mailing list