Page 1 of 1

Nvidia HW Acceleration not working

PostPosted: Wed Dec 15, 2021 1:52 pm
by tomy1992
Hi guys, can someone post me exactly correct syntax to enable HW acceleration through Nvidia GPU in serviio pro v2.2 installed on windows server 2022?

I add -Dserviio.useNVidiaAcceleration parameter into C:\Program Files\Serviio\config\user.vmoptions file and transcoding is still realized through CPU.
In system is correctly installed Nvidia Quadro P600 2GB with all drivers.

Thanks for any help

Tomas

Re: Nvidia HW Acceleration not working

PostPosted: Thu Mar 03, 2022 1:56 pm
by zip
You might have to download and replace ffmpeg built with the nvidia drivers.

https://www.gyan.dev/ffmpeg/builds/#git-master-builds

Re: Nvidia HW Acceleration not working

PostPosted: Fri Mar 11, 2022 7:02 pm
by tomy1992
Ok thanks for tip, but can you help me with some guide how to replace it correctly?

I try to replace ffmpeg.exe file located in "C:\Program Files\Serviio\lib" directory with 3 newer versions (and each time restart serviio service of course) but whole transcoding isn't working now.

After replacing with original (older) version of ffmpeg.exe is transcoding back, but only through CPU.

Thanks

Tomas

Re: Nvidia HW Acceleration not working

PostPosted: Sat Mar 12, 2022 12:56 am
by atc98092
You did it correctly. That is the correct file location. When I replace my version of FFMPEG, I leave the original file and just rename it, and place the new version in it's place. I can't tell for certain, but it looks like either version (essentials or full build) should have the Nvidia drivers, but I can't say for certain. I'd say try the full build just to be sure. It's not even necessary to restart the Serviio service, unless FFMPEG is in use, in which case it won't let you replace the file anyway.

That said, I haven't had the need to swap out FFMPEG for several years. I used to do it so I had a 64 bit version, but Serviio includes that now. But I've never tried to activate the hardware acceleration. My primary Serviio PC has an Intel CPU, and I've never had a problem with Serviio's standard acceleration.

Re: Nvidia HW Acceleration not working

PostPosted: Sat Mar 12, 2022 4:35 pm
by tomy1992
Ok, I have some progress.

Now I have replaced ffmpeg with newest version and serviio transcoding is working but still throught CPU.

But when I try start transcoding via cmd and try this command:

  Code:
ffmpeg.exe -i C:\Users\Administrator\Desktop\Test\Picovina1.mkv -c:v h264_nvenc -pixel_format yuv4mpegpipe -preset p7 output.mp4


transcoding will start through GPU and utilize it on 99% so transcoding is working and can use my GPU. I think that serviio will not use ffmpeg with correct parameters.

I can find in logs what parameters will serviio use:

  Code:
ffmpeg.exe -threads 0 -i C:\Users\Administrator\Desktop\Test\Picovina1.mkv -y -threads 0 -c:v mpeg2video -pix_fmt yuv420p -qscale:v 1 -r 24000/1001 -g 15 -c:a:0 ac3 -b:a:0 384k -ac:a:0 6 -c:a:1 ac3 -b:a:1 384k -ac:a:1 6 -map 0:0 -map 0:1 -map 0:2 -sn -f mpegts C:\Serviio\Serviio\transcoding-temp-4d3fc62cb3d91c6c855caad383c468c0.stf


Here you can see that serviio didn't use h264_nvenc or any simmilar parameter needed for hw transcoding.

Re: Nvidia HW Acceleration not working

PostPosted: Sun Mar 13, 2022 12:42 am
by atc98092
What profile are you using that you got that log entry from? It's transcoding to MPEG2, which will not use the encoder you're using when you did your command line. You need to test it with a profile that will transcode to H.264, not MPEG2.