[FFmpeg-user] Encoding v210 fails when using PIX_FMT_YUV422P16LE even though PIX_FMT_YUV422P10LE is deprecated

Thomas Worth dev at rarevision.com
Sat May 28 05:29:11 CEST 2011

On Fri, May 27, 2011 at 7:29 PM, Baptiste Coudurier <
baptiste.coudurier at gmail.com> wrote:

> Hi Thomas,
> On 05/27/2011 05:59 PM, Thomas Worth wrote:
> > I am having trouble encoding v210 material even though I am using the
> > correct encoding parameters:
> >
> > c->codec_type = AVMEDIA_TYPE_VIDEO;
> > c->codec_id = CODEC_ID_V210;
> > c->pix_fmt = PIX_FMT_YUV422P16LE;
> > c->bits_per_raw_sample = 10;
> > c->codec_tag = *((uint32_t*)"v210");
> >
> > avcodec_find_encoder(c->codec_id) works, but avcodec_open() fails.
> What's the error message ?

Error is -1. I'm sure this is due to the pixel format being unsupported as
you mention.

> > If I change pix_fmt to PIX_FMT_YUV422P10LE, I don't get any errors but
> the
> > packing appears to be wrong. My code is already set up to pack YUV422P16.
> Appears to be wrong ?

Sorry, I should have clarified that. The packing is different, and doesn't
work with my code. It is different from YUV422P16 so I'd like to get it
working in that format so I don't have to rewrite my packing code. This all
worked before the ffmpeg/libav split and now only works with libav. I
believe the first go at supporting v210 in ffmpeg was with YUV422P16, which
is why my code expects frames in that format.

AVCodec->pix_fmts tells you which pix fmt the encoder support.
> For instance it's PIX_FMT_YUV422P10 for the v210 encoder.

Yeah, but this is listed as a deprecated format in pixfmt.h. If it's
deprecated, what's supposed to replace it?

I wouldn't mind rewriting my code to support PIX_FMT_YUV422P10LE, but I
don't want to waste my time if support is going to be dropped at some point.

More information about the ffmpeg-user mailing list