[Libav-user] V210 encoder error
Paul B Mahol
onemda at gmail.com
Fri Jul 11 17:34:36 CEST 2014
On 7/11/14, Info || Non-Lethal Applications
<info at non-lethal-applications.com> wrote:
> 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;
Are you sure about this?
> _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!
More information about the Libav-user
mailing list