Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OBS-studio - haven't hardware encoding NVENC
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Tue Sep 12, 2017 7:14 am    Post subject: OBS-studio - haven't hardware encoding NVENC Reply with quote

Hello guys.

I have some problem with NVENC in obs-studio. NVENC encoding doesn't appear in output configuration, only software. My videocard is 780GTX, it have NVENC chip on board.

USE flag 'nvenc' enabled for ffmpeg

Installed packages:

media-video/ffmpeg-3.3.3
dev-util/nvidia-cuda-toolkit-8.0.61
media-video/nvidia-video-codec-8.0.14
media-video/nvidia_video_sdk-6.0.1 USE="tools"


driver is nvidia-drivers-384.69, tried previous version of drivers - same result.

OBS-studio-20.0.1

Any ideas how to get this thing to work?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Tue Sep 12, 2017 5:19 pm    Post subject: Reply with quote

I wonder if you need the openh264 or x264 use flag.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Wed Sep 13, 2017 4:22 am    Post subject: Reply with quote

audiodef wrote:
I wonder if you need the openh264 or x264 use flag.


I have it... And I have the Software x264 in obs-studio settings.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Sep 14, 2017 6:59 am    Post subject: Reply with quote

Does the version you're using have nvenc support at all? Run strings /usr/bin/obs | grep NVENC to check, but that probably isn't the problem. Also make sure ffmpeg itself can use nvenc: ffmpeg -hide_banner -codecs:v | grep h264 should mention it.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Thu Sep 14, 2017 1:10 pm    Post subject: Reply with quote

Ant P. wrote:
Does the version you're using have nvenc support at all? Run strings /usr/bin/obs | grep NVENC to check, but that probably isn't the problem. Also make sure ffmpeg itself can use nvenc: ffmpeg -hide_banner -codecs:v | grep h264 should mention it.


Code:
c@localhost ~ $ ffmpeg -hide_banner -codecs:v | grep h264
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau libopenh264 h264_cuvid ) (encoders: libx264 libx264rgb libopenh264 h264_nvenc h264_vaapi nvenc nvenc_h264 )


Code:
c@localhost ~ $ strings /usr/bin/obs | grep NVENC
NVENCPreset
Basic.Settings.Output.Simple.Encoder.Hardware.NVENC


But OBS stil haven't option Hardware. Maybe it's bug in OBS GUI?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Sep 14, 2017 7:22 pm    Post subject: Reply with quote

The GUI's supposed to show that option if it's detected, so I agree it's a bug. Good luck reporting it, I've never been able to get their bug tracker to even load...
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Fri Sep 15, 2017 3:11 pm    Post subject: ><)))°€ Reply with quote

Hm.

I have it working here, with a GTX 960 and the following:

Code:
media-video/ffmpeg-3.3.4
media-video/nvidia_video_sdk-6.0.1
media-video/obs-studio-20.0.1
x11-drivers/nvidia-drivers-384.69

This isn't much of an idea, but when you run OBS from a terminal, can you see the following?

Code:
info: NVENC supported

The 'strings' test probably confirmed this already, at least partially.
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Fri Sep 15, 2017 7:25 pm    Post subject: Re: ><)))°€ Reply with quote

Chiitoo wrote:
Hm.

I have it working here, with a GTX 960 and the following:

Code:
media-video/ffmpeg-3.3.4
media-video/nvidia_video_sdk-6.0.1
media-video/obs-studio-20.0.1
x11-drivers/nvidia-drivers-384.69

This isn't much of an idea, but when you run OBS from a terminal, can you see the following?

Code:
info: NVENC supported

The 'strings' test probably confirmed this already, at least partially.


That's strange, but when I run OBS in Terminal I didn't see "NVENC supported"...
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Fri Sep 15, 2017 8:18 pm    Post subject: Reply with quote

Yeah, I imagine if it would be shown there, then it would likely be in the settings as expected, too.

It looks like the message comes from this function (or when it's called, rather):

Code:
static bool nvenc_supported(void)
{
        AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264");
        void *lib = NULL;

        if (!nvenc)
                return false;

It seems like it's looking for the string 'nvenc_h264', which according to your post should be found...

Quite puzzling indeed. I'm not sure if this can be any different, considering the earlier tests, but what does

Code:
ffmpeg -encoders | grep nvenc

show to you?

I get:

Code:
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)

_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Sat Sep 16, 2017 5:42 am    Post subject: Reply with quote

Chiitoo wrote:
Yeah, I imagine if it would be shown there, then it would likely be in the settings as expected, too.

It looks like the message comes from this function (or when it's called, rather):

Code:
static bool nvenc_supported(void)
{
        AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264");
        void *lib = NULL;

        if (!nvenc)
                return false;

It seems like it's looking for the string 'nvenc_h264', which according to your post should be found...

Quite puzzling indeed. I'm not sure if this can be any different, considering the earlier tests, but what does

Code:
ffmpeg -encoders | grep nvenc

show to you?

I get:

Code:
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)


I recieved this:

Code:
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)


According this information my system have required codec... But OBS stil haven't option for hardware encoding. As I said when I run OBS in terminal I did't see message "NVENC supported"
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Sat Sep 16, 2017 8:53 pm    Post subject: Reply with quote

Yeah, it's odd, though pretty much what I was expecting.

While I don't have any great ideas still, could you please post the output from 'emerge --info', as well as the current, full USE-flag configuration for 'ffmpeg'.
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Sun Sep 17, 2017 2:38 am    Post subject: Reply with quote

Chiitoo wrote:
Yeah, it's odd, though pretty much what I was expecting.

While I don't have any great ideas still, could you please post the output from 'emerge --info', as well as the current, full USE-flag configuration for 'ffmpeg'.


Code:
 media-video/ffmpeg-3.3.3::gentoo was built with the following:
USE="X alsa amr amrenc bzip2 cdio celt cpudetection doc encode fdk flite fontconfig frei0r fribidi gme gmp gnutls gpl gsm hardcoded-tables iconv iec61883 jack jpeg2k kvazaar ladspa libass libcaca libilbc librtmp lzma modplug mp3 network nvenc openal opengl openh264 openssl opus oss pic postproc pulseaudio rubberband samba sdl snappy speex ssh static-libs theora threads truetype twolame v4l vaapi vdpau vorbis vpx wavpack webp x264 x265 xcb xvid zlib (-altivec) -bluray -bs2b -chromaprint (-chromium) -debug -gcrypt -ieee1394 -libsoxr -libv4l (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -schroedinger -sofalizer -test -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="mmx mmxext sse sse2 -3dnow -3dnowext -aes -avx -avx2 -fma3 -fma4 -sse3 -sse4_1 -sse4_2 -ssse3 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Sun Sep 17, 2017 6:48 pm    Post subject: Reply with quote

You missed the 'emerge --info' part, though it's probably not going to be of much help here. :]

I still couldn't reproduce the issue, not even comparing our USE-flags.

Here's something else to confirm, just to make sure, if you haven't yet: try encoding something using just 'ffmpeg' and 'nvenc'.

Something like this:

Code:
ffmpeg -i [some input file] -c:v h264_nvenc [some output file]

_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Tue Sep 19, 2017 9:16 am    Post subject: Reply with quote

Chiitoo wrote:
You missed the 'emerge --info' part, though it's probably not going to be of much help here. :]

I still couldn't reproduce the issue, not even comparing our USE-flags.

Here's something else to confirm, just to make sure, if you haven't yet: try encoding something using just 'ffmpeg' and 'nvenc'.

Something like this:

Code:
ffmpeg -i [some input file] -c:v h264_nvenc [some output file]


Yes, encoding works... But in OBS still haven't option for NVENC.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Tue Sep 19, 2017 4:58 pm    Post subject: Reply with quote

Well then... Time to dig deeper. :]

Have you at any point installed FFmpeg (or 'media-video/libav') manually, outside of Portage?

Do have 'media-video/ffmpeg' installed currently (as your first post mentions), and no 'media-video/libav'?

If you can, please post the output from the following commands:
  • emerge --info
  • find /usr/local -name \*ffmpeg\*
  • ldd /usr/bin/obs
  • type ffmpeg
Additionally, please post the build logs for 'media-video/ffmpeg' and 'media-video/obs-studio' (for these, 'wgetpaste' would be a good idea).

(Thanks to Hu for the additional ideas.)
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Wed Sep 20, 2017 4:43 am    Post subject: Reply with quote

Chiitoo wrote:
Well then... Time to dig deeper. :]

Have you at any point installed FFmpeg (or 'media-video/libav') manually, outside of Portage?

Do have 'media-video/ffmpeg' installed currently (as your first post mentions), and no 'media-video/libav'?

If you can, please post the output from the following commands:
  • emerge --info
  • find /usr/local -name \*ffmpeg\*
  • ldd /usr/bin/obs
  • type ffmpeg
Additionally, please post the build logs for 'media-video/ffmpeg' and 'media-video/obs-studio' (for these, 'wgetpaste' would be a good idea).

(Thanks to Hu for the additional ideas.)


No, I didn't try to install libav from outside the portage.

Yes. I have only ffmpeg without libav.

Output from emerge --info here:

Code:
c@localhost ~ $ emerge --info
Portage 2.3.8 (python 3.4.6-final-0, default/linux/amd64/13.0/systemd, gcc-5.4.0, glibc-2.23-r4, 4.12.5-gentoo x86_64)
=================================================================
System uname: Linux-4.12.5-gentoo-x86_64-AMD_FX-tm-6300_Six-Core_Processor-with-gentoo-2.3
KiB Mem:    12311908 total,   8985936 free
KiB Swap:   12289020 total,  12289020 free
Timestamp of repository gentoo: Wed, 20 Sep 2017 04:30:01 +0000
Head commit of repository gentoo: 9cd5c6c0d0a4c95726584819e800a96e3f3ebbde
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

booboo
    location: /var/lib/layman/booboo
    sync-type: laymansync
    sync-uri: https://github.com/l29ah/booboo.git
    masters: gentoo
    priority: 50

cynede
    location: /var/lib/layman/cynede
    sync-type: laymansync
    sync-uri: https://github.com/Heather/gentoo-cynede.git
    masters: gentoo
    priority: 50

deadbeef-overlay
    location: /var/lib/layman/deadbeef-overlay
    sync-type: laymansync
    sync-uri: https://github.com/damex/deadbeef-overlay.git
    masters: gentoo
    priority: 50

imaging
    location: /var/lib/layman/imaging
    sync-type: laymansync
    sync-uri: https://github.com/gerddie/gentoo-imaging.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=bdver2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=bdver2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 berkdb branding bzip2 cli cracklib crypt cxx dri fortran gdbm gnome gtk iconv icu ipv6 jpeg modules multilib ncurses nls nptl nvenc nvidia ogg openmp opus pam pcre png policykit pulseaudio readline rtmp seccomp session ssl systemd tcpd udev udisks unicode xattr xinerama xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi_64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Code:
c@localhost ~ $ ldd /usr/bin/obs
   linux-vdso.so.1 (0x00007ffd0ff96000)
   libQt5Widgets.so.5 => /usr/lib64/libQt5Widgets.so.5 (0x00007f18100db000)
   libobs-frontend-api.so.0 => /usr/lib64/libobs-frontend-api.so.0 (0x00007f180fed3000)
   libavcodec.so.57 => /usr/lib64/libavcodec.so.57 (0x00007f180ea13000)
   libavutil.so.55 => /usr/lib64/libavutil.so.55 (0x00007f180e7a3000)
   libavformat.so.57 => /usr/lib64/libavformat.so.57 (0x00007f180e39b000)
   libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f180e133000)
   libQt5X11Extras.so.5 => /usr/lib64/libQt5X11Extras.so.5 (0x00007f18108fb000)
   libobs.so.0 => /usr/lib64/libobs.so.0 (0x00007f180de7b000)
   libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007f180d9eb000)
   libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007f180d57b000)
   libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libstdc++.so.6 (0x00007f180d17b000)
   libm.so.6 => /lib64/libm.so.6 (0x00007f180ce73000)
   libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1 (0x00007f180cc5b000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f180ca3b000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f180c69b000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f181072b000)
   libswresample.so.2 => /usr/lib64/libswresample.so.2 (0x00007f180c47b000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f180c273000)
   libva.so.1 => /usr/lib64/libva.so.1 (0x00007f180c053000)
   libxvidcore.so.4 => /usr/lib64/libxvidcore.so.4 (0x00007f180bd3b000)
   libx265.so.102 => /usr/lib64/libx265.so.102 (0x00007f180b0fb000)
   libx264.so.148 => /usr/lib64/libx264.so.148 (0x00007f180ad9b000)
   libwebpmux.so.2 => /usr/lib64/libwebpmux.so.2 (0x00007f180ab8b000)
   libwebp.so.6 => /usr/lib64/libwebp.so.6 (0x00007f180a92b000)
   libwavpack.so.1 => /usr/lib64/libwavpack.so.1 (0x00007f180a6fb000)
   libvpx.so.3 => /usr/lib64/libvpx.so.3 (0x00007f180a3b3000)
   libvorbisenc.so.2 => /usr/lib64/libvorbisenc.so.2 (0x00007f180a103000)
   libvorbis.so.0 => /usr/lib64/libvorbis.so.0 (0x00007f1809ed3000)
   libvo-amrwbenc.so.0 => /usr/lib64/libvo-amrwbenc.so.0 (0x00007f1809cb3000)
   libtwolame.so.0 => /usr/lib64/libtwolame.so.0 (0x00007f1809a8b000)
   libtheoraenc.so.1 => /usr/lib64/libtheoraenc.so.1 (0x00007f180985b000)
   libtheoradec.so.1 => /usr/lib64/libtheoradec.so.1 (0x00007f180964b000)
   libspeex.so.1 => /usr/lib64/libspeex.so.1 (0x00007f180942b000)
   libsnappy.so.1 => /usr/lib64/libsnappy.so.1 (0x00007f180921b000)
   libz.so.1 => /lib64/libz.so.1 (0x00007f1809003000)
   libopus.so.0 => /usr/lib64/libopus.so.0 (0x00007f1808db3000)
   libopenjp2.so.7 => /usr/lib64/libopenjp2.so.7 (0x00007f1808b63000)
   libopenh264.so.4 => /usr/lib64/libopenh264.so.4 (0x00007f1808863000)
   libopencore-amrwb.so.0 => /usr/lib64/libopencore-amrwb.so.0 (0x00007f180864b000)
   libopencore-amrnb.so.0 => /usr/lib64/libopencore-amrnb.so.0 (0x00007f180841b000)
   libmp3lame.so.0 => /usr/lib64/libmp3lame.so.0 (0x00007f18081a3000)
   libkvazaar.so.3 => /usr/lib64/libkvazaar.so.3 (0x00007f1807f1b000)
   libilbc.so.2 => /usr/lib64/libilbc.so.2 (0x00007f1807d03000)
   libgsm.so.1 => /usr/lib64/libgsm.so.1 (0x00007f1807af3000)
   libfdk-aac.so.1 => /usr/lib64/libfdk-aac.so.1 (0x00007f180783b000)
   libcelt0.so.2 => /usr/lib64/libcelt0.so.2 (0x00007f1807623000)
   liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f18073fb000)
   libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f18070bb000)
   libvdpau.so.1 => /usr/lib64/libvdpau.so.1 (0x00007f1806eb3000)
   libva-x11.so.1 => /usr/lib64/libva-x11.so.1 (0x00007f1806cab000)
   libva-drm.so.1 => /usr/lib64/libva-drm.so.1 (0x00007f1806aa3000)
   libssh.so.4 => /usr/lib64/libssh.so.4 (0x00007f180683b000)
   libsmbclient.so.0 => /usr/lib64/libsmbclient.so.0 (0x00007f1806613000)
   librtmp.so.1 => /usr/lib64/librtmp.so.1 (0x00007f18063f3000)
   libmodplug.so.1 => /usr/lib64/libmodplug.so.1 (0x00007f1806063000)
   libgme.so.0 => /usr/lib64/libgme.so.0 (0x00007f1805e1b000)
   libgnutls.so.30 => /usr/lib64/libgnutls.so.30 (0x00007f1805ae3000)
   libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f18058d3000)
   libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f1805663000)
   libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f1805223000)
   libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007f1804fdb000)
   libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f1804dd3000)
   libMagickCore-6.Q16.so.5 => /usr/lib64/libMagickCore-6.Q16.so.5 (0x00007f1804913000)
   libjansson.so.4 => /usr/lib64/libjansson.so.4 (0x00007f1804703000)
   libswscale.so.4 => /usr/lib64/libswscale.so.4 (0x00007f180447b000)
   libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f18041e3000)
   libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1 (0x00007f1803f3b000)
   libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f1803d03000)
   libicui18n.so.58 => /usr/lib64/libicui18n.so.58 (0x00007f180388b000)
   libicuuc.so.58 => /usr/lib64/libicuuc.so.58 (0x00007f18034e3000)
   libpcre16.so.0 => /usr/lib64/libpcre16.so.0 (0x00007f180327b000)
   libdouble-conversion.so.1 => /usr/lib64/libdouble-conversion.so.1 (0x00007f1803063000)
   libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f1802d4b000)
   librt.so.1 => /lib64/librt.so.1 (0x00007f1802b43000)
   libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007f18028ab000)
   libogg.so.0 => /usr/lib64/libogg.so.0 (0x00007f18026a3000)
   libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f1802473000)
   libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f180225b000)
   libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f1802053000)
   libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007f1801e3b000)
   libtevent-util.so.0 => /usr/lib64/libtevent-util.so.0 (0x00007f1801c33000)
   libsamba-errors.so.1 => /usr/lib64/libsamba-errors.so.1 (0x00007f18018eb000)
   liblibcli-lsa3-samba4.so => /usr/lib64/samba/liblibcli-lsa3-samba4.so (0x00007f18016e3000)
   libsamba-security-samba4.so => /usr/lib64/samba/libsamba-security-samba4.so (0x00007f18014c3000)
   libsamba3-util-samba4.so => /usr/lib64/samba/libsamba3-util-samba4.so (0x00007f18012b3000)
   libsamba-util.so.0 => /usr/lib64/libsamba-util.so.0 (0x00007f180103b000)
   liblibsmb-samba4.so => /usr/lib64/samba/liblibsmb-samba4.so (0x00007f1800dcb000)
   libmsrpc3-samba4.so => /usr/lib64/samba/libmsrpc3-samba4.so (0x00007f1800bab000)
   libsmbconf.so.0 => /usr/lib64/libsmbconf.so.0 (0x00007f180093b000)
   libndr.so.0 => /usr/lib64/libndr.so.0 (0x00007f1800723000)
   libsamba-debug-samba4.so => /usr/lib64/samba/libsamba-debug-samba4.so (0x00007f180051b000)
   libdcerpc-samba-samba4.so => /usr/lib64/samba/libdcerpc-samba-samba4.so (0x00007f180018b000)
   libcli-smb-common-samba4.so => /usr/lib64/samba/libcli-smb-common-samba4.so (0x00007f17fff5b000)
   libgse-samba4.so => /usr/lib64/samba/libgse-samba4.so (0x00007f17ffd33000)
   libutil-cmdline-samba4.so => /usr/lib64/samba/libutil-cmdline-samba4.so (0x00007f17ffb2b000)
   libndr-standard.so.0 => /usr/lib64/libndr-standard.so.0 (0x00007f17ff613000)
   libsmbregistry-samba4.so => /usr/lib64/samba/libsmbregistry-samba4.so (0x00007f17ff3f3000)
   libsecrets3-samba4.so => /usr/lib64/samba/libsecrets3-samba4.so (0x00007f17ff1e3000)
   libtalloc.so.2 => /usr/lib64/libtalloc.so.2 (0x00007f17fefcb000)
   libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007f17fedb3000)
   libtevent.so.0 => /usr/lib64/libtevent.so.0 (0x00007f17feba3000)
   libunistring.so.2 => /usr/lib64/libunistring.so.2 (0x00007f17fe82b000)
   libtasn1.so.6 => /usr/lib64/libtasn1.so.6 (0x00007f17fe613000)
   libnettle.so.6 => /usr/lib64/libnettle.so.6 (0x00007f17fe3d3000)
   libhogweed.so.4 => /usr/lib64/libhogweed.so.4 (0x00007f17fe19b000)
   libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f17fdf23000)
   libidn2.so.0 => /usr/lib64/libidn2.so.0 (0x00007f17fdd03000)
   libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f17fdaf3000)
   libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgomp.so.1 (0x00007f17fd8c3000)
   libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f17fd60b000)
   libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f17fd3db000)
   libGLX.so.0 => /usr/lib64/opengl/nvidia/lib/libGLX.so.0 (0x00007f17fd1ab000)
   libGLdispatch.so.0 => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0 (0x00007f17fcedb000)
   libicudata.so.58 => /usr/lib64/libicudata.so.58 (0x00007f17fb3d3000)
   libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f17fb15b000)
   libcap.so.2 => /lib64/libcap.so.2 (0x00007f17faf53000)
   liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007f17fad3b000)
   libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007f17faa1b000)
   libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f17fa813000)
   libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f17fa60b000)
   libreplace-samba4.so => /usr/lib64/samba/libreplace-samba4.so (0x00007f17fa403000)
   libutil-setid-samba4.so => /usr/lib64/samba/libutil-setid-samba4.so (0x00007f17fa1fb000)
   libtime-basic-samba4.so => /usr/lib64/samba/libtime-basic-samba4.so (0x00007f17f9ff3000)
   libgenrand-samba4.so => /usr/lib64/samba/libgenrand-samba4.so (0x00007f17f9deb000)
   libsocket-blocking-samba4.so => /usr/lib64/samba/libsocket-blocking-samba4.so (0x00007f17f9be3000)
   libcli-cldap-samba4.so => /usr/lib64/samba/libcli-cldap-samba4.so (0x00007f17f99db000)
   libcliauth-samba4.so => /usr/lib64/samba/libcliauth-samba4.so (0x00007f17f97c3000)
   libkrb5samba-samba4.so => /usr/lib64/samba/libkrb5samba-samba4.so (0x00007f17f95b3000)
   libgensec-samba4.so => /usr/lib64/samba/libgensec-samba4.so (0x00007f17f938b000)
   libasn1util-samba4.so => /usr/lib64/samba/libasn1util-samba4.so (0x00007f17f9183000)
   libndr-nbt.so.0 => /usr/lib64/libndr-nbt.so.0 (0x00007f17f8f6b000)
   libsamba-hostconfig.so.0 => /usr/lib64/libsamba-hostconfig.so.0 (0x00007f17f8d3b000)
   libsmb-transport-samba4.so => /usr/lib64/samba/libsmb-transport-samba4.so (0x00007f17f8b33000)
   libsamba-credentials.so.0 => /usr/lib64/libsamba-credentials.so.0 (0x00007f17f891b000)
   libCHARSET3-samba4.so => /usr/lib64/samba/libCHARSET3-samba4.so (0x00007f17f8713000)
   libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f17f850b000)
   libndr-samba-samba4.so => /usr/lib64/samba/libndr-samba-samba4.so (0x00007f17f81db000)
   libdbwrap-samba4.so => /usr/lib64/samba/libdbwrap-samba4.so (0x00007f17f7fcb000)
   libdcerpc-binding.so.0 => /usr/lib64/libdcerpc-binding.so.0 (0x00007f17f7dab000)
   libutil-tdb-samba4.so => /usr/lib64/samba/libutil-tdb-samba4.so (0x00007f17f7ba3000)
   libsamba-sockets-samba4.so => /usr/lib64/samba/libsamba-sockets-samba4.so (0x00007f17f798b000)
   libmessages-util-samba4.so => /usr/lib64/samba/libmessages-util-samba4.so (0x00007f17f7783000)
   libtalloc-report-samba4.so => /usr/lib64/samba/libtalloc-report-samba4.so (0x00007f17f757b000)
   libmessages-dgm-samba4.so => /usr/lib64/samba/libmessages-dgm-samba4.so (0x00007f17f736b000)
   libserver-id-db-samba4.so => /usr/lib64/samba/libserver-id-db-samba4.so (0x00007f17f7163000)
   libsamba-cluster-support-samba4.so => /usr/lib64/samba/libsamba-cluster-support-samba4.so (0x00007f17f6f5b000)
   libsys-rw-samba4.so => /usr/lib64/samba/libsys-rw-samba4.so (0x00007f17f6d53000)
   libutil-reg-samba4.so => /usr/lib64/samba/libutil-reg-samba4.so (0x00007f17f6b4b000)
   libinterfaces-samba4.so => /usr/lib64/samba/libinterfaces-samba4.so (0x00007f17f6943000)
   libsmbd-shim-samba4.so => /usr/lib64/samba/libsmbd-shim-samba4.so (0x00007f17f673b000)
   libtdb-wrap-samba4.so => /usr/lib64/samba/libtdb-wrap-samba4.so (0x00007f17f6533000)
   libserver-role-samba4.so => /usr/lib64/samba/libserver-role-samba4.so (0x00007f17f632b000)
   libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f17f6113000)
   libtdb.so.1 => /usr/lib64/libtdb.so.1 (0x00007f17f5efb000)
   libiov-buf-samba4.so => /usr/lib64/samba/libiov-buf-samba4.so (0x00007f17f5cf3000)
   libaddns-samba4.so => /usr/lib64/samba/libaddns-samba4.so (0x00007f17f5ae3000)
   libauthkrb5-samba4.so => /usr/lib64/samba/libauthkrb5-samba4.so (0x00007f17f58d3000)
   libcli-nbt-samba4.so => /usr/lib64/samba/libcli-nbt-samba4.so (0x00007f17f56c3000)
   libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f17f53eb000)
   libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f17f519b000)
   libattr.so.1 => /lib64/libattr.so.1 (0x00007f17f4f93000)
   libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007f17f4d7b000)
   libcli-ldap-common-samba4.so => /usr/lib64/samba/libcli-ldap-common-samba4.so (0x00007f17f4b73000)
   libldb.so.1 => /usr/lib64/libldb.so.1 (0x00007f17f4943000)
   libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f17f470b000)
   libwbclient.so.0 => /usr/lib64/libwbclient.so.0 (0x00007f17f44fb000)
   libsamba-modules-samba4.so => /usr/lib64/samba/libsamba-modules-samba4.so (0x00007f17f42f3000)
   libsamdb.so.0 => /usr/lib64/libsamdb.so.0 (0x00007f17f40db000)
   libsamdb-common-samba4.so => /usr/lib64/samba/libsamdb-common-samba4.so (0x00007f17f3eab000)
   libldbsamba-samba4.so => /usr/lib64/samba/libldbsamba-samba4.so (0x00007f17f3c7b000)
   libmsghdr-samba4.so => /usr/lib64/samba/libmsghdr-samba4.so (0x00007f17f3a73000)
   libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f17f385b000)
   libndr-krb5pac.so.0 => /usr/lib64/libndr-krb5pac.so.0 (0x00007f17f364b000)
   libauth-sam-reply-samba4.so => /usr/lib64/samba/libauth-sam-reply-samba4.so (0x00007f17f3443000)
   libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f17f3233000)
   libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f17f302b000)
   libwinbind-client-samba4.so => /usr/lib64/samba/libwinbind-client-samba4.so (0x00007f17f2e23000)
   libflag-mapping-samba4.so => /usr/lib64/samba/libflag-mapping-samba4.so (0x00007f17f2c1b000)


Code:
c@localhost ~ $ type ffmpeg
ffmpeg is /usr/bin/ffmpeg


and for
Quote:
find /usr/local -name \*ffmpeg\*
there is no output at all.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Wed Sep 20, 2017 6:24 pm    Post subject: Reply with quote

Thank you!

That all does look OK so far (except for finding the cause of the issue, heh). I don't have systemd installed, but I can't quite imagine it making a difference in this case...

Another big difference is the bunch of overlays you have installed, but it does not look like they even provide anything that could be causing this.

I'd still like to see the build logs for 'media-video/ffmpeg' and 'media-video/obs-studio' (use 'wgetpaste' for example), and perhaps the terminal output from running 'obs', or the log file that it creates under '/home/$USER/.config/obs-studio/logs/'.

I've been asking about this in the obsproject IRC channel of Freenode as well, and they find this issue pretty weird, too. Usually it's the other way around, that OBS thinks the machine /has/ NVENC support while it doesn't (which isn't necessarily surprising, if I'm reading the detection stuff correctly).
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Wed Sep 20, 2017 8:21 pm    Post subject: Reply with quote

Chiitoo wrote:
Thank you!

That all does look OK so far (except for finding the cause of the issue, heh). I don't have systemd installed, but I can't quite imagine it making a difference in this case...

Another big difference is the bunch of overlays you have installed, but it does not look like they even provide anything that could be causing this.

I'd still like to see the build logs for 'media-video/ffmpeg' and 'media-video/obs-studio' (use 'wgetpaste' for example), and perhaps the terminal output from running 'obs', or the log file that it creates under '/home/$USER/.config/obs-studio/logs/'.

I've been asking about this in the obsproject IRC channel of Freenode as well, and they find this issue pretty weird, too. Usually it's the other way around, that OBS thinks the machine /has/ NVENC support while it doesn't (which isn't necessarily surprising, if I'm reading the detection stuff correctly).


Okay, there is build logs:

OBS:
https://paste.pound-python.org/show/OYPSrz5gYpLKvBSEvRtg/

FFMPEG:
https://paste.pound-python.org/show/jliJBG13ULQTGiEjv3CX/

And there is terminal output:
https://paste.pound-python.org/show/NDcmYoOSqEjsN2pykkDm/

I'm also trying to build ffmpeg-3.3.4 - same result.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Fri Sep 22, 2017 12:31 pm    Post subject: Reply with quote

Apologies for the delay. Seems I caught a bit of a flu, and that managed to keep me away from the computer.

Unfortunately, this issue still remains a mystery to me. Indeed, I had tried downgrading to FFmpeg 3.3.3, among various other tests here, but never managed to re-produce the issue.

Thank you for all the information you have provided thus far. Right now, aside from digging in with 'gdb' or something similar, I'm out of ideas.

If you're keen though, I would be interested in what a couple of little patches would do there (if you're unfamiliar with adding patches to Portage builds, see for example: wiki.gentoo.org - /etc/portage/patches).

This one changes the detection logic a bit, and looks for just 'nvenc' (although this shouldn't really make a difference).

Raw URL here.

Code:
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c
index 30f30bd0..043cb409 100644
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c
@@ -118,7 +118,7 @@ cleanup:
 
 static bool nvenc_supported(void)
 {
-   AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264");
+   AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc");
    void *lib = NULL;
 
    if (!nvenc)
--
2.14.1


The second one is a rather horrible hack that will enable NVENC support regardless of what FFmpeg reports. It's certainly no fix, but at least in theory, my theory, it should make things work for you until it's /really/ fixed (or you will get a window saying “Starting the output failed. [...]” when starting recording/streaming).

Raw URL here.

Code:
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c
index 30f30bd0..da1415df 100644
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c
@@ -121,8 +121,8 @@ static bool nvenc_supported(void)
    AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264");
    void *lib = NULL;
 
-   if (!nvenc)
-      return false;
+//   if (!nvenc)
+//      return false;
 
 #if defined(_WIN32)
    if (sizeof(void*) == 8) {
@@ -150,10 +150,16 @@ bool obs_module_load(void)
    obs_register_output(&replay_buffer);
    obs_register_encoder(&aac_encoder_info);
    obs_register_encoder(&opus_encoder_info);
-   if (nvenc_supported()) {
+/*   if (nvenc_supported()) {
       blog(LOG_INFO, "NVENC supported");
       obs_register_encoder(&nvenc_encoder_info);
    }
+*/
+   // Force registering 'nvenc_encoder' for testing purposes.
+   nvenc_supported();
+   obs_register_encoder(&nvenc_encoder_info);
+   blog(LOG_INFO, "NVENC support forcefully enabled.");
+
    return true;
 }
 
--
2.14.1


The patches are to be used separately, that is, only apply one of them at a time.

A copy & paste from here may result in a patching error due to tabs being replaced by white-spaces, so I would 'aria2c' or 'wget' the raw URLs (or copy from there in some other way).
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nexagenom
n00b
n00b


Joined: 12 Sep 2017
Posts: 10

PostPosted: Fri Sep 22, 2017 4:37 pm    Post subject: Reply with quote

Chiitoo wrote:
Apologies for the delay. Seems I caught a bit of a flu, and that managed to keep me away from the computer.

Unfortunately, this issue still remains a mystery to me. Indeed, I had tried downgrading to FFmpeg 3.3.3, among various other tests here, but never managed to re-produce the issue.

Thank you for all the information you have provided thus far. Right now, aside from digging in with 'gdb' or something similar, I'm out of ideas.

If you're keen though, I would be interested in what a couple of little patches would do there (if you're unfamiliar with adding patches to Portage builds, see for example: wiki.gentoo.org - /etc/portage/patches).

This one changes the detection logic a bit, and looks for just 'nvenc' (although this shouldn't really make a difference).

Raw URL here.

Code:
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c
index 30f30bd0..043cb409 100644
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c
@@ -118,7 +118,7 @@ cleanup:
 
 static bool nvenc_supported(void)
 {
-   AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264");
+   AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc");
    void *lib = NULL;
 
    if (!nvenc)
--
2.14.1


The second one is a rather horrible hack that will enable NVENC support regardless of what FFmpeg reports. It's certainly no fix, but at least in theory, my theory, it should make things work for you until it's /really/ fixed (or you will get a window saying “Starting the output failed. [...]” when starting recording/streaming).

Raw URL here.

Code:
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c
index 30f30bd0..da1415df 100644
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c
@@ -121,8 +121,8 @@ static bool nvenc_supported(void)
    AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264");
    void *lib = NULL;
 
-   if (!nvenc)
-      return false;
+//   if (!nvenc)
+//      return false;
 
 #if defined(_WIN32)
    if (sizeof(void*) == 8) {
@@ -150,10 +150,16 @@ bool obs_module_load(void)
    obs_register_output(&replay_buffer);
    obs_register_encoder(&aac_encoder_info);
    obs_register_encoder(&opus_encoder_info);
-   if (nvenc_supported()) {
+/*   if (nvenc_supported()) {
       blog(LOG_INFO, "NVENC supported");
       obs_register_encoder(&nvenc_encoder_info);
    }
+*/
+   // Force registering 'nvenc_encoder' for testing purposes.
+   nvenc_supported();
+   obs_register_encoder(&nvenc_encoder_info);
+   blog(LOG_INFO, "NVENC support forcefully enabled.");
+
    return true;
 }
 
--
2.14.1


The patches are to be used separately, that is, only apply one of them at a time.

A copy & paste from here may result in a patching error due to tabs being replaced by white-spaces, so I would 'aria2c' or 'wget' the raw URLs (or copy from there in some other way).


Flu it's inconvenient thing. I hope you're getting better now ;)

Big thanks for your answer and for your solutions. I tried both and can tell you that:

First one didn't change anything in my case.

But second, the horrible one, fix my issue and OBS start encoding witn NVENC. According this I can say that you theory works.

Thank You! But I'm still having big interest about circumstances of this issue...
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Fri Sep 22, 2017 7:51 pm    Post subject: Reply with quote

Glad it at least does the job for you now!

It really seems weird since, from what I can tell, it's asking FFmpeg for the support, and FFmpeg itself says it's there, but when asked by OBS (seemingly using an FFmpeg function for it), it's suddenly not there...

I'll definitely let you know if/when I bump into something more about this.
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5933

PostPosted: Sat Sep 23, 2017 5:10 am    Post subject: Reply with quote

Sorry to hijack the thread, but what about intel quick sync? I can't seem to get that to work in OBS either.

(then again, I've been noticing that OBS 20.0.1 likes to crash at random, haven't tried 9999 or 18/19)
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2550
Location: Here and Away Again

PostPosted: Sat Sep 23, 2017 11:07 am    Post subject: Reply with quote

From a quick peek, it looks like “Quick Sync” support is for Windows only at this time.

(Might want to start a thread somewhere about the crashing. :])
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Sep 23, 2017 4:00 pm    Post subject: Reply with quote

I've been using 9999 and it crashes on average every 5 minutes. Thought I was the only one with that problem.

You shouldn't need Quick Sync on Linux, VAAPI encoders should work. Not sure if the streaming settings allow those, but the regular recording settings do (and you can set it to send to an URL anyway).
Back to top
View user's profile Send private message
brutico
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2014
Posts: 130

PostPosted: Fri Dec 08, 2017 8:43 pm    Post subject: Reply with quote

It happens the same to me. I do not appear nvenc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum