On Sun, 2005-04-17 at 19:22 -0700, c m wrote: > --- Punit Ahluwalia <punit_a@yahoo.com> wrote: > > Is there a way to convert real player format to mp3 > > or wav? > > > > Wav is easiest > > mplayer -ao pcm:file=file.wav source > > here is a script which uses > mplayer and external program lame to encode a mp3 > from source > > #!/bin/bash > FIFO="MYFIFO" > PLAYER="mplayer" > ENCODER="lame" > PLAYER_LOC=`which $PLAYER` > ENCODER_LOC=`which $ENCODER` > PLAYER_OPTS="-ao pcm:file="$FIFO" -vo null -vc dummy " > ENCODER_OPTS="" > > if [ $# -ne 2 ]; then > echo "Usage: "$0" <source> <out filename>" > exit 1 > fi > > if [ ${#PLAYER_LOC} -eq 0 ]; then > echo "This requires "$PLAYER" be present in your > path" > exit 1 > fi > > if [ ${#ENCODER_LOC} -eq 0 ]; then > echo "This requires "$ENCODER" be present in your > path" > exit 1 > fi > > if [ ! -f $FIFO ]; then > mkfifo $FIFO > else > echo "FIFO "$FIFO" already exists. Exiting" > exit 1 > fi > > $PLAYER $PLAYER_OPTS ${1} & > $ENCODER $ENCODER_OPTS $FIFO ${2} > rm $FIFO Interesting. But that's only for audio files. Will something like it also work on video files? -- ----------------------------------------------------------------- Ron Johnson, Jr. Jefferson, LA USA PGP Key ID 8834C06B I prefer encrypted mail. "I won't say that the papers misquote me, but I sometimes wonder where Christianity would be today if some of those reporters had been Matthew, Mark, Luke and John." Senator Barry Goldwater (R-AZ)
Attachment:
signature.asc
Description: This is a digitally signed message part