Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Karen Lilly Creations

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 153 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       Many of the MJPEGtools communicate via pipes  and  act  as
       filters  (or  sources or sinks).  The format of video data
       used in the pipes is referred to as "YUV4MPEG",  or,  more
       precisely, "YUV4MPEG2".  (The format was extended and cod­
       ified during v1.5.x of the tools.)

       The basic structure is a  stream  header  followed  by  an
       unlimited number of frames.  Each frame itself consists of
       a header followed by video data.  The headers are  vaguely
       human-readable  ASCII,  but the video data is simple byte-
       size binary.

       The   MJPEGtools   distribution   has    a    C    library
       (libmjpegutils)  which contains functions for manipulating
       YUV4MPEG2 streams.  We recommend that you use this library
       rather  than  writing  your own code if possible.  See the
       header file "yuv4mpeg.h" for a description of these  func­

       Design Goals:

       o      Easy to parse both via C or sh.

       o      Extensible;  easy to add new parameters while main­
              taining backwards compatibility.

       o      Simple upgrade from original "YUV4MPEG" format.


       o      Frame headers do not have constant size, so streams
              are not seekable.


       The precise description of the the YUV4MPEG2 stream format
       is as follows:

       STREAM consists of

       -  one STREAM-HEADER

       -  unlimited number of FRAMEs

       STREAM-HEADER consists of

       -  magic string "YUV4MPEG2"

       FRAME-HEADER consists of

       -  magic string "FRAME"

       -  unlimited  number of TAGGED-FIELDs, each preceeded by a
          ' ' (single space) separator

       -  single '\n' line terminator

       TAGGED-FIELD consists of

       -  single ASCII character tag

       -  VALUE (which does not contain whitespace)

       VALUE consists of

       -  RATIO, or

       -  integer (base 10 ASCII representation), or

       -  single ascii character, or

       -  string (multiple ASCII characters)

       RATIO consists of

       -  numerator (base 10 ASCII integer)

       -  ':' (a colon)

       -  denominator (base 10 ASCII integer)

       The supported tags for the STREAM-HEADER:

              W - [integer] frame width in pixels, must  be  >  0

              H - [integer]  frame  height in pixels, must be > 0

              I - [char] interlacing specification:
                      p - progressive (none)
                      t - top-field-first
                      b - bottom-field-first
                      ? - unknown

              F - [ratio] frame-rate, 0:0 == unknown

       optional,  and  the  absence  of  a tag indicates that the
       parameter is unknown.

       Note that a filter application must faithfully forward all
       "X"  tags  from  input pipe to output pipe (unless it uses
       one of those tags, of course).  The supplied library  will
       do     this     automatically     if     the     functions
       y4m_copy_stream_info() and y4m_copy_frame_info() are  used


       Currently  only  planar, 4:2:0-subsampled CCIR-601, Y'CbCr
       image data is supported.   This  consists  of,  one  after

       -  (height X width)  octets (8-bit bytes) of Y' samples in
          row-major order;

       -  (height X width / 4) octets of Cb samples;

       -  (height X width / 4) octets of Cr samples.

       Sample siting (for the subsampling of the  chroma  planes)
       is not specified.  (Not yet, at least.)


       mjpegtools(1), yuv4mpeg.h


       This manual page Copyright 2002 Matthew J. Marjanovic.

MJPEG Linux Square       25 November 2002             yuv4mpeg(5)

An undefined database error occurred. SELECT distinct pages.pagepath,pages.pageid FROM pages, page2command WHERE pages.pageid = page2command.pageid AND commandid =




Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.11 Seconds