<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 11 mars 2019 à 10:04, Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com" target="_blank">ceffmpeg@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2019-03-11 4:14 GMT+01:00, NDJORE BORIS <<a href="mailto:ndjoreboris@gmail.com" target="_blank">ndjoreboris@gmail.com</a>>:<br>
<br>
> I just enabled vaapi in my configure options but It doesn't<br>
> work. I have the error : vaapi hardware is needed.<br>
<br>
Is this error message unclear?<br>
<br>
Carl Eugen<br>
_______________________________________________<br><div>This is excactly the output error :</div><div><br></div><div>[h264_vaapi @ 0x8712c0] A hardware frames reference is required to associate the encoding device.</div><div>Cannot open video encoder for stream #0</div><div><br></div><div>In my code I use these lines to choose the encoder :</div><div><br></div><div>if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO || dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO)</div><div> {</div><div> encoder = avcodec_find_encoder(dec_ctx->codec_id);</div><div> if(!encoder)</div><div> {</div><div> av_log(NULL, AV_LOG_FATAL, "Necessary encoder not found\n");</div><div> return AVERROR_INVALIDDATA;</div><div> }</div><div> enc_ctx = avcodec_alloc_context3(encoder);</div><div> if(!enc_ctx)</div><div> {</div><div> av_log(NULL, AV_LOG_FATAL, "Failed to allocate the encoder context\n");</div><div> return AVERROR(ENOMEM);</div><div> } </div><div><br></div><div>For others videos formats, all is right. But the above error happens when the video is a h264 format.</div></blockquote></div></div>