Project

General

Profile

Bug #5403

VAAPI not working. Always getting Unable to open vaapi encoder. yuv420p is invalid or not supported.

Added by Robert K over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-06
Due date:
% Done:

0%

Estimated time:
Found in version:
4.2.6,4.2.7
Affected Versions:

Description

Hi,
I'm using the latest TVHeadend 4.2.7 on a AlpineLinux based system. I'm trying to transcode a stream by using the hardware VAAPI transcoder (I have an Intel N4200 CPU), but it seems to be failing in TVHeadend.

The errors I'm getting are these:

hevc_vaapi: H.265/HEVC (VAAPI):
2018-12-06 15:34:13.662 transcode: 000A: 1:H264 1920x1080 ==> HEVC 1920x1080 (hevc_vaapi)
2018-12-06 15:34:13.662 transcode: 000A: 2:AAC-LATM ==> Passthrough
2018-12-06 15:34:13.688 transcode: 000A: Using preset medium
2018-12-06 15:34:13.688 libav: Specified pixel format yuv420p is invalid or not supported
2018-12-06 15:34:13.688 transcode: 000A: Unable to open hevc_vaapi encoder
2018-12-06 15:34:14.671 libav: Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

h264_vaapi: H.264/AVC (VAAPI):
2018-12-06 15:36:37.885 transcode: 000B: 1:H264 1920x1080 ==> H264 1920x1080 (h264_vaapi)
2018-12-06 15:36:37.885 transcode: 000B: 2:AAC-LATM ==> Passthrough
2018-12-06 15:36:37.904 transcode: 000B: Using preset medium
2018-12-06 15:36:37.905 libav: Specified pixel format yuv420p is invalid or not supported
2018-12-06 15:36:37.905 transcode: 000B: Unable to open h264_vaapi encoder
2018-12-06 15:36:38.856 libav: Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

vp8_vaapi: VP8 (VAAPI):
2018-12-06 15:39:00.538 transcode: 000C: 1:H264 1920x1080 ==> VP8 1920x1080 (vp8_vaapi)
2018-12-06 15:39:00.538 transcode: 000C: 2:AAC-LATM ==> Passthrough
2018-12-06 15:39:00.561 libav: Specified pixel format yuv420p is invalid or not supported
2018-12-06 15:39:00.561 transcode: 000C: Unable to open vp8_vaapi encoder
2018-12-06 15:39:01.521 libav: Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

Running VAINFO shows this:

vainfo
error: can't connect to X server!
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.2 (libva 2.2.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 2.2.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD

Also running ffmpeg manually with vaapi works correctly with this command:

ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i input.ts -an -vf 'format=nv12|vaapi,hwupload' -c:v h264_vaapi -qp 25 output.mp4

Is there something special that has to be enabled in order to have a working VAAPI profile to use Hardware transcoding in TVHeadend? Or is there any way to manually specify a piped command for transcoding in TVHeadend?


Files

sp-pixelformat.png (21.2 KB) sp-pixelformat.png Luis Alves, 2018-12-07 19:32

History

#1

Updated by Luis Alves over 3 years ago

Mine works correctly (but using latest tvheadend from github).

You setup is failing due to: libav: Specified pixel format yuv420p is invalid or not supported
There should be an option for "pixel format" on tvh codec config - try other settings.

#2

Updated by Luis Alves over 3 years ago

By the way, I think that the only pixel format supported by vaapi is: vaapi_vld

#3

Updated by Robert K over 3 years ago

Luis Alves wrote:

Mine works correctly (but using latest tvheadend from github).

You setup is failing due to: libav: Specified pixel format yuv420p is invalid or not supported
There should be an option for "pixel format" on tvh codec config - try other settings.

I don't see any pixel format options anywhere in the GUI. Is it some setting that is configured via the terminal rather than the GUI?

#4

Updated by Luis Alves over 3 years ago

It should be there on the webui.
By the way, I've tried to set pixel format to yuv420p (like yours) and it gives me the same error so it's just a matter of you to figure out where to change it.

You're probably using an old tvh version where it wasn't added yet.

#6

Updated by Jaroslav Kysela over 3 years ago

luis Parada, the reporter is using 4.2.

#7

Updated by Luis Alves over 3 years ago

True... I did try building v4.2.7 from github but couldn't even find support for vaapi on the transcode webui page.

#8

Updated by Robert K over 3 years ago

Interesting. I did have the vaapi already in 4.2.6 as one of the transcoding options but no other options.

#9

Updated by Luis Alves over 3 years ago

You are probably running a build from an "unofficial" branch of tvh...

I found the discussion to support vaapi here #4443 and it mentions that vaapi was being added on version 4.3+

#10

Updated by Robert K over 3 years ago

Luis Alves wrote:

You are probably running a build from an "unofficial" branch of tvh...

I found the discussion to support vaapi here #4443 and it mentions that vaapi was being added on version 4.3+

I understand. I haven't seen any mention of an unofficial build at the alpine package so I thought it was a Tvheadend feature. With the transcode pipe the issue is completely fixed. I think this bug report can be closed, as its not really a bug. Thanks for the help!

#11

Updated by Jaroslav Kysela over 3 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF