Page MenuHomePhabricator

Enhancement: TimedMediaHandler: support ffmpeg hwaccel
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

It would be good if TMH would expose a configuration option that enables ffmpeg -hwaccel auto.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Hwaccel can reduce the work load on the server's CPU, allowing for more requests to be processed.

Benefits (why should this be implemented?):

Reduced transcoding time and reduced load on the server, possibly also saving energy.

Note that ffmpeg -hwaccel enables hardware decoding of the source video, not hw encoding. HW encoding would require more complicated configuration and is usually very specific to the available hardware, making it hard to implement in a generic way. ffmpeg -hwaccel auto will detect if there is HW support and availability to decode the source stream.