FAQ  •  Register  •  Login

Nvidia HW Acceleration not working

<<

tomy1992

Serviio newbie

Posts: 5

Joined: Sat Feb 11, 2017 9:04 pm

Location: Slovakia

Post Wed Dec 15, 2021 1:52 pm

Nvidia HW Acceleration not working

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
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17179

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Mar 03, 2022 1:56 pm

Re: Nvidia HW Acceleration not working

You might have to download and replace ffmpeg built with the nvidia drivers.

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

tomy1992

Serviio newbie

Posts: 5

Joined: Sat Feb 11, 2017 9:04 pm

Location: Slovakia

Post Fri Mar 11, 2022 7:02 pm

Re: Nvidia HW Acceleration not working

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
<<

atc98092

User avatar

DLNA master

Posts: 4809

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sat Mar 12, 2022 12:56 am

Re: Nvidia HW Acceleration not working

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.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 8 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

tomy1992

Serviio newbie

Posts: 5

Joined: Sat Feb 11, 2017 9:04 pm

Location: Slovakia

Post Sat Mar 12, 2022 4:35 pm

Re: Nvidia HW Acceleration not working

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.
<<

atc98092

User avatar

DLNA master

Posts: 4809

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Mar 13, 2022 12:42 am

Re: Nvidia HW Acceleration not working

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.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 8 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents

Return to User experiences

Who is online

Users browsing this forum: No registered users and 12 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.