[Ffmpeg-devel] video4linux2 input format?

matthieu castet castet.matthieu
Fri Jan 27 13:21:01 CET 2006


Hi,

Michael Niedermayer wrote:
> Hi
> 
> On Thu, Jan 26, 2006 at 12:31:56PM +0100, Luca Abeni wrote:
> 
>>On Wed, 2006-01-25 at 14:48 +0100, Luca Abeni wrote:
>>[...]
>>
>>>Is anyone already working on it? If not, I'll start implementing
>>>video4linux2 support today
>>
>>Ok, I now have some semi-working code (it can grab YUV video from a BTTV
>>card in mmap mode), and I'll send it on the mailing list today...
>>
>>But now I need some help for mapping the v4l2 pixel format names in the
>>ffmpeg ones.
>>V4L2 defines the following pixel formats:
> 
> [...]
> 
>>Can anyone help me in mapping the other V4L2_PIX_FMT to the equivalent
>>PIX_FMT?
> 
> 
> ok, assuming http://v4l2spec.bytesex.org is correct, even though it itself
> says some drivers interpret things differently ...
> and assuming i didnt make a mistake
> 
 From the source (2.6.15 include/linux/videodev2.h), there is others 
possibles formats :


/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
#define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B','A','8','1') /*  8  BGBG.. 
GRGR.. */

/* compressed formats */
#define V4L2_PIX_FMT_MJPEG    v4l2_fourcc('M','J','P','G') /* 
Motion-JPEG   */
#define V4L2_PIX_FMT_JPEG     v4l2_fourcc('J','P','E','G') /* JFIF JPEG 
     */
#define V4L2_PIX_FMT_DV       v4l2_fourcc('d','v','s','d') /* 1394 
     */
#define V4L2_PIX_FMT_MPEG     v4l2_fourcc('M','P','E','G') /* MPEG 
     */

/*  Vendor-specific formats   */
#define V4L2_PIX_FMT_WNVA     v4l2_fourcc('W','N','V','A') /* Winnov hw 
compress */
#define V4L2_PIX_FMT_SN9C10X  v4l2_fourcc('S','9','1','0') /* SN9C10x 
compression */
#define V4L2_PIX_FMT_PWC1     v4l2_fourcc('P','W','C','1') /* pwc older 
webcam */
#define V4L2_PIX_FMT_PWC2     v4l2_fourcc('P','W','C','2') /* pwc newer 
webcam */

Matthieu

PS :
#define V4L2_PIX_FMT_YYUV    v4l2_fourcc('Y','Y','U','V') /* 16  YUV 
4:2:2     */
#define V4L2_PIX_FMT_HI240   v4l2_fourcc('H','I','2','4') /*  8  8-bit 
color   */





More information about the ffmpeg-devel mailing list