Project

General

Profile

Bug #4127

vaapi transcoding broken

Added by Martin Bednar about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Category:
Muxers
Target version:
-
Start date:
2016-12-08
Due date:
% Done:

0%

Estimated time:
Found in version:
4.1-2369-g0794296
Affected Versions:

Description

When I set up hardware accelerated transcoding on my machine, tvheadend doesn't use it.
It is a radeon card with VCE :
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileNone : VAEntrypointVideoProc

libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
transcode: 0001: Using preset medium
2016-12-08 20:27:13.517 [ INFO] transcode: 0001: Using preset medium
libav: Undefined constant or missing '(' in 'high'
libav: Unable to parse option value "high"
2016-12-08 20:27:13.519 [ ERROR] libav: Undefined constant or missing '(' in 'high'
2016-12-08 20:27:13.519 [ ERROR] libav: Unable to parse option value "high"
2016-12-08 20:27:13.519 [ ERROR] libav: Error setting option profile to value high.
2016-12-08 20:27:13.519 [ ERROR] transcode: 0001: Unable to open h264_vaapi encoder
libav: Error setting option profile to value high.
transcode: 0001: Unable to open h264_vaapi encoder

History

#1

Updated by piotr galek about 4 years ago

Martin Bednar wrote:

When I set up hardware accelerated transcoding on my machine, tvheadend doesn't use it.
It is a radeon card with VCE :
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileNone : VAEntrypointVideoProc

libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
libav: Invalid frame dimensions 0x0.
2016-12-08 20:27:13.408 [ ERROR] libav: Invalid frame dimensions 0x0.
transcode: 0001: Using preset medium
2016-12-08 20:27:13.517 [ INFO] transcode: 0001: Using preset medium
libav: Undefined constant or missing '(' in 'high'
libav: Unable to parse option value "high"
2016-12-08 20:27:13.519 [ ERROR] libav: Undefined constant or missing '(' in 'high'
2016-12-08 20:27:13.519 [ ERROR] libav: Unable to parse option value "high"
2016-12-08 20:27:13.519 [ ERROR] libav: Error setting option profile to value high.
2016-12-08 20:27:13.519 [ ERROR] transcode: 0001: Unable to open h264_vaapi encoder
libav: Error setting option profile to value high.
transcode: 0001: Unable to open h264_vaapi encoder

tvheadend must send to libav resolution otherwise HW acceleration will not work

here same problem in chromium
https://github.com/saiarcot895/chromium-ubuntu-build/blob/master/debian/patches/specify-max-resolution.patch

"Chromium now asks libva what the maximum resolution supported for a decoding profile is. However, the current implementation of libva doesn't ask the hardware what the maximum resolution supported is, and so when Chromium asks, a default value of 0x0 is set and returned. This would effectively disable hardware-accelerated video decoding."

same like in your log

[ ERROR] libav: Invalid frame dimensions 0x0.

#2

Updated by Martin Bednar about 4 years ago

Interesting, do you know of any (easy) way to know if the driver reports correctly the dimensions? I'd report a bug to the amd guys :)
Any way, I had the size set to "0x0", which per tvheadend docs should set the output video size to the input video size...

Also available in: Atom PDF