GPU hardware encoding acceleration using CUDA

Started by OkropNick, November 27, 2017, 01:24:04 PM

Previous topic - Next topic

OkropNick

Hi all.

I can't find anywhere informations about possibillity to encode h264 / h265 video using GPU (Nvidia CUDA GTX 1060). Can someone explain it to me or point me to answer?

Thank you in advance.

eumagga0x2a

Do you build Avidemux from source? You need the nvEncodeAPI.h header and devel package for libvdpau. If everything is done correctly, you will find NVENC based encoders in the list of video codecs.

OkropNick

Yes,

I can build Avidemux 2.7.0 from sources, I also have downloaded whole CUDA development library from Nvidia, but don't know what and where I have to copy. Any help will be appreciated.

Thanks.


eumagga0x2a

Please use the current git, not 2.7.0, there were important fixes WRT hw accelerated encoders post-2.7.0. You need the binary NVIDIA graphics driver installed and working, libvdpau incl. -devel and just the nvEncodeAPI.h header.

Edit: Are you on Ubuntu?


eumagga0x2a

I asked about Ubuntu because there is a script for Ubuntu which would install all the requisites (except of the NVENC header, you'd have to take care of it yourself) and build (and install) Avidemux: https://github.com/mean00/avidemux2/blob/master/createDebFromSourceUbuntu.bash

OkropNick

#7
Thanks, I installed Avidemux using script createDebFromSourceUbuntu.bash. Compilation and installation was finished without errors, but when I'm starting avidemux from console using:

kuba@okropnick:~/Pulpit$ avidemux&

Avidemux don't work properly. There are no muxers, video & audio codecs, I don't know what went wrong. Can you help me to resolve this problem?

Problem exists in git version and 2.7.0 sources.

Thank you in advance.

Here is log:

https://pastebin.com/uZ9LPD7m

eumagga0x2a

#8
You must have another Avidemux version installed, please uninstall all other builds. The launch command is

avidemux3_qt5

You better keep Avidemux in foreground, otherwise all the rich debug info fills your journal.

eumagga0x2a

You've built 2.7.0. Please don't do that if you want to use NVENC, use the latest git.

Maybe

# ldconfig

would help?

OkropNick

Quote from: eumagga0x2a on November 27, 2017, 03:01:39 PM
You must have another Avidemux version installed, please uninstall all other builds. The launch command is

avidemux3_qt5

Would you explain me this? I don't understand.

Thanks.

eumagga0x2a

The vanilla upstream Avidemux application binary on Linux is called "avidemux3_qt5". Unless you made a custom launch script or a symlink as "avidemux", this doesn't belong to the upstream Avidemux.

OkropNick

Ok, but if I'm launching program by "avidemux3_qt5" is not working either. Still can't find any muxers and codecs. Even source cloned from git. How to find reason?

Would you kindly build an appimage with requested feature? I can pay for help.

Thanks.


eumagga0x2a

#13
Have you removed all other builds? Have you checked that the plugins are really there? If yes, have you run ldconfig?

I never looked into appimage and don't have time to delve into it now.

eumagga0x2a

I prefer to install Avidemux behind the back of packet management to /usr/local using

bash bootStrap.bash --prefix=/usr/local

and then simply copying the content of install/usr/local directory to its destination.

You can also reduce the install size by using some system libs instead of the bundled ones, see the --with-system- options from

bash bootStrap.bash --help