Mpg123


(Tobi Reif) #1

Hi,

did anyone write a GUI frontend or a scripting API for mpg123?

Tobi

···


http://www.pinkjuice.com/


(Evan Martin) #2

There’s a Ruby wrapper for libvorbis, which does ogg files (check the
RAA).

There’s an MP3 library called “mp3hip” that has a similar API as
libvorbis. It shouldn’t be too hard to write a wrapper for it,
especially if you refer to the libvorbis wrapper.

(But to answer your question: I don’t know of any in particular, but I
bet there are a lot-- check http://savannah.gnu.org/project/ms, I think
they use mpg123.)

···

On Sat, Jun 15, 2002 at 08:35:10AM +0900, Tobias Reif wrote:

did anyone write a GUI frontend or a scripting API for mpg123?


Evan Martin
martine@cs.washington.edu
http://neugierig.org


(Nobuyoshi Nakada) #3

Hi,

···

At Sat, 15 Jun 2002 08:35:10 +0900, Tobias Reif wrote:

did anyone write a GUI frontend or a scripting API for mpg123?

There is a curses frontend, but I don’t know about GUI one.
http://www.ruby-lang.org/en/raa-list.rhtml?name=RMP3


Nobu Nakada


(Magnus Engström) #4

Don’t know if you have any use for it, but I wrote an MP3-server with
playlist capabilites that uses the -R switch in mpg123 to control it.
The -R switch activates a sort of control mode for mpg123.
You can find the project at http://mp3control.sourceforge.net.

/Magnus

···

On Fri, 2002-06-14 at 23:35, Tobias Reif wrote:

Hi,

did anyone write a GUI frontend or a scripting API for mpg123?

Tobi


http://www.pinkjuice.com/


(Lars Christensen) #5

Sorry for the slow response, I’m just catching up. I wrote this for
mpg321 (which has a better decoder than mpg123, imho):

require ‘open3’

class MP3Player
attr_reader :mode
attr_reader :mp3info
attr_reader :current_frame, :frames_remaining, :current_time, :time_remaining

def initialize
@mode = :stopped
@done_callback = nil
@cmdwrite, cmdread, @err = Open3.popen3(“mpg321 -R nil”)
Thread.start {
cmdread.each_line { |ln|
case ln.chomp
when /^@P 0$/
@mode = :stopped
@current_frame = nil
@done_callback.call if @done_callback
when /^@P 1$/
@mode = :paused
when /^@P 2$/
@mode = :playing
when /^@S (.*)$/
@mp3info = $1
when /^@F\s+(\d+)\s+([-\d]+)\s+([\d.]+)\s+([-\d.]+)/
@mode = :playing
@current_frame = $1.to_i
@frames_remaining = $2.to_i
@current_time = $3.to_f
@time_remaining = $4.to_f
else
$stderr.puts ln
end
}
}
end

def on_end_of_file(&block)
@done_callback = block
end

def play(filename)
@cmdwrite.puts "LOAD #{filename}"
end

def seek(frame)
@cmdwrite.puts "JUMP #{frame}"
end

def status
@mode.to_s + @mp3info.to_s
end

def shutdown
@cmdwrite.puts "QUIT"
end

end

···

On Sat, Jun 15, 2002 at 08:35:10AM +0900, Tobias Reif wrote:

did anyone write a GUI frontend or a scripting API for mpg123?


Lars Christensen


(Tobi Reif) #6

Evan Martin wrote:

I don’t know of any in particular, but I
bet there are a lot–

… in Ruby?

check http://savannah.gnu.org/project/ms, I think
they use mpg123.

404 :expressionless:

Tobi

···


http://www.pinkjuice.com/


(Tobi Reif) #7

Thanks Nobu.

I think that’s a project idea for Ruby GUI skin sound wizards :slight_smile:

Tobi

···

nobu.nokada@softhome.net wrote:

There is a curses frontend, but I don’t know about GUI one.
http://www.ruby-lang.org/en/raa-list.rhtml?name=RMP3


http://www.pinkjuice.com/


(Thomas A. Reilly) #8

Would anyone know how to port Ruby and TK to the Sharp Zarus?
The processor is fast and with memory cards will support over 128 megs.

Thanks


(Joe "piman" Wreschnig) #9

Evan Martin wrote:

I don’t know of any in particular, but I
bet there are a lot–
… in Ruby?

Well, I think I wrote it in Ruby. :slight_smile:

check http://savannah.gnu.org/project/ms, I think
they use mpg123.
404 :expressionless:

http://savannah.gnu.org/projects/ms - check the CVS tree, the file
you want is msd/ms/mp3/server.rb. It’s currently in the MS module
namespace, but that’s easily fixable.

Note that there may also be a bug with mpg321 (a free close of
mpg123); see my question about weird FIFO behavior from several
days ago.

···

On Sat, Jun 15, 2002 at 05:46:46PM +0900, Tobias Reif wrote:


(Tobi Reif) #10

Thomas A. Reilly wrote:

Would anyone know how to port Ruby and TK to the Sharp Zarus?
The processor is fast and with memory cards will support over 128 megs.

It’s Linux, so shouldn’t be able to compile Ruby on it?

Tobi

···


http://www.pinkjuice.com/


(Tobi Reif) #11

Joe “piman” Wreschnig wrote:

http://savannah.gnu.org/projects/ms

does it have a GUI?

Tobi

···


http://www.pinkjuice.com/


(Henry So Jr.) #12

I tried to cross-compile Ruby using the available tools, but I ran into
some difficulty because the build process compiles miniruby and uses
that during the build process. Since I was cross-compiling, the
miniruby that is created will not run on the build host. I was able to
get around that (sort-of) by compiling Ruby for the build host and
keeping that on the path. However since the architectures are not
exactly the same, there were still some problems, especially compiling
the extensions.

There are other things which I haven’t had time to try yet; like a
phased approach where I compile the base ruby, get it onto the Zaurus,
and then create the extension Makefiles on the Zaurus; or even perhaps
getting GCC onto the Zaurus (which is availble) and then compiling Ruby
directly on the hardware.

Also, there is an .ipk of Ruby 1.6.5 available with the Familiar
distribution (apparently converted from the Debian-ARM distribution) but
I haven’t tried it.

Henry

···

On Sat, Jun 15, 2002 at 11:34:53PM +0900, Tobias Reif wrote:

Thomas A. Reilly wrote:

Would anyone know how to port Ruby and TK to the Sharp Zarus?
The processor is fast and with memory cards will support over 128 megs.

It’s Linux, so shouldn’t be able to compile Ruby on it?

Tobi


Henry T. So, Jr.


(Joe "piman" Wreschnig) #13

No; that’s just the API.

···

On Wed, Jun 19, 2002 at 01:56:23AM +0900, Tobias Reif wrote:

does it have a GUI?


(Paul Duncan) #14

Thomas A. Reilly wrote:

Would anyone know how to port Ruby and TK to the Sharp Zarus?
The processor is fast and with memory cards will support over 128 megs.

It’s Linux, so shouldn’t be able to compile Ruby on it?

You can, but you don’t need to:
http://familiar.handhelds.org/feeds/unstable/ruby_1.6.5-1_arm.ipk

I’ve tested it with some small scripts on my iPaq and it appears to work
fine. As for Tk, there is a port out there, but you’ll need to install
and configure Xfb. I don’t know of any efforts to write a Tk to
QT/Embedded interface, but I haven’t looked very hard either ;).

Tobi

[snipped]

Also, there is an .ipk of Ruby 1.6.5 available with the Familiar
distribution (apparently converted from the Debian-ARM distribution) but
I haven’t tried it.

Seems to work okay for me.

···

On Sat, Jun 15, 2002 at 11:34:53PM +0900, Tobias Reif wrote:

Henry


Henry T. So, Jr.


Paul Duncan pabs@pablotron.org pabs in #gah (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562


(Thomas A. Reilly) #15

Thanks a lot. I found the site on the net and can’t wait to try out ruby
on the zarus.