ffmpeg使用vaapi硬解出错
< 返回列表时间: 2019-02-18来源:开源中国
HDC调试需求开发(15万预算),能者速来!>>>
系统:deepin 15.9
ffmpeg 版本:4.1
vaifo: libva info: VA-API version 1.1.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_0 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.1 (libva 2.1.0) vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 2.0.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD
小弟使用希望使用ffmpeg的vaapi进行硬解。使用sudo ./configure --disable-static --enable-shared --enable-gpl --enable-version3 --enable-vaapi来编译ffmpeg源码,源码编译成功,并成功安装。然后想运行ffmpeg官方的有关硬解的例子进行学习。故编译了官方的例子vaapip_transcode.c hw_decode.c两个例子,也都编译通过.但是在运行两个例子的出现出现如下错误:
转换到源码中查看是由于下面的回调函数出问题。即*p != AV_PIX_FMT_VAAPI static enum AVPixelFormat get_vaapi_format(AVCodecContext *ctx, const enum AVPixelFormat *pix_fmts) { const enum AVPixelFormat *p; for (p = pix_fmts; *p != AV_PIX_FMT_NONE; p++) { if (*p == AV_PIX_FMT_VAAPI) return *p; } fprintf(stderr, "Unable to decode this file using VA-API.\n"); return AV_PIX_FMT_NONE; }

热门排行