
BASH/Audio gurus, I'm working on a script that I hoped would eliminate the intermediate wav file in the process of converting my wma files to mp3. I created a named pipe with "mkfifo mppipe" (named for mplayer-pipe). What I am trying to do in the script is: WMAFILE=$1 MP3FILE=${WMAFILE%.*}.mp3 WAVFILE=/home/david/music/mppipe lame --preset extreme ${WAVFILE} ${MP3FILE} mplayer -vo null -vc dummy -af resample=44100 -ao pcm:file=${WAVFILE} ${WMAFILE} When running the script like this, lame just hangs waiting on the data and never passes control to mplayer. If I try it the other way around, to start writing to the pipe before calling lame like this: mplayer -vo null -vc dummy -af resample=44100 -ao pcm:file=${WAVFILE} ${WMAFILE} lame --preset extreme ${WAVFILE} ${MP3FILE} Then mplayer just hangs and never starts playing. Doing things without the pipe and just using an intermediate wave file works just fine like this: WMAFILE=$1 MP3FILE=${WMAFILE%.*}.mp3 WAVFILE=/home/david/music/imwave.wav mplayer -vo null -vc dummy -af resample=44100 -ao pcm:file=${WAVFILE} ${WMAFILE} lame --preset extreme ${WAVFILE} ${MP3FILE} mv $WAVFILE ${WMAFILE%.*}.wav I just kept the wave file this time to test..., I can always just delete it, but I thought the pipe would speed things up a bit. So how can I make use of the named pipe to eliminate the wave file? Does the named pipe really buy me anything as far as speed goes, etc.. or should I just use the wave file and delete it? I was hoping to find a way to have mplayer start writing and lame start encoding in parallel. Is this possible, or am I just nuts? Thanks. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org