Project

General

Profile

Bug #5665

VA-API encodes with hardware but doesn't decode

Added by Tom Butler over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Category:
Transcoding
Target version:
-
Start date:
2019-06-24
Due date:
% Done:

0%

Estimated time:
Found in version:
4.3
Affected Versions:

Description

When transcoding with va-api, the CPU usage is reduced but not as much as it could be.

The problem is that although it encodes using hardware, it doesn't decode the original stream in hardware. I can tell because I still see ~50% cpu usage while it's transcoding, while using pass is around 10%.

I don't know the C version of ffmpeg enough to suggest a patch, but the following is the equivalent ffmpeg command that's being run:

```
ffmpeg -vaapi_device /dev/dri/renderD128 -i {STREAM} -vf 'format=nv12,hwupload,deinterlace_vaapi' -c:v h264_vaapi -qp 15 {OUT}

```

However, it's possible to do everything in hardware if supported:

```
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i {STREAM} -vf 'deinterlace_vaapi' -c:v h264_vaapi -qp 15 {OUT}
```

This decodes the original stream in hardware and transcodes it in hardware, skipping the software decode and hwupload steps.

History

#1

Updated by saen acro over 5 years ago

Do you use SPAWN profile?

Also available in: Atom PDF