[Libav-user] Access to motions vectors and macroblock in P_FRAME lib264
NDJORE BORIS
ndjoreboris at gmail.com
Mon Mar 11 12:02:44 EET 2019
Le lun. 11 mars 2019 à 10:04, Carl Eugen Hoyos <ceffmpeg at gmail.com> a
écrit :
> 2019-03-11 4:14 GMT+01:00, NDJORE BORIS <ndjoreboris at gmail.com>:
>
> > I just enabled vaapi in my configure options but It doesn't
> > work. I have the error : vaapi hardware is needed.
>
> Is this error message unclear?
>
> Carl Eugen
> _______________________________________________
> This is excactly the output error :
>
> [h264_vaapi @ 0x8712c0] A hardware frames reference is required to
> associate the encoding device.
> Cannot open video encoder for stream #0
>
> In my code I use these lines to choose the encoder :
>
> if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO || dec_ctx->codec_type ==
> AVMEDIA_TYPE_AUDIO)
> {
> encoder = avcodec_find_encoder(dec_ctx->codec_id);
> if(!encoder)
> {
> av_log(NULL, AV_LOG_FATAL, "Necessary
> encoder not found\n");
> return AVERROR_INVALIDDATA;
> }
> enc_ctx = avcodec_alloc_context3(encoder);
> if(!enc_ctx)
> {
> av_log(NULL, AV_LOG_FATAL, "Failed to
> allocate the encoder context\n");
> return AVERROR(ENOMEM);
> }
>
> For others videos formats, all is right. But the above error happens when
> the video is a h264 format.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190311/cf5ccda2/attachment.html>
More information about the Libav-user
mailing list