Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bash script that is using anonymous pipes to achieve:

  • grabbing video from dv capture device
  • writing to a file (using tee)
  • piping it to ffmpeg2theora (converting to ogv/theora video)
  • writing to a file (using tee)
  • piping it to oggfwd in order to send it to icecast streaming server

How could I achieve that using named pipes (fifos), so that I could have separate processes that I could separately control?

I was using this script:

 while (true); 
    dvgrab --format dv1 - | \
    tee /filename_`date +%y%m%d_%H%M%S`.dv | \
    ffmpeg2theora.linux -f dv -x 382 -y 288 -v 3 --speedlevel 2 --no-skeleton -o /dev/stdout - | \
    tee /filename_`date +%y%m%d_%H%M%S`_stream_382x288.ogv | \
    oggfwd 8000 password /mountpoint.ogv

One of the reasons I'm asking this is that I need to have clean dv files and ogv files on disk regardless if the network is up and icecast streaming server reachable.

share|improve this question

You can probably do this with ordinary files if your don't need any concurrency at all. The principle for named pipes is the same


foo | \
bar | \


foo > foo.out
bar < foo.out > bar.out
baz < bar.out

If the *.out are named pipes then I suspect the programs writing to them may get blocked waiting for their output buffers to be drained.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.