Ask a Question related to Ruby, Design and Development.
-
Dennis Oelkers #1
Ruby classes for MP3 de-/encoding
Hello folks,
does anyone know of any Ruby collection of classes / modules for
decoding / encoding (maybe liblame bindings?) MP3 data?
I already looked for that on raa, freshmeat & even google, but
without any luck, so any help would be appreciated ...
Kind regards,
Dennis Oelkers
Dennis Oelkers Guest
-
Encoding in ruby/tk internals
Hello ruby-talk peoples, It seems that something is wrong in ruby/tk libraries: I'm trying to work with cp1251 encoding. Everything works fine,... -
Inheritence Diagram of Ruby classes...
Hello All, Has anyone got, or know of a diagram that shows how the ruby classes are ordered in terms of inheritence? Thanks, Thomas Adam ... -
[ba-rb] BA-rb ( Bay Area Ruby Users Group ) - 'Generating Code in Ruby' by Jack Herrington.
Count me in again, too. -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at... -
[ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge
http://ruby-freedb.rubyforge.org/ http://ruby-serialport.rubyforge.org/ http://ruby-mp3info.rubyforge.org/ bye! --... -
Ruby Character Encoding
Hi, In message "Ruby Character Encoding" on 03/07/15, Mark Wilson <mwilson13@cox.net> writes: |I'm interested in any (i.e., arbitrary)... -
Tom Copeland #2
Re: Ruby classes for MP3 de-/encoding
> does anyone know of any Ruby collection of classes / modules for
Might be something in RubyForge here:> decoding / encoding (maybe liblame bindings?) MP3 data?
>
> I already looked for that on raa, freshmeat & even google, but
> without any luck, so any help would be appreciated ...
[url]http://rubyforge.org/softwaremap/trove_list.php?form_cat=123[/url]
or here:
[url]http://rubyforge.org/projects/ruby-mp3info/[/url]
Yours,
tom
Tom Copeland Guest
-
Matthew Berg #3
Re: Ruby classes for MP3 de-/encoding
On Sat, 2003-11-22 at 13:07, Dennis Oelkers wrote:
How about Ruby/GStreamer, rather than using an mp3 specific solution:> Hello folks,
>
> does anyone know of any Ruby collection of classes / modules for
> decoding / encoding (maybe liblame bindings?) MP3 data?
>
> I already looked for that on raa, freshmeat & even google, but
> without any luck, so any help would be appreciated ...
>
> Kind regards,
> Dennis Oelkers
[url]http://ruby-gnome2.sourceforge.jp/[/url]
You can do metadata extraction with GStreamer as well, though the
bundled bindings for libgstmediainfo can be slow in certain
circumstances. I have the extraction code I've been working on up here
though:
[url]http://www.gothpoodle.com/~galt/info.rb[/url]
This should allow you to read id3 or ogg tags at minimum, and i think
wav riff headers though I haven't tested it on that yet.
Matt
Matthew Berg Guest
-
Dennis Oelkers #4
Re: Ruby classes for MP3 de-/encoding
On Sun, Nov 23, 2003 at 04:03:55AM +0900, Matthew Berg wrote:
Thanks for all your help, but it seems as if you misunderstood my question> You can do metadata extraction with GStreamer as well, though the
> bundled bindings for libgstmediainfo can be slow in certain
> circumstances. I have the extraction code I've been working on up here
> though:
>
> [url]http://www.gothpoodle.com/~galt/info.rb[/url]
>
> This should allow you to read id3 or ogg tags at minimum, and i think
> wav riff headers though I haven't tested it on that yet.
a bit. I'm not looking for classes to extract metadata information, I want
to encode/decode MP3 data.
Kind regards,
Dennis Oelkers
Dennis Oelkers Guest
-
Matthew Berg #5
Re: Ruby classes for MP3 de-/encoding
On Sat, 2003-11-22 at 14:15, Dennis Oelkers wrote:
I think you misunderstood my answer. The metadata stuff was meant to be> On Sun, Nov 23, 2003 at 04:03:55AM +0900, Matthew Berg wrote:>> > You can do metadata extraction with GStreamer as well, though the
> > bundled bindings for libgstmediainfo can be slow in certain
> > circumstances. I have the extraction code I've been working on up here
> > though:
> >
> > [url]http://www.gothpoodle.com/~galt/info.rb[/url]
> >
> > This should allow you to read id3 or ogg tags at minimum, and i think
> > wav riff headers though I haven't tested it on that yet.
> Thanks for all your help, but it seems as if you misunderstood my question
> a bit. I'm not looking for classes to extract metadata information, I want
> to encode/decode MP3 data.
a "you can do this as well" thing. GStreamer is a full multimedia
framework, which *does* do encoding and decoding of mp3 data.
For example, a program to play a music file would look something like
this: (note, this is off the top of my head, I haven't tested it, but if
you need example code there's some up on the Ruby-GNOME2 site and
included with the distribution)
require 'gst'
Gst.init
# element to read a file
src = Gst::ElementFactory.make("filesrc")
# element to decode autodetect and decode formats
spider = Gst::ElementFactory.make("spider")
# element to output to a media decide
sink = Gst::ElementFactory.make("osssink")
# create a pipeline
pipeline = Gst::Pipeline.new
# add the elements
pipeline.add(src, spider, sink)
# link them together
src >> spider >> sink
src.location = ARGV.first
# reset the pipeline and set the state to playing
pipeline.clear
pipeline.play
# keep processing the pipeline until it's finished
while pipeline.iterate do end
exit!
That example will actually handle any supported media type (mp3, ogg,
wav, au, flac, etc), but if you wanted to limit it to mp3 data you could
just use the "mad" element instead of "spider".
Want to output to a file instead? Use a "filesink" element. Want to
reencode to ogg maybe? Put a "oggenc" element before the "filesink".
In other words you can do most anything you want with audio and video
files you'd ever want to do. :)
Matt
Matthew Berg Guest
-
Dennis Oelkers #6
Re: Ruby classes for MP3 de-/encoding
On Sun, Nov 23, 2003 at 05:13:01AM +0900, Matthew Berg wrote:
Seems like I really did! Sorry! :)> I think you misunderstood my answer. The metadata stuff was meant to be
[snip]> a "you can do this as well" thing. GStreamer is a full multimedia
> framework, which *does* do encoding and decoding of mp3 data.
>This is really great. Thank you very much for that hint! I'll try GStreamer> In other words you can do most anything you want with audio and video
> files you'd ever want to do. :)
ASAP :)
Kind regards (and have a nice weekend),
Dennis Oelkers
Dennis Oelkers Guest
-
Phil Tomson #7
Re: Ruby classes for MP3 de-/encoding
In article <20031122191549.GB3071@tachyon.bsdgeek.net>,
Dennis Oelkers <dennis@sgi-powered.de> wrote:I would think this would be very compute intensive (all those dicrete>On Sun, Nov 23, 2003 at 04:03:55AM +0900, Matthew Berg wrote:>>> You can do metadata extraction with GStreamer as well, though the
>> bundled bindings for libgstmediainfo can be slow in certain
>> circumstances. I have the extraction code I've been working on up here
>> though:
>>
>> [url]http://www.gothpoodle.com/~galt/info.rb[/url]
>>
>> This should allow you to read id3 or ogg tags at minimum, and i think
>> wav riff headers though I haven't tested it on that yet.
>Thanks for all your help, but it seems as if you misunderstood my question
>a bit. I'm not looking for classes to extract metadata information, I want
>to encode/decode MP3 data.
>
cosine transforms, which as I recall, are performed would take a lot of
time in Ruby). If you want to do this from Ruby, wouldn't it be best to
find an already existing C library and wrap it to create an extension?
Phil
Phil Tomson Guest
-
Dennis Oelkers #8
Re: Ruby classes for MP3 de-/encoding
On Sun, Nov 23, 2003 at 06:22:16AM +0900, Phil Tomson wrote:
[snip]> In article <20031122191549.GB3071@tachyon.bsdgeek.net>,
> Dennis Oelkers <dennis@sgi-powered.de> wrote:Yes, that's what I was looking for, ruby bindings for a C lib doing MP3>> >Thanks for all your help, but it seems as if you misunderstood my question
> >a bit. I'm not looking for classes to extract metadata information, I want
> >to encode/decode MP3 data.
> >
> I would think this would be very compute intensive (all those dicrete
> cosine transforms, which as I recall, are performed would take a lot of
> time in Ruby). If you want to do this from Ruby, wouldn't it be best to
> find an already existing C library and wrap it to create an extension?
encoding/decoding, but the only thing which is comparable to that is
ruby-gstreamer. I'll evaluate it intensively, if it isn't sufficient for
my task I'll probably write liblame/libwhatever bindings on my own. :(
Kind regards,> Phil
Dennis Oelkers
Dennis Oelkers Guest
-
Michael Granger #9
Re: Ruby classes for MP3 de-/encoding
On Nov 22, 2003, at 2:33 PM, Dennis Oelkers wrote:
I'm working on bindings for libmp3lame. You can see what I have so far> Yes, that's what I was looking for, ruby bindings for a C lib doing MP3
> encoding/decoding, but the only thing which is comparable to that is
> ruby-gstreamer. I'll evaluate it intensively, if it isn't sufficient
> for
> my task I'll probably write liblame/libwhatever bindings on my own. :(
at:
[url]http://dev.faeriemud.org/~deveiant/Lame/[/url]
It's not yet complete, as I haven't yet figured out what a good Rubyish
API should look like, but if you're writing your own, it might be a
good starting point. The current code can create encoders and configure
them, and passes all its tests, but can't encode anything yet. =:)
I'd also welcome help if you're so inclined. I don't have this checked
into CVS yet, but I would do so if you (or anyone else) expressed an
interest in lending a hand.
--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Believer, Architect
The FaerieMUD Consortium <http://www.FaerieMUD.org/>
Michael Granger Guest
-
Sam Roberts #10
Re: Ruby classes for MP3 de-/encoding
Quoteing [email]ged@FaerieMUD.org[/email], on Mon, Nov 24, 2003 at 12:36:11AM +0900:
Why do you say "comparable" to that? Gstreamer is a C lib for doing> On Nov 22, 2003, at 2:33 PM, Dennis Oelkers wrote:
>> >Yes, that's what I was looking for, ruby bindings for a C lib doing MP3
> >encoding/decoding, but the only thing which is comparable to that is
> >ruby-gstreamer. I'll evaluate it intensively, if it isn't sufficient
audio/video encoding/decoding, and ruby-gsteamer is a ruby binding for
it, seems like exactly what you need!
Sam
Sam Roberts Guest
-
Dennis Oelkers #11
Re: Ruby classes for MP3 de-/encoding
On Mon, Nov 24, 2003 at 05:45:59AM +0900, Sam Roberts wrote:
Yes of course, but I was looking for a smaller lib doing only MP3 en-/decoding,> Why do you say "comparable" to that? Gstreamer is a C lib for doing
> audio/video encoding/decoding, and ruby-gsteamer is a ruby binding for
> it, seems like exactly what you need!
not a complete "media framework" like gstream. But in fact after evaluating
gstreamer it seems to be even better for my purpose because it fulfills some
features I was looking for too, and offers possibilites to add extra
functionality to my project I didn't think about before. :)
Kind regards,
Dennis Oelkers
Dennis Oelkers Guest
-
Michael Granger #12
Re: Ruby classes for MP3 de-/encoding
On Nov 23, 2003, at 1:45 PM, Sam Roberts wrote:
Erm... I didn't. I quoted someone else who did.> Quoteing [email]ged@FaerieMUD.org[/email], on Mon, Nov 24, 2003 at 12:36:11AM +0900:>>> On Nov 22, 2003, at 2:33 PM, Dennis Oelkers wrote:
>>>>> Yes, that's what I was looking for, ruby bindings for a C lib doing
>>> MP3
>>> encoding/decoding, but the only thing which is comparable to that is
>>> ruby-gstreamer. I'll evaluate it intensively, if it isn't sufficient
> Why do you say "comparable" to that? Gstreamer is a C lib for doing
> audio/video encoding/decoding, and ruby-gsteamer is a ruby binding for
> it, seems like exactly what you need!
--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Believer, Architect
The FaerieMUD Consortium <http://www.FaerieMUD.org/>
Michael Granger Guest



Reply With Quote

