[FFmpeg-devel] [PATCH] Extend show_pix_fmts() to make it print the input/output support
Stefano Sabatini
stefano.sabatini-lala
Wed Feb 3 21:52:04 CET 2010
On date Wednesday 2010-02-03 02:02:34 +0100, Stefano Sabatini encoded:
> On date Wednesday 2010-02-03 01:31:18 +0100, Michael Niedermayer encoded:
> > On Wed, Feb 03, 2010 at 12:46:30AM +0100, Stefano Sabatini wrote:
> > > On date Saturday 2010-01-30 16:54:08 +0100, Stefano Sabatini encoded:
> > > > Hi, as in subject.
> > > [...]
> > >
> > > Ping.
> >
> > the patch looks hakish but do as you see fit
>
> Yes I have the very same feeling, what about having something on the
> line of -codecs:
>
> Pixel formats:
> FLAGS NAME NB_CHANNELS DEPTH
> I.. = Input conversion supported
> .O. = Output conversion supported
> ..A = Alpha plane
> ------
> IO yuv420p 3 8
> IO yuyv422 1 8
> IO rgb24 3 8
> IO bgr24 3 8
> ...
Like in the attached, output issued:
ffmpeg -pix_fmts
Pixel formats:
I.... = Input supported for conversion
.O... = Output supported for conversion
..H.. = Hardware accelerated format
...P. = Paletted format
....B = Bitstream format
FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL
-----
IO... yuv420p 3 12
IO... yuyv422 3 16
IO... rgb24 3 24
IO... bgr24 3 24
IO... yuv422p 3 16
IO... yuv444p 3 24
IO... yuv410p 3 9
IO... yuv411p 3 12
IO... gray 1 8
IO..B monow 1 1
IO..B monob 1 1
I..P. pal8 1 8
IO... yuvj420p 3 12
IO... yuvj422p 3 16
IO... yuvj444p 3 24
..H.. xvmcmc 0 0
[...]
The output is designed to be easily parsable, that's why I preferred
for example to skip the " " at the beginning and use '.' to fill the
flags sequence.
For example:
# list all the formats supported as input and not as output and their nb of pixels
ffmpeg -pix_fmt list | sed -ne '9,$p' | grep '^I\.' | tr -s " " | cut -d" " -f2,3
I suggested other times to print the header on stderr rather than on
stdout, this would avoid the sed command.
Regards.
--
FFmpeg = Fantastic & Fostering Mean Puritan Enhanced Gargoyle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implement-pix-fmt-lister.patch
Type: text/x-diff
Size: 1718 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100203/6f9ea843/attachment.patch>
More information about the ffmpeg-devel
mailing list