[Libav-user] V210 encoder error

Info || Non-Lethal Applications info at non-lethal-applications.com
Fri Jul 11 13:23:28 CEST 2014


Hey guys,

I want to use the V210 encoder now to prepare data for playout.
However, I’m getting a bug I don’t understand. 
Maybe someone can help, here’s the code:

AVCodec* _pV210Codec = avcodec_find_encoder(AV_CODEC_ID_V210);
AVCodecContext* _pV210CodecCtx = avcodec_alloc_context3(_pV210Codec);
_pV210CodecCtx->codec_type = AVMEDIA_TYPE_VIDEO;
_pV210CodecCtx->codec_id = AV_CODEC_ID_V210;
_pV210CodecCtx->bits_per_raw_sample = 10;
_pV210CodecCtx->width = 1920;
_pVideoCodecCtx->height = 1080;
_pV210CodecCtx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
_pV210CodecCtx->gop_size = 1;
_pV210CodecCtx->time_base.den = 24;
_pV210CodecCtx->time_base.num = 1;

// Open codec
if(avcodec_open2(_pV210CodecCtx, _pV210Codec,NULL)<0)
{
    printf("ERROR: Could not open codec!\n");
    exit(105);
}

The error I’m getting is:

[NULL @ 0x11a800000] [IMGUTILS @ 0x7fff5fbff2a0] Picture size 0x0 is invalid
[NULL @ 0x11a800000] Ignoring invalid width/height values
[NULL @ 0x11a800000] [IMGUTILS @ 0x7fff5fbff2a0] Picture size 0x0 is invalid
[v210 @ 0x11a800000] dimensions not set

I already tried to not set the resolution but then it also fails.
I don’t see why the width/height values would not be valid.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140711/93000726/attachment.html>


More information about the Libav-user mailing list