Project

General

Profile

Transcoding Via GPU Intel/AMD Tutorial 2017

Added by sirk98 qwerty98 almost 4 years ago

Hello dear friends,

as the subject says, I need to transcode more streams using tvheadend .
Using the forum's search button, I find more post that explain how gpu via qsv reduce the cpu usage, but yet I don't know how make it really working on my tvh server .

Actually I have only server with intel cpu (like Quad Core, Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz ) and I read that under ubuntu is necessary to patch kernel and install media server studio, sdk for linux .

But I'm a little confusing and before start I need to clear some point ( after I will make a little tutorial and post it here ):

1 Is media server studio, sdk always necessary under Intel's CPU ?
2 If I use CentOS will all work without patch anything ?
3 AMD CPU are working directly with tvheadend built in transcode function or not ?
4 The stable version ( actually is 4.2.4-x~githash ) is ok for transcode with qsv or some power efficient video processing or which version is needed ?

Thanks in advance for any reply .
Best regards
sirk98


Replies (15)

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by Robert Cameron almost 4 years ago

Intel's QSV is indeed difficult to get working under Linux. It requires a specific kernel version and an out-of-tree build for its modules.

However, starting in 4.3 VAAPI is an option for hardware transcoding which is much simpler to get working.

So, in answer to your questions:

1. Intel's SDK/QSV is not necessary if you have VAAPI libraries.
2. CentOS requires patching to use Intel's SDK, just as all Linux kernels do.
3. AMD hardware transcoding can work with VAAPI, too.
4. Current stable works with QSV, but the VAAPI transcoding is broken (IIRC); 4.3 is needed for proper VAAPI transcoding.

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by saen acro almost 4 years ago

I have Xeon 1225v1 with same HD3000 (little faster clocked and renamed to P3000)
with Ubuntu 16.04 desktop hardware acceleration work perfect,
without need to make something.
But quality is very poor, and sometime crash.

If you can switch cpu with some i7-3770k with HD4000 video or better Xeon 12x5 v2 with P4000

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by sirk98 qwerty98 almost 4 years ago

Hello,
thanks for replies, ok now is more clear for me and online I read that ubuntu > 16.xx have intel vaapi driver built in .
So is necessary to compile tvheadend and ffmpeg that have to support vaapi (--enable-vaapi ) is right ? Or I miss something ?

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by Robert Cameron almost 4 years ago

saen acro wrote:

Read this manual
https://tvheadend.org/boards/4/topics/24116
install dependency and that's it.

While the gist may be the same, the OP indicated CentOS, so RPM rather than DEB packages.

My recommendation with regards to software/library dependencies: figure out how you want Tvheadend configured/built, and use the error messages/output from the configure script to direct you to which additional packages you may need to install for your OS.

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by saen acro almost 4 years ago

redhat derivatives have lot of build-by-hand modules,
before tvh to support all functions.

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by sirk98 qwerty98 almost 4 years ago

saen acro wrote:

redhat derivatives have lot of build-by-hand modules,
before tvh to support all functions.

Which version ?

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by saen acro almost 4 years ago

Example CI modul support (dvben50221)

Each time when I build binary for CentOS 7, I have to use minimum

./configure --enable-bundle

to have something working (dvb-apps manually made)
even after that and intel crapy path cannot use video acceleration because
libva info: VA-API version 0.35.0

TVH need libva >=0.38.0

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by sirk98 qwerty98 almost 4 years ago

Hello,

I build from latest source tvheadend, and I installed all that I required for my server .
But if I try to transcode using va-api I see that the quality is really poor .

This is my va-api version :
vainfo: VA-API version: 0.39 (libva 1.7.3)

And this is my tvh version :
HTS Tvheadend 4.3-762~gdf43bf0

I try more codec setup, using all possible variables .

Cpu using with va-api hardware acceleration is very low, but also the quality...
I do some mistakes or I can't do nothing to have low cpu usage and good quality with transcoding ?

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by sirk98 qwerty98 almost 4 years ago

Hello,

after more test, I m not able to improve the stream quality using tvheadend + va api library .
An external transcoder server is needed ?
Can someone help me to understand what is the best way to transcode multiple stream at same time using tvheadend as server ?

Best regards

sirk98

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by kosacik 1 almost 4 years ago

Hello guys,
i managed to run tvh server on ubuntu 16.04, i built it myself with vaapi support: 4.3-962~g7452830, based on tutorial on these sites.
I am still reading about how many streams can You transcode, get better intel cpu and so...
I have i3220T - intel, and i can only run around two HD transcoded streams. I can run even three - for few minutes, then third-one will stop. After an hour, maybe one will be still playing :-)
And the same experience on intel J3710 with vaapi.
Why i am asking here is gpu usage - for me - with 3 streams, tv is not "watchable" - picture is offen damaged, but GPU usage is less than 45%.
So it is not about "power"!
I read here somewhere, that intel drivers are buggy. So tell me someone please, how did you manage to transcode 8 - 12 HD streams without quadro GPU... Thank You.

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by kosacik 1 almost 4 years ago

ok, this is perfect.
Where to start... Could You provide me some links? :)

RE: Transcoding Via GPU Intel/AMD Tutorial 2017 - Added by kosacik 1 almost 4 years ago

I found something here: https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/quicksync-video-ffmpeg-install-valid.pdf
They recommend CentOS with specific kernel version. And you need to install media server studio, where they are mentioning, it does not support 4th generetion of intel core cpu-s. I have 3th and 4th at home. And You are running it on 4th generation. Also i found, that ubuntu /i use/ in version 17.10 does support QSV, so i really need Your advice, where to start.

    (1-15/15)