Hi Martin, The output from the help of ppmtoy4m is appearing on stderr not stdout. You will need to redirect stderr through your pipe. Depending on what shell you are using this is done in different ways.
tcsh: ppmtoy4m -h | grep 420mpeg2 |& wc -l bash: ppmtoy4m -h | grep 420mpeg2 2>&1 | wc -l Have a search for redirecting stderr for which shell you are using on how to redirect stderr. Mark On 06/12/2007, at 8:08 AM, Martin Gansser wrote: > hi, > > i tried to figure out, if ppmtoy4m have the option 420mpeg2, but this > fails with newer mjpegtools version. > > > with mjpegtools-1.8.0: > > # ppmtoy4m -h|grep 420mpeg2|wc -l > > the result is 1, thats ok, but with mjpegtools-1.9.0rc2 and > mjpegtools-1.9.0rc3 > it's no longer possible to get an integer result. > > # ppmtoy4m -h|grep 420mpeg2|wc -l > > usage: ppmtoy4m [options] [ppm-file] > > Reads RAW PPM image(s), and produces YUV4MPEG2 stream on stdout. > Converts computer graphics R'G'B' colorspace to digital video Y'CbCr, > and performs chroma subsampling. > > If 'ppm-file' is not specified, reads from stdin. > > options: (defaults specified in []) > > -o n frame offset (skip n input frames) [0] > -n n frame count (output n frames; 0 == all of them) [0] > -F n:d framerate [30000:1001 = NTSC] > -A w:h pixel aspect ratio [1:1] > -I x interlacing [p] > p = none/progressive > t = top-field-first > b = bottom-field-first > -L treat PPM images as 2-field interleaved > -r repeat last input frame > -S mode chroma subsampling mode [444] > '420jpeg' -> 4:2:0 JPEG/MPEG-1 (interstitial) > '420mpeg2' -> 4:2:0 MPEG-2 (horiz. cositing) > '444' -> 4:4:4 (no subsampling) > -v n verbosity (0,1,2) [1] > -B PPM image is packed with BGR pixels [RGB] > 0 > > thanks Martin > > > > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > Mjpeg-users mailing list > Mjpeg-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mjpeg-users “What if Microsoft had designed Windows Vista.” ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Mjpeg-users mailing list Mjpeg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mjpeg-users