No description, website, or topics provided.
C Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


MPIPE is a command line utility for UNIX systems which reads from STDIN or file and writes to STDOUT, while allowing queuing data in a memory buffer in the event STDOUT is blocking. The utility helps avoid blocking STDIN.


mpipe 10 /dev/video_capture01 | ffmpeg
curl -d "track=obama" "" | mpipe 10 | <reading process>

Why mpipe?

Whether you are reading from an audio or video device, or a fast moving web stream, there are many cases where the input can not be blocked without causing the read to eventually fail out, by using mpipe, you allow FIFO queuing in memory to avoid blocking STDIN if the consuming process jams up momentarily. The consuming process could temporarily jam due to environment reasons like context switching, disk usage by other processes, or heavy processing required to start up the consumer.

Why not just pipe?

The command line pipe is a similar construct but on modern Linux systems is restricted to 64K. When the 64K FIFO queue is full, writing into the pipe becomes blocked.


mpipe <buffer size in megabytes> [filename];


Bill Darrow
SnappyTV ( inc)


mpipe is available under the GNU GPL v3