LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Piping to multiple processes (which might die)?

[ILUG] Piping to multiple processes (which might die)?

Ronan Cunniffe ronan at cunniffe.net
Tue Jul 30 20:00:50 IST 2002


Hi all,
   I've been doing some video compression from VHS using mjpegtools, and trying
different bitrate/quantisation/algorithm mixes to see what gives best results. 
The whole thing is a three stage pipeline:

  lav2yuv capture.avi | yuvdenoise | mpeg2enc --lots-of-args -o capture.m1v
       (100 mins)       (260 mins)    (236 mins)

The times are cpu time for a particular segment of video.  All compression runs
use the same first two stages - 360 mins.  Obviously, I want to do that once and
send the results to lots of encoding processes.

I did the following:

$ mkfifo f1
$ lav2yuv capture.avi | yuvdenoise | tee f1 | mpeg2enc (blah blah) &
$ cat f1 | mpeg2enc (different blah blah)

And hey! It works!  Until somebody dies!  Yippe... oh.
I could wrap mpeg2enc in a script that detected a death-by-error and catted the
fifo to /dev/null, but has anyone got a better way of doing this?

Oh, and writing the result of the first to stages to disk is not a better way. 
Unless you have a very, very, very big disk. :-)

Ronan





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell