Skip to Content.
Sympa Menu

baslinux - Re: [BL] MPlayer

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: "David Moberg" <davidjmoberg AT lycos.com>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] MPlayer
  • Date: Sun, 08 May 2005 20:05:44 -0500

----- Original Message -----
From: "sindi keesan" <keesan AT sdf.lonestar.org>

> > What does "jobs" say?
>
> Nothing. which jobs - no jobs in .......
> What is jobs?

jobs, like fg, is built into the shell. The ash manpage
should be able to tell you more about it than I can.

> If I remove the & and everything following it, your method works:
>
> mkfifo audiodump.wav
> mplayer -ao pcm http: (or pnm: etc.) WITHOUT & or fg
> switch vt's
> play audiodump.wav - the file is 4096 not 0 now and stays that size.
>
>
> I probably misunderstood very clear directions for use and left in the &.
> If I type Ctrl-Z mplayer stops doing anything, fg brings it back.

Normal.

> Play audiodump.wav & does not play either, works without the &.
> If I start running out of terminals I will use 'screen' to make ten
> terminals out of one.

Keep reading for a script which will work with just one terminal,
and greatly simplify what you need to type.

> I am getting lovely sound quality from wdav now. I have only a 4K
> .wav file but no skips. It sounds far better than the radio.
> Mplayer said something about a cache - maybe that is acting to
> buffer the file before it gets into the .wav file. Player is
> telling me
> A: 6:52.3 (time elapsed) 3% 15%
> The 3% went down to 2.9% and the 15 alternates with 16 and 17.

You can use the -cache option to change the size of the buffer.
e.g. mplayer -ao pcm -cache 8192

> On a previous occasion the middle figure was 92% and rising - is
> this something to do with buffering or lost clusters? You did not
> include docs for mplayer.

I included the manpage in the package. Both the regular one (if you
have man on BL2) and a version that works on regular BL3.

> ps now tells me there are five copies of mplayer running.
>
> I killed them all and started over, and after I started playing I
> again have five copies running. Sizes about 8K, three are State T
> and two state S. I have one copy of sox and none of mpg123 or
> play. The same process numbers keep coming back except for the
> last two copies of mplayer.
>
> The second to last is taking up 3% of cpu and the others 0%, but
> they are all taking up about 1-1.5% of memory.
>
> If I kill the first three it keeps playing. If it kill the fourth
> it stops. The fourth is the one at the top of the list in 'top'.
> What are the others doing?

I think this is a scheme to improve performance. Certain CPU features
(for example, SMP, HyperThreading, MMX) can greatly improve performance
if a program is split into several threads or processes. (Mozilla does
the same thing.) Likely, one thread handles networking, another audio
output, another handles the status output. The fourth is probably the
master process (or "parent"), so killing it also kills the child
processes.

> Sox is using 1.3% of cpu and 0.4 % of memory. What else besides
> compiling and gzipping uses more cpu? Image manipulation?

Try playing a DVD on a framebuffer with anything slower than a P4
and watch the CPU usage climb to 100%. Or try mp3 decoding on a 386
or slow 486.

> For some reason this 200MHz computer (which I think came with this
> cpu in the board, set to its maximum speed of 200MHz), is
> identified by mplayer as AMD K6 324.0 MHz (Family: 5, Stepping; 2).
> dmesg tells me the computer has a 200461 KHz processor. I think
> the cpu was also labelled that way, or we looked up its number to
> get the speed.

The two CPU models may share the Family and Stepping codes.

> A friend says the 300 and 350 MHz AMD cpus, even in a super socket
> 7, are i686 and ought to work with your first mplayer and that any
> board which can go over 233 MHz is 686.

I think that the Pentium MMX 266 and lower are merely i586. I know
that all other Intels 233 or higher are 686s.

> Perhaps you live in Australia?

No, NW Oregon. Quite a ways from Australia.

I've figured out that MPlayer only needs the fg junk if it is sent
to the background. Sox doesn't have this problem. So, here is the
updated script:

#!/bin/sh
mkfifo /tmp/audiodump.wav
play /tmp/audiodump.wav &
exec real_mplayer -ao pcm -aofile /tmp/audiodump.wav "$@"

# End of script

See the real_mplayer? I think that for convenience you may want to
rename /usr/local/bin/mplayer to /usr/local/bin/real_mplayer, then
put the above script into /usr/local/bin/mplayer. chmod +x. You
should then be able to merely run:

mplayer http://www.foobar.com/radio/music.mp3

and get sound. You can also add options directly to the command
line, since I used the "$@" tag. All you need is a writable /tmp
directory to put the audiodump file in.

> My question was, why someone would broadcast in MP3 and also OGG -
> does OGG have some advantage, better compression or something?

I answered your second question and completely neglected the first
one. Oggs sound better to my ears, all else being equal. Also,
don't forget the patent issues with MP3. Not everyone wants to
deal with those.

> So mplayer can't handle this realplayer format for some reason. What
> is afm?

Audio File (or Format) Manager?

> I presume it looks for three variants by name and then by
> number. Is this something I can add later or must it be compiled in?

It may need the binary codecs from the MPlayer website. The Linux ones
should work on a PC with my MPlayer binary. Setup may be a bit tricky.

David
--
_______________________________________________
NEW! Lycos Dating Search. The only place to search multiple dating sites at
once.
http://datingsearch.lycos.com





Archive powered by MHonArc 2.6.24.

Top of Page