Thanks for the replies Synthetic Soul. mplayer, at least the version I have does not recognize the mp4a stream; I wish it did. As you recommended, I could get it work via a named pipe, but unfortunately it was not real-time, or in other words on the fly. vlc read the stream and wrote it to a named pipe first, then after a TERM signal faad converted it to wav, followed by lame converting it to mp3:
mkfifo test_pipe
cvlc http://xx.xx.xxx.x:8875 --sout '#duplicate{dst=std{access=file,mux=mp4,dst=test_pipe}}'
faad -o - test_pipe|lame -V2 - test.mp3
About the code above, "faad -w" option is really not doing its job, therefore I found this workaround to relay the output to stdout.
The following code seems to make vlc to output to stdout via an unnamed pipe, but then faad cannot read from the stdin:
cvlc http://xx.xx.xxx.x:8875 --sout '#duplicate{dst=std{access=file,mux=mp4,dst=-}}' | faad -o - | lame -V2 - test.mp3
faad returns "Error opening file: -"
Then I tried this:
cvlc http://xx.xx.xxx.x:8875 --sout '#duplicate{dst=std{access=file,mux=mp4,dst=-}}' | faad -o - <- | lame -V2 - test.mp3
It really looked like it was working, with vlc running and no error messages from faad, etc. but no test.mp3 was written at the end. I don't know what failed during the test run.
Part of this is probably because of my inexperience in coding.