On Sun, Nov 16, 2014 at 12:05 AM, Luca Barbato <[email protected]> wrote:

> On 15/11/14 23:55, Joan Charmant wrote:
> > Hello
> >
> > I have an input stream in GRAY8 color space (also called Y800, Y8 or GREY
> > elsewhere) that I would like to encode to MJPEG (inside MP4).
> >
> > In my understanding there is no technical limitation for an MJPEG encoder
> > to directly compress GRAY8 samples. The JPEG standard allows it and the
> > libjpeg-turbo that I considered earlier can take these samples directly.
> > Since I have samples coming in grayscale, I would have liked to avoid an
> > unnecessary color space conversion and probable suboptimal compression
> > speed and ratio.
> >
> > However, when I try to open the MJPEG encoder having specified
> > AV_PIX_FMT_GRAY8 as pixel format, it fails with -1. It works fine when
> > specifying AV_PIX_FMT_YUV420P, so I did add the extra color conversion
> as a
> > workaround for now.
> >
> > Am I correct in my understanding that currently the MJPEG encoder does
> not
> > support GRAY8 pixel format as input? Or is there something else I need to
> > do to make it work?
>
> The encoder doesn't list it as supported format and you are right, we
> should support it.
>
> Since it is related to the quite convoluted mpegvideo encoder might be a
> _bit_ complex to add the support by yourself, but if you want to try
> feel free to jump on irc and somebody should at least give you some
> pointers =).
>
> lu
>



Thank you for the prompt reply.
For the moment I don't think I would have the know-how to be able to work
on the code base…
Joan
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to