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:
#!/bin/bash
while (true);
do
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 icecastserver.com 8000 password /mountpoint.ogv
done
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.