Today I had the terrible idea of a circular bash pipe. Turns out, you can do this easily with fifos. Here's a simple yes-like program done with a circular pipe, to demonstrate:
echo "y" | cat - fifo | tee fifo
You may now return to your regularly scheduled sanity.
Thursday, June 18, 2009
Monday, June 8, 2009
save a stream with mplayer
Neat little trick I learned today. If you have a stream that mplayer can play and you want to save it to a file for later use, this will do the trick:
mplayer "some_stream" -ao pcm:file=file.wav
that produces a raw WAV file, which you can then convert to the format of your preference with other tools like ffmpeg.
mplayer
that produces a raw WAV file, which you can then convert to the format of your preference with other tools like ffmpeg.
Subscribe to:
Posts (Atom)
