[Libva] User friendly H.264 encoding

tino+vaapi at tikei.de tino+vaapi at tikei.de
Fri May 18 11:58:51 PDT 2012


On Fri, May 18, 2012 at 06:45:21 +0000, Xiang, Haihao wrote:
>  
> > I have a Core i5-2400 which should be able to accelerate H.264 encoding
> > AFAIK.  I tried to find out how this is done, but only found a command
> > line encoder which uses raw YUV video as input
> 
> Do you mean 'avcenc' ? It is used for testing.  Please try with
> staging branch.

It seems to require an input file in YUV format and doesn't work with a
FIFO as input.  So this just moves the hardware requirements from the
CPU to the hard disk.

According to ffmpeg, one hour of 1080p YUV video consumes 268 GB, a two
hours movie would be 536 GB.  This needs to be written to disk, and
then read again by avcenc.  With an average disk thoughput of 100 MB/s,
writing the YUV video and reading it takes 3 hours.  I guess normal
encoding in handbrake wouldn't be much slower, if not even faster on my
i5 quadcore.

Furthermore, audio tracks and subtitles get lost in this process and
need to be re-added afterwards, which makes a complicated workflow.

> > Is there some way to use standard tools like handbrake with hardware
> > acceleration?
> 
> Gstreamer with vaapi support.  But I'm not sure it is stable or not.

I saw gstreamer-vaapi. I don't know it it supports VAAPI encoding, but
windyuan-gstreamer-vaapi seems to support it. However, the latter seems
to depend on a specific version of libva headers. I did not manage to
build it. I asked the author what should be done to compile it, but got
no reply yet.

Regards,
Tino


More information about the Libva mailing list