[FFmpeg-devel] [PATCH] List supported pixel formats

Stefano Sabatini stefano.sabatini-lala
Fri May 25 17:46:35 CEST 2007

Hi dear ffmpeg developers.

This patch is based on a patch recently posted by Panagiotis (see
"List compiled in codecs"), and applies the same functionality and
interface to -pix_fmt.

In order to get ffmpeg able to list the pixel formats the patch does what follows:

* move the PixFmtInfo structure definition from
  libavcodec/imgconvert.c to libavcodec/avcodec.h

* declare as extern in avcodec.h the structure pix_fmt_info containing
  all the pixel formats infos.

* create a list_pix_fmt function in ffmpeg.c and update the
  documentation string.

* update doc/ffmpeg-doc.texi

The pixel formats list is showed up with:
ffmpeg -pix_fmt list

Suggested commit log message:
"Add support for listing the supported pixel formats using the option
-pix_fmt list"

If this is OK, the same thing could be done for other options as well
(e.g. sizes, formats, codecs (Panagiotis patch), protocols,
sws_flags), thus supporting shell completion facilities, and
eventually replace the -formats option with a more general -list
<something> option.

Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-pix-fmt-00.patch
Type: text/x-diff
Size: 4338 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070525/ad76162d/attachment.patch>

More information about the ffmpeg-devel mailing list