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

Re: mpg123 playing to both file and speakers (stdout)



On Wed, May 15, 2002 at 10:09:33PM -0500, Lance Hoffmeyer wrote:
> > mpg123 file.mpg --cdr /dev/stdout | tee file.cdr | programm-to-handle-cdr </dev/stdin, if appropriate>
> 
> OK, changing things up a bit:
> 
> mpg123 --wav - file.mpg | tee file.wav | wavp /dev/stdin
> 
> appears to record a wav file but it will not play.  In addition,
> not sound comes from the speaker while processing the commands.

you can still start two running processes of mpg123. with '&' you can
but a job into background and start the next (in the sense of shell
scripting)

so, try the following:

mpg123 -q file.mpg & mpg123 --wav - file.mpg | tee file.wav | wavp /dev/stdin

this first play the file and suppress the output so it doesn't fill up
your screen. with '&' the job get's into the background, but is still
running. if a program doesn't support this option, redirect the output
to /dev/null. the rest behind the '&' is as you now.

well this is not exactly what you want. i guess you want one instance of
mpg123 to do two jobs at once, but it should work too. if file.mpg is
opened read-only, you shouldn't have problems with the above solution.

if it works', try to put it into a shell script. if you need a tutorial
about this topic, let me know.


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: